File tree Expand file tree Collapse file tree 6 files changed +9
-13
lines changed
Expand file tree Collapse file tree 6 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -468,12 +468,8 @@ - (void)userActivityWillSave:(NSUserActivity *)userActivity {
468468
469469- (UIViewController *)getActiveViewController {
470470 Class UIApplicationClass = NSClassFromString (@" UIApplication" );
471- if (UIApplicationClass) {
472- UIViewController *rootViewController = [UIApplication sharedApplication ].keyWindow .rootViewController ;
473- return [self getActiveViewController: rootViewController];
474- }
475-
476- return nil ;
471+ UIViewController *rootViewController = [UIApplicationClass sharedApplication ].keyWindow .rootViewController ;
472+ return [self getActiveViewController: rootViewController];
477473}
478474
479475- (UIViewController *)getActiveViewController : (UIViewController *)rootViewController {
Original file line number Diff line number Diff line change @@ -232,6 +232,9 @@ - (NSDictionary *)prepareParamDict:(NSDictionary *)params key:(NSString *)key re
232232 NSMutableDictionary *fullParamDict = [[NSMutableDictionary alloc ] init ];
233233 [fullParamDict addEntriesFromDictionary: params];
234234 fullParamDict[@" sdk" ] = [NSString stringWithFormat: @" ios%@ " , SDK_VERSION];
235+ if ([[[NSBundle mainBundle ] executablePath ] containsString: @" .appex/" ]) {
236+ fullParamDict[@" ios_extension" ] = @(1 );
237+ }
235238 fullParamDict[@" retryNumber" ] = @(retryNumber);
236239 fullParamDict[@" branch_key" ] = key;
237240
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ - (void)presentSafariVCWithBranchKey:(NSString *)branchKey {
107107
108108 Class SFSafariViewControllerClass = NSClassFromString (@" SFSafariViewController" );
109109 Class UIApplicationClass = NSClassFromString (@" UIApplication" );
110- if (SFSafariViewControllerClass && UIApplicationClass ) {
110+ if (SFSafariViewControllerClass) {
111111 NSURL *strongMatchUrl = [NSURL URLWithString: [urlString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];
112112 if (!strongMatchUrl) {
113113 self.requestInProgress = NO ;
Original file line number Diff line number Diff line change @@ -432,8 +432,6 @@ - (BOOL)continueUserActivity:(NSUserActivity *)userActivity {
432432- (void )handlePushNotification : (NSDictionary *)userInfo {
433433 Class UIApplicationClass = NSClassFromString (@" UIApplication" );
434434
435- if (!UIApplicationClass) { return ; }
436-
437435 // If app is active, then close out the session and start a new one
438436 if ([[UIApplicationClass sharedApplication ] applicationState ] == UIApplicationStateActive) {
439437 [self callClose ];
@@ -1265,7 +1263,7 @@ - (void)handleInitSuccess {
12651263 }
12661264
12671265 Class UIApplicationClass = NSClassFromString (@" UIApplication" );
1268- if (self.shouldAutomaticallyDeepLink && UIApplicationClass ) {
1266+ if (self.shouldAutomaticallyDeepLink ) {
12691267 // Find any matched keys, then launch any controllers that match
12701268 // TODO which one to launch if more than one match?
12711269 NSMutableSet *keysInParams = [NSMutableSet setWithArray: [latestReferringParams allKeys ]];
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ - (void)showShareSheetWithLinkProperties:(BranchLinkProperties *)linkProperties
200200 }
201201 else {
202202 Class UIApplicationClass = NSClassFromString (@" UIApplication" );
203- if (UIApplicationClass && [[[[UIApplicationClass sharedApplication ].delegate window ] rootViewController ] respondsToSelector: @selector (presentViewController:animated:completion: )]) {
203+ if ([[[[UIApplicationClass sharedApplication ].delegate window ] rootViewController ] respondsToSelector: @selector (presentViewController:animated:completion: )]) {
204204 presentingViewController = [[[UIApplicationClass sharedApplication ].delegate window ] rootViewController ];
205205 }
206206 }
Original file line number Diff line number Diff line change @@ -44,8 +44,7 @@ - (BOOL)showBranchView:(NSString *)actionName withBranchViewDictionary:(NSDictio
4444}
4545
4646- (BOOL )showBranchView : (BranchView *)branchView withDelegate : (id )callback {
47- Class UIApplicationClass = NSClassFromString (@" UIApplication" );
48- if (UIApplicationClass && [branchView isAvailable ]){
47+ if ([branchView isAvailable ]) {
4948 self.branchViewCallback = callback;
5049 [self showView: branchView];
5150 return YES ;
You can’t perform that action at this time.
0 commit comments