From 5d41090867dc9473c1246f27a86db98ad583ac05 Mon Sep 17 00:00:00 2001 From: Edward Smith Date: Fri, 14 Sep 2018 11:27:35 -0700 Subject: [PATCH] Fixed warning in UITestBed. --- Examples/UITestBed/UITestBed/TBAppDelegate.m | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Examples/UITestBed/UITestBed/TBAppDelegate.m b/Examples/UITestBed/UITestBed/TBAppDelegate.m index 4fb00f59f..238219811 100644 --- a/Examples/UITestBed/UITestBed/TBAppDelegate.m +++ b/Examples/UITestBed/UITestBed/TBAppDelegate.m @@ -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>*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]; @@ -115,6 +132,8 @@ - (BOOL)application:(UIApplication *)application return YES; } +#endif + - (void)applicationWillResignActive:(UIApplication *)application { BNCLogMethodName(); }