我有以下代码:
- (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];
}
如何处理必要的申请?
答案 0 :(得分:5)
使用方法的响应:
- (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];
}