diff --git a/Ably.xcodeproj/project.pbxproj b/Ably.xcodeproj/project.pbxproj index 23bbca49c..74b1b29ac 100644 --- a/Ably.xcodeproj/project.pbxproj +++ b/Ably.xcodeproj/project.pbxproj @@ -1056,7 +1056,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; 3721DD0426946FEE30506043 /* [CP] Embed Pods Frameworks */ = { @@ -1086,7 +1086,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; 960F84BD638CCB7D20786C8C /* [CP] Check Pods Manifest.lock */ = { @@ -1101,7 +1101,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; A08ED191533D7C05CF3B1358 /* [CP] Embed Pods Frameworks */ = { diff --git a/Podfile.lock b/Podfile.lock index 44b02f1a5..acb142958 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -89,4 +89,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 160cf53ef13d4ed09e5e81c2f2840457b07e012a -COCOAPODS: 1.2.0 +COCOAPODS: 1.2.1 diff --git a/Source/ARTRest.m b/Source/ARTRest.m index fb8113ebb..172212676 100644 --- a/Source/ARTRest.m +++ b/Source/ARTRest.m @@ -530,6 +530,9 @@ BOOL ARTstartHandlingUncaughtExceptions(ARTRest *self) { } void ARTstopHandlingUncaughtExceptions(ARTRest *self) { + if (!self) { + return; + } self->_handlingUncaughtExceptions = false; [ARTSentry setUserInfo:@"reportToAbly" value:[NSNumber numberWithBool:false]]; } diff --git a/Spec/Auth.swift b/Spec/Auth.swift index 588e831b9..bd8c8e1f7 100644 --- a/Spec/Auth.swift +++ b/Spec/Auth.swift @@ -1446,16 +1446,11 @@ class Auth : QuickSpec { let rest = ARTRest(options: AblyTests.commonAppSetup()) var createTokenRequestMethodWasCalled = false - - let block: @convention(block) (AspectInfo, tokenParams: ARTTokenParams?) -> Void = { _, _ in + // Adds a block of code after `createTokenRequest` is triggered + let token = rest.auth.testSuite_injectIntoMethodAfter(NSSelectorFromString("_createTokenRequest:options:callback:")) { createTokenRequestMethodWasCalled = true } - - let hook = ARTAuth.aspect_hookSelector(rest.auth) - // Adds a block of code after `createTokenRequest` is triggered - let token = try? hook(#selector(ARTAuth.createTokenRequest(_:options:callback:)), withOptions: .PositionAfter, usingBlock: unsafeBitCast(block, ARTAuth.self)) - - expect(token).toNot(beNil()) + defer { token.remove() } waitUntil(timeout: testTimeout) { done in rest.auth.requestToken(nil, withOptions: nil, callback: { tokenDetails, error in