Skip to content

Commit

Permalink
Add conditional compile in Demo app delegate
Browse files Browse the repository at this point in the history
- Prevent using UIApplicationOpenURLOptionsSourceApplicationKey when not
  building against iOS SDK 9.0
  • Loading branch information
intelliot and richardshin committed Aug 31, 2015
1 parent ad26bec commit 9a416cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Demos/Braintree-Demo/Demo Base/BraintreeDemoAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ - (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWith
return YES;
}

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000
- (BOOL)application:(__unused UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
if ([[url.scheme lowercaseString] isEqualToString:[BraintreeDemoAppDelegatePaymentsURLScheme lowercaseString]]) {
return [Braintree handleOpenURL:url sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]];
}
return YES;
}
#endif

// Deprecated in iOS 9, but necessary to support < versions
- (BOOL)application:(__unused UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(__unused id)annotation {
Expand Down

0 comments on commit 9a416cb

Please sign in to comment.