Skip to content

Commit

Permalink
[CHORE] Updated native sdk dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Renemari Padillo committed Aug 9, 2016
1 parent 2292ad2 commit bacb28a
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 12 deletions.
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ SOFTWARE.
</intent-filter>
</config-file>
<source-file src="src/android/io/branch/BranchSDK.java" target-dir="src/io/branch" />
<framework src="io.branch.sdk.android:library:1+" />
<framework src="io.branch.sdk.android:library:2+" />
</platform>

<!-- ios -->
Expand Down
2 changes: 1 addition & 1 deletion src/ios/dependencies/Branch-SDK/BNCConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef Branch_SDK_Config_h
#define Branch_SDK_Config_h

#define SDK_VERSION @"0.12.4"
#define SDK_VERSION @"0.12.5"

#define BNC_PROD_ENV
//#define BNC_STAGE_ENV
Expand Down
2 changes: 1 addition & 1 deletion src/ios/dependencies/Branch-SDK/BNCFabricAnswers.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import "BNCFabricAnswers.h"
#import "BNCPreferenceHelper.h"
#import "Answers.h"
#import "../Fabric/Answers.h"

@implementation BNCFabricAnswers

Expand Down
2 changes: 1 addition & 1 deletion src/ios/dependencies/Branch-SDK/BNCPreferenceHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import "BNCEncodingUtils.h"
#import "BNCConfig.h"
#import "Branch.h"
#import "Fabric+FABKits.h"
#import "../Fabric/Fabric+FABKits.h"

static const NSTimeInterval DEFAULT_TIMEOUT = 5.5;
static const NSTimeInterval DEFAULT_RETRY_INTERVAL = 0;
Expand Down
27 changes: 25 additions & 2 deletions src/ios/dependencies/Branch-SDK/Branch.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,19 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
*/
-(void)setDeepLinkDebugMode:(NSDictionary *)debugParams;

/**
Add a scheme to a whitelist of URI schemes that will be tracked by Branch. Default to all schemes.
@param the scheme to add to the whitelist, i.e. @"http", @"https" or @"myapp"
*/
-(void)addWhiteListedScheme:(NSString *)scheme;

/**
Add an array of schemes to a whitelist of URI schemes that will be tracked by Branch. Default to all schemes.
@param the array of schemes to add to the whitelist, i.e. @[@"http", @"https", @"myapp"]
*/
-(void)setWhiteListedSchemes:(NSArray *)schemes;

/**
Register your Facebook SDK's FBSDKAppLinkUtility class to be used by Branch for deferred deep linking from their platform
Expand Down Expand Up @@ -394,8 +407,18 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
- (void)disableCookieBasedMatching;

/**
If you're using a version of the Facebook SDK that prevents application:didFinishLaunchingWithOptions: from returning
YES/true when a Universal Link is clicked, you should enable this option.
TL;DR: If you're using a version of the Facebook SDK that prevents application:didFinishLaunchingWithOptions: from
returning YES/true when a Universal Link is clicked, you should enable this option.
Long explanation: in application:didFinishLaunchingWithOptions: you should choose one of the following:
1. Always `return YES;`, and do *not* invoke `[[Branch getInstance] accountForFacebookSDKPreventingAppLaunch];`
2. Allow the Facebook SDK to determine whether `application:didFinishLaunchingWithOptions:` returns `YES` or `NO`,
and invoke `[[Branch getInstance] accountForFacebookSDKPreventingAppLaunch];`
The reason for this second option is that the Facebook SDK will return `NO` if a Universal Link opens the app
but that UL is not a Facebook UL. Some developers prefer not to modify
`application:didFinishLaunchingWithOptions:` to always return `YES` and should use this method instead.
*/
- (void)accountForFacebookSDKPreventingAppLaunch;

Expand Down
29 changes: 24 additions & 5 deletions src/ios/dependencies/Branch-SDK/Branch.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
#import "BranchRegisterViewRequest.h"

