diff --git a/packages/@unimodules/core/CHANGELOG.md b/packages/@unimodules/core/CHANGELOG.md index 0907cd5063f39..e6000e78ad394 100644 --- a/packages/@unimodules/core/CHANGELOG.md +++ b/packages/@unimodules/core/CHANGELOG.md @@ -9,6 +9,7 @@ ### 🐛 Bug fixes - Fixed error when serializing a `Map` containing a `null` ([#8153](https://github.com/expo/expo/pull/8153) by [@sjchmiela](https://github.com/sjchmiela)) +- Fixed _unused variable_ warnings in `UMAppDelegateWrapper` ([#8467](https://github.com/expo/expo/pull/8467) by [@sjchmiela](https://github.com/sjchmiela)) ## [5.1.1] - 2020-05-05 diff --git a/packages/@unimodules/core/ios/UMCore/UMAppDelegateWrapper.m b/packages/@unimodules/core/ios/UMCore/UMAppDelegateWrapper.m index babfdffaa4ef5..48e8e8baff942 100644 --- a/packages/@unimodules/core/ios/UMCore/UMAppDelegateWrapper.m +++ b/packages/@unimodules/core/ios/UMCore/UMAppDelegateWrapper.m @@ -11,12 +11,10 @@ @implementation UMAppDelegateWrapper - (void)forwardInvocation:(NSInvocation *)invocation { - +#if DEBUG SEL selector = [invocation selector]; - NSString *selectorName = NSStringFromSelector(selector); - NSArray> *delegatesToBeCalled = [self getSubcontractorsImplementingSelector:selector]; -#if DEBUG + NSString *selectorName = NSStringFromSelector(selector); if ([delegatesToBeCalled count] > 0) { [NSException raise:@"Method not implemented in UIApplicationDelegate" format:@"Some universal modules: %@ have registered for `%@` UIApplicationDelegate's callback, however, neither your AppDelegate nor %@ can handle this method. You'll need to either implement this method in your AppDelegate or submit a pull request to handle it in %@.", delegatesToBeCalled, selectorName, NSStringFromClass([self class]), NSStringFromClass([self class])]; } @@ -34,7 +32,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( for (id subcontractor in subcontractorsArray) { BOOL subcontractorAnswer = NO; - subcontractorAnswer = [subcontractor application:application didFinishLaunchingWithOptions:launchOptions]; + subcontractorAnswer = [subcontractor application:application didFinishLaunchingWithOptions:launchOptions]; answer |= subcontractorAnswer; }