Skip to content

Commit

Permalink
Fixed warning in UITestBed.
Browse files Browse the repository at this point in the history
  • Loading branch information
E-B-Smith committed Sep 14, 2018
1 parent ec740fa commit 5d41090
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Examples/UITestBed/UITestBed/TBAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,32 @@ - (BOOL)application:(UIApplication *)application
return YES;
}

#if !defined(__IPHONE_12_0) || __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_12_0

- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *))restorationHandler {
NSLog(@"[branch.io] application:continueUserActivity:restorationHandler: invoked.\n"
"ActivityType: %@ userActivity.webpageURL: %@",
userActivity.activityType,
userActivity.webpageURL.absoluteString);
// Required. Returns YES if Branch Universal Link, else returns NO.
// Add `branch_universal_link_domains` to .plist (String or Array) for custom domain(s).
[[Branch getInstance] continueUserActivity:userActivity];

// Process non-Branch userActivities here...
return YES;
}

#else

- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void(^)(NSArray<id<UIUserActivityRestoring>>*restorableObjects))restorationHandler {
NSLog(@"[branch.io] application:continueUserActivity:restorationHandler: invoked.\n"
"ActivityType: %@ userActivity.webpageURL: %@",
userActivity.activityType,
userActivity.webpageURL.absoluteString);

// Required. Returns YES if Branch Universal Link, else returns NO.
// Add `branch_universal_link_domains` to .plist (String or Array) for custom domain(s).
[[Branch getInstance] continueUserActivity:userActivity];
Expand All @@ -115,6 +132,8 @@ - (BOOL)application:(UIApplication *)application
return YES;
}

#endif

- (void)applicationWillResignActive:(UIApplication *)application {
BNCLogMethodName();
}
Expand Down

0 comments on commit 5d41090

Please sign in to comment.