//Fabric
#import "FABKitProtocol.h"
#import "Fabric+FABKits.h"
#import "../Fabric/FABKitProtocol.h"
#import "../Fabric/Fabric+FABKits.h"

NSString * const BRANCH_FEATURE_TAG_SHARE = @"share";
NSString * const BRANCH_FEATURE_TAG_REFERRAL = @"referral";
Expand Down Expand Up @@ -80,6 +80,7 @@ @interface Branch() <BranchDeepLinkingControllerCompletionDelegate, FABKit>
@property (strong, nonatomic) NSDictionary *deepLinkDebugParams;
@property (assign, nonatomic) BOOL accountForFacebookSDK;
@property (assign, nonatomic) id FBSDKAppLinkUtility;
@property (strong, nonatomic) NSMutableArray *whiteListedSchemeList;

@end

Expand Down Expand Up @@ -147,6 +148,7 @@ - (id)initWithInterface:(BNCServerInterface *)interface queue:(BNCServerRequestQ
_processing_sema = dispatch_semaphore_create(1);
_networkCount = 0;
_deepLinkControllers = [[NSMutableDictionary alloc] init];
_whiteListedSchemeList = [[NSMutableArray alloc] init];
_useCookieBasedMatching = YES;

NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
Expand Down Expand Up @@ -320,12 +322,29 @@ - (void) setDeepLinkDebugMode:(NSDictionary *)debugParams {
self.deepLinkDebugParams = debugParams;
}

-(void)setWhiteListedSchemes:(NSArray *)schemes {
self.whiteListedSchemeList = [schemes mutableCopy];
}

-(void)addWhiteListedScheme:(NSString *)scheme {
[self.whiteListedSchemeList addObject:scheme];
}

- (BOOL)handleDeepLink:(NSURL *)url {
BOOL handled = NO;
if (url && ![url isEqual:[NSNull null]]) {
//always save the incoming url in the preferenceHelper in the externalIntentURI field
self.preferenceHelper.externalIntentURI = [url absoluteString];

// save the incoming url in the preferenceHelper in the externalIntentURI field
if ([self.whiteListedSchemeList count]) {
for (NSString *scheme in self.whiteListedSchemeList) {
if ([scheme isEqualToString:[url scheme]]) {
self.preferenceHelper.externalIntentURI = [url absoluteString];
break;
}
}
} else {
self.preferenceHelper.externalIntentURI = [url absoluteString];
}

NSString *query = [url fragment];
if (!query) {
Expand Down Expand Up @@ -1284,7 +1303,7 @@ + (NSString *)bundleIdentifier {
}

+ (NSString *)kitDisplayVersion {
return @"0.12.4";
return @"0.12.5";
}

@end
Binary file modified src/ios/dependencies/Branch.framework/Versions/A/Branch
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef Branch_SDK_Config_h
#define Branch_SDK_Config_h

#define SDK_VERSION @"0.12.4"
#define SDK_VERSION @"0.12.5"

#define BNC_PROD_ENV
//#define BNC_STAGE_ENV
Expand Down
13 changes: 13 additions & 0 deletions src/ios/dependencies/Branch.framework/Versions/A/Headers/Branch.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,19 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
*/
-(void)setDeepLinkDebugMode:(NSDictionary *)debugParams;

/**
Add a scheme to a whitelist of URI schemes that will be tracked by Branch. Default to all schemes.
@param the scheme to add to the whitelist, i.e. @"http", @"https" or @"myapp"
*/
-(void)addWhiteListedScheme:(NSString *)scheme;

/**
Add an array of schemes to a whitelist of URI schemes that will be tracked by Branch. Default to all schemes.
@param the array of schemes to add to the whitelist, i.e. @[@"http", @"https", @"myapp"]
*/
-(void)setWhiteListedSchemes:(NSArray *)schemes;

/**
Register your Facebook SDK's FBSDKAppLinkUtility class to be used by Branch for deferred deep linking from their platform
Expand Down

0 comments on commit bacb28a

Please sign in to comment.