Commits

Martijn The committed 09f7a28 Merge

Merge branch 'master' of bitbucket.org:martijnthe/nsurlconnectionvcr

Comments (0)

Files changed (1)

NSURLConnectionVCR/NSURLConnectionVCR.m

                 origImps[i] = method_getImplementation(origMethod);
                 
                 // Depending on your SDK, you might need a bridged cast here:
-                // poseImplementation = imp_implementationWithBlock((__bridge void*)poseImplementationBlockForSelector(theSelector));
+#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
+                poseImplementation = imp_implementationWithBlock((__bridge void*)poseImplementationBlockForSelector(theSelector));
+#else
                 poseImplementation = imp_implementationWithBlock(poseImplementationBlockForSelector(theSelector));
+#endif
                 
                 class_replaceMethod(theClass, theSelector, poseImplementation, method_getTypeEncoding(origMethod));
             }