21
21
#import " GoogleUtilities/Logger/Public/GoogleUtilities/GULLogger.h"
22
22
#import " GoogleUtilities/Network/Public/GoogleUtilities/GULMutableDictionary.h"
23
23
24
- #import < objc/runtime.h>
25
24
#import < dispatch/group.h>
25
+ #import < objc/runtime.h>
26
26
27
27
// Implementations need to be typed before calling the implementation directly to cast the
28
28
// arguments and the return types correctly. Otherwise, it will crash the app.
@@ -882,7 +882,7 @@ - (void)application:(GULApplication *)application
882
882
GULRealDidReceiveRemoteNotificationWithCompletionIMP
883
883
didReceiveRemoteNotificationWithCompletionIMP =
884
884
[didReceiveRemoteNotificationWithCompletionIMPPointer pointerValue ];
885
-
885
+
886
886
dispatch_group_t __block callbackGroup = dispatch_group_create ();
887
887
UIBackgroundFetchResult __block latestFetchResult = UIBackgroundFetchResultNoData;
888
888
dispatch_group_notify (callbackGroup, dispatch_get_main_queue (), ^() {
@@ -892,20 +892,21 @@ - (void)application:(GULApplication *)application
892
892
[GULAppDelegateSwizzler
893
893
notifyInterceptorsWithMethodSelector: methodSelector
894
894
callback: ^(id <GULApplicationDelegate> interceptor) {
895
-
896
895
dispatch_group_enter (callbackGroup);
897
- void (^localCompletionHandler)(UIBackgroundFetchResult) = ^void (UIBackgroundFetchResult fetchResult){
898
- latestFetchResult = fetchResult;
899
- dispatch_group_leave (callbackGroup);
900
- };
901
-
896
+ void (^localCompletionHandler)(UIBackgroundFetchResult) =
897
+ ^void (UIBackgroundFetchResult fetchResult) {
898
+ latestFetchResult = fetchResult;
899
+ dispatch_group_leave (callbackGroup);
900
+ };
901
+
902
902
NSInvocation *invocation = [GULAppDelegateSwizzler
903
903
appDelegateInvocationForSelector: methodSelector];
904
904
[invocation setTarget: interceptor];
905
905
[invocation setSelector: methodSelector];
906
906
[invocation setArgument: (void *)(&application) atIndex: 2 ];
907
907
[invocation setArgument: (void *)(&userInfo) atIndex: 3 ];
908
- [invocation setArgument: (void *)(&localCompletionHandler) atIndex: 4 ];
908
+ [invocation setArgument: (void *)(&localCompletionHandler)
909
+ atIndex: 4 ];
909
910
[invocation invoke ];
910
911
}];
911
912
// Call the real implementation if the real App Delegate has any.
0 commit comments