diff --git a/DetoxInstruments/DetoxInstruments/Info.plist b/DetoxInstruments/DetoxInstruments/Info.plist
index 4d067072..30364d48 100644
--- a/DetoxInstruments/DetoxInstruments/Info.plist
+++ b/DetoxInstruments/DetoxInstruments/Info.plist
@@ -98,9 +98,9 @@
CFBundleShortVersionString
1.10
CFBundleVersion
- 10233
+ 10238
DTXBuildDate
- 2019-04-24T00:28:55Z
+ 2019-05-12T13:41:41Z
DTXSourceRoot
$(DTXSRCROOT)
LSMinimumSystemVersion
diff --git a/Profiler/DTXProfiler/Info.plist b/Profiler/DTXProfiler/Info.plist
index b89707e8..5e4bf6d6 100644
--- a/Profiler/DTXProfiler/Info.plist
+++ b/Profiler/DTXProfiler/Info.plist
@@ -17,9 +17,9 @@
CFBundleShortVersionString
1.10
CFBundleVersion
- 10233
+ 10238
DTXBuildDate
- 2019-04-24T00:28:55Z
+ 2019-05-12T13:41:41Z
NSPrincipalClass
diff --git a/Profiler/DTXProfiler/NetworkRecording/NSURLSessionTask+DTXNetworkRecording.m b/Profiler/DTXProfiler/NetworkRecording/NSURLSessionTask+DTXNetworkRecording.m
index 0e5eeff1..7bcc213b 100644
--- a/Profiler/DTXProfiler/NetworkRecording/NSURLSessionTask+DTXNetworkRecording.m
+++ b/Profiler/DTXProfiler/NetworkRecording/NSURLSessionTask+DTXNetworkRecording.m
@@ -71,31 +71,37 @@ + (void)load
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
- Method m1 = class_getInstanceMethod(NSClassFromString(@"__NSCFLocalSessionTask"), @selector(resume));
+ Class cls = NSClassFromString(@"__NSCFLocalDataTask");
+
+ Method m1 = class_getInstanceMethod(NSClassFromString(@"__NSCFLocalDataTask"), NSSelectorFromString(@"greyswizzled_resume"));
+ if(m1 == NULL)
+ {
+ m1 = class_getInstanceMethod(cls, @selector(resume));
+ }
Method m2 = class_getInstanceMethod(self.class, @selector(__dtx_resume));
method_exchangeImplementations(m1, m2);
- m1 = class_getInstanceMethod(NSClassFromString(@"__NSCFLocalSessionTask"), @selector(connection:didReceiveResponse:completion:));
+ m1 = class_getInstanceMethod(cls, @selector(connection:didReceiveResponse:completion:));
m2 = class_getInstanceMethod(self.class, @selector(__dtx_connection:didReceiveResponse:completion:));
method_exchangeImplementations(m1, m2);
- m1 = class_getInstanceMethod(NSClassFromString(@"__NSCFLocalSessionTask"), @selector(connection:didFinishLoadingWithError:));
+ m1 = class_getInstanceMethod(cls, @selector(connection:didFinishLoadingWithError:));
m2 = class_getInstanceMethod(self.class, @selector(__dtx_connection:didFinishLoadingWithError:));
method_exchangeImplementations(m1, m2);
- m1 = class_getInstanceMethod(NSClassFromString(@"__NSCFLocalSessionTask"), @selector(connection:didReceiveData:completion:));
+ m1 = class_getInstanceMethod(cls, @selector(connection:didReceiveData:completion:));
m2 = class_getInstanceMethod(self.class, @selector(__dtx_connection:didReceiveData:completion:));
method_exchangeImplementations(m1, m2);
- m1 = class_getInstanceMethod(NSClassFromString(@"__NSCFLocalSessionTask"), @selector(connection:didFinishCollectingMetrics:completion:));
+ m1 = class_getInstanceMethod(cls, @selector(connection:didFinishCollectingMetrics:completion:));
m2 = class_getInstanceMethod(self.class, @selector(__dtx_connection:didFinishCollectingMetrics:completion:));
method_exchangeImplementations(m1, m2);
- m1 = class_getInstanceMethod(NSClassFromString(@"__NSCFLocalSessionTask"), @selector(initWithOriginalRequest:updatedRequest:ident:session:));
+ m1 = class_getInstanceMethod(cls, @selector(initWithOriginalRequest:updatedRequest:ident:session:));
m2 = class_getInstanceMethod(self.class, @selector(initWithOriginalRequest__dtx:updatedRequest:ident:session:));
method_exchangeImplementations(m1, m2);
- m1 = class_getInstanceMethod(NSClassFromString(@"__NSCFLocalSessionTask"), @selector(_onqueue_didFinishCollectingMetrics:completion:));
+ m1 = class_getInstanceMethod(cls, @selector(_onqueue_didFinishCollectingMetrics:completion:));
m2 = class_getInstanceMethod(self.class, @selector(__dtx_onqueue_didFinishCollectingMetrics:completion:));
method_exchangeImplementations(m1, m2);
});