Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 UIApplicationDelegate 方法中有返回值的方法 #116

Open
davidfuzju opened this issue Apr 16, 2018 · 0 comments
Open

关于 UIApplicationDelegate 方法中有返回值的方法 #116

davidfuzju opened this issue Apr 16, 2018 · 0 comments

Comments

@davidfuzju
Copy link

我想问下对于下面这种情况,返回值直接设置成 YES 是否会有问题。

如果说同时有模块 AB, 当有 openURL 事件后,各个模块应该都有机会返回其是否能够处理这个 url 参数,至少有一个模块可以处理才返回 YES,如果都不能处理才返回 NO

还望解惑

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    [[BeeHive shareInstance].context.openURLItem setOpenURL:url];
    [[BeeHive shareInstance].context.openURLItem setSourceApplication:sourceApplication];
    [[BeeHive shareInstance].context.openURLItem setAnnotation:annotation];
    [[BHModuleManager sharedManager] triggerEvent:BHMOpenURLEvent];
    return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant