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

Compatibility with cordova-plugin-googleplus on iOS #699

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/ios/AppDelegate+BranchSdk.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
// pass the url to the handle deep link call
if (![[Branch getInstance] application:app openURL:url options:options]) {
// do other deep link routing for the Facebook SDK, Pinterest SDK, etc
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
NSMutableDictionary * openURLData = [[NSMutableDictionary alloc] init];
[openURLData setValue:url forKey:@"url"];
NSMutableString * sourceApplication =
[options objectForKey:UIApplicationOpenURLOptionsSourceApplicationKey];
if (sourceApplication) {
[openURLData setValue:sourceApplication forKey:@"sourceApplication"];
}
NSMutableString * annotation =
[options objectForKey:UIApplicationOpenURLOptionsAnnotationKey];
if (annotation) {
[openURLData setValue:annotation forKey:@"annotation"];
}
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification object:openURLData]];
// send unhandled URL to notification
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:@"BSDKPostUnhandledURL" object:[url absoluteString]]];
}
Expand Down