Skip to content

Commit

Permalink
Merge pull request #75 from BranchMetrics/fix/issue-72-facebook-plugi…
Browse files Browse the repository at this point in the history
…n-conflict

fix for openUrl() method conflict when using facebook plugins
  • Loading branch information
aaustin committed Mar 18, 2016
2 parents e815d87 + 8a73c2a commit 1e9a23c
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 1e9a23c

Please sign in to comment.