Skip to content

Commit

Permalink
fix for openUrl() method conflict when using facebook plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
jestoniyap committed Mar 18, 2016
1 parent e815d87 commit 8a73c2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/ios/AppDelegate+BranchSdk.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ @implementation AppDelegate (BranchSdk)
// Respond to URI scheme links
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
// pass the url to the handle deep link call
[[Branch getInstance] handleDeepLink:url];

// do other deep link routing for the Facebook SDK, Pinterest SDK, etc
if (![[Branch getInstance] handleDeepLink:url]) {
// do other deep link routing for the Facebook SDK, Pinterest SDK, etc
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
}
return YES;
}

// Respond to Universal Links
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
BOOL handledByBranch = [[Branch getInstance] continueUserActivity:userActivity];

return handledByBranch;
}

Expand Down
4 changes: 2 additions & 2 deletions src/ios/BranchSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//

#import <Branch/Branch.h>
#import "Branch/BranchLinkProperties.h"
#import "Branch/BranchUniversalObject.h"
#import <Branch/BranchLinkProperties.h>
#import <Branch/BranchUniversalObject.h>
#import <Cordova/CDV.h>

@interface BranchSDK : CDVPlugin
Expand Down

0 comments on commit 8a73c2a

Please sign in to comment.