我有以下代码:

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation
{

    return [Braintree handleOpenURL:url sourceApplication:sourceApplication];

}

但是Facebook SDK集成要求我这样做:
- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation {
  // attempt to extract a token from the url
  return [FBAppCall handleOpenURL:url sourceApplication:sourceApplication];
}

如何处理必要的应用程序的打开?

最佳答案

使用方法的响应:

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation
{
  if ([FBAppCall handleOpenURL:url sourceApplication:sourceApplication])
    return YES;
  return [Braintree handleOpenURL:url sourceApplication:sourceApplication];
}

关于ios - 处理在AppDelegate中打开多个URL,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28028246/

10-09 18:01