Skip to content

Commit 37bb1a2

Browse files
committed
update iOS
1 parent 593582f commit 37bb1a2

File tree

10 files changed

+24
-10
lines changed

10 files changed

+24
-10
lines changed

src/ios/dependencies/Branch-SDK/BNCConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef Branch_SDK_Config_h
1010
#define Branch_SDK_Config_h
1111

12-
#define SDK_VERSION @"0.12.10"
12+
#define SDK_VERSION @"0.12.11"
1313

1414
#define BNC_PROD_ENV
1515
//#define BNC_STAGE_ENV

src/ios/dependencies/Branch-SDK/BNCPreferenceHelper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
@property (assign, nonatomic) NSTimeInterval timeout;
3737
@property (strong, nonatomic) NSString *externalIntentURI;
3838
@property (strong, nonatomic) NSMutableDictionary *savedAnalyticsData;
39+
@property (assign, nonatomic) NSInteger installRequestDelay;
3940

4041
+ (BNCPreferenceHelper *)preferenceHelper;
4142

src/ios/dependencies/Branch-SDK/BNCStrongMatchHelper.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ - (void)presentSafariVCWithBranchKey:(NSString *)branchKey {
135135
[self.secondWindow makeKeyWindow];
136136

137137
// Give enough time for Safari to load the request (optimized for 3G)
138-
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
138+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
139139
[keyWindow makeKeyWindow];
140140

141141
// Remove the window and release it's strong reference. This is important to ensure that

src/ios/dependencies/Branch-SDK/Branch.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
448448
but that UL is not a Facebook UL. Some developers prefer not to modify
449449
`application:didFinishLaunchingWithOptions:` to always return `YES` and should use this method instead.
450450
*/
451-
- (void)accountForFacebookSDKPreventingAppLaunch;
451+
- (void)accountForFacebookSDKPreventingAppLaunch __attribute__((deprecated(("Please ensure application:didFinishLaunchingWithOptions: always returns YES/true instead of using this method. It will be removed in a future release."))));
452452

453453
- (void)suppressWarningLogs;
454454

@@ -468,6 +468,8 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
468468

469469
- (void)resumeInit;
470470

471+
- (void)setInstallRequestDelay:(NSInteger)installRequestDelay;
472+
471473
#pragma mark - Session Item methods
472474

473475
///--------------------

src/ios/dependencies/Branch-SDK/Branch.m

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ - (void)resumeInit {
271271
}
272272
}
273273

274+
- (void)setInstallRequestDelay:(NSInteger)installRequestDelay {
275+
self.preferenceHelper.installRequestDelay = installRequestDelay;
276+
}
274277

275278
#pragma mark - InitSession Permutation methods
276279

@@ -336,14 +339,15 @@ - (void)initSessionWithLaunchOptions:(NSDictionary *)options isReferrable:(BOOL)
336339
}
337340

338341
if ([BNCSystemObserver getOSVersion].integerValue >= 8) {
339-
if (![options objectForKey:UIApplicationLaunchOptionsURLKey] && ![options objectForKey:UIApplicationLaunchOptionsUserActivityDictionaryKey]) {
342+
if (![options.allKeys containsObject:UIApplicationLaunchOptionsURLKey] && ![options.allKeys containsObject:UIApplicationLaunchOptionsUserActivityDictionaryKey]) {
340343
// If Facebook SDK is present, call deferred app link check here
341344
if (![self checkFacebookAppLinks]) {
342345
[self initUserSessionAndCallCallback:YES];
343346
}
344347
}
345-
else if ([options objectForKey:UIApplicationLaunchOptionsUserActivityDictionaryKey]) {
348+
else if ([options.allKeys containsObject:UIApplicationLaunchOptionsUserActivityDictionaryKey]) {
346349
if (self.accountForFacebookSDK) {
350+
// does not work in Swift, because Objective-C to Swift interop is bad
347351
id activity = [[options objectForKey:UIApplicationLaunchOptionsUserActivityDictionaryKey] objectForKey:@"UIApplicationLaunchOptionsUserActivityKey"];
348352
if (activity && [activity isKindOfClass:[NSUserActivity class]]) {
349353
[self continueUserActivity:activity];
@@ -353,7 +357,7 @@ - (void)initSessionWithLaunchOptions:(NSDictionary *)options isReferrable:(BOOL)
353357
self.preferenceHelper.shouldWaitForInit = YES;
354358
}
355359
}
356-
else if (![options objectForKey:UIApplicationLaunchOptionsURLKey]) {
360+
else if (![options.allKeys containsObject:UIApplicationLaunchOptionsURLKey]) {
357361
[self initUserSessionAndCallCallback:YES];
358362
}
359363
}
@@ -1364,7 +1368,7 @@ + (NSString *)bundleIdentifier {
13641368
}
13651369

13661370
+ (NSString *)kitDisplayVersion {
1367-
return @"0.12.10";
1371+
return @"0.12.11";
13681372
}
13691373

13701374
@end

src/ios/dependencies/Branch-SDK/Requests/BranchInstallRequest.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key ca
3636
params[BRANCH_REQUEST_KEY_DEBUG] = @(preferenceHelper.isDebug);
3737

3838
if ([[BNCStrongMatchHelper strongMatchHelper] shouldDelayInstallRequest]) {
39-
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(750 * NSEC_PER_MSEC)), dispatch_get_main_queue(), ^{
39+
NSInteger delay = 750;
40+
if (preferenceHelper.installRequestDelay) {
41+
delay = preferenceHelper.installRequestDelay;
42+
}
43+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_MSEC)), dispatch_get_main_queue(), ^{
4044
[serverInterface postRequest:params url:[preferenceHelper getAPIURL:BRANCH_REQUEST_ENDPOINT_INSTALL] key:key callback:callback];
4145
});
4246
}
Binary file not shown.

src/ios/dependencies/Branch.framework/Versions/A/Headers/BNCConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef Branch_SDK_Config_h
1010
#define Branch_SDK_Config_h
1111

12-
#define SDK_VERSION @"0.12.10"
12+
#define SDK_VERSION @"0.12.11"
1313

1414
#define BNC_PROD_ENV
1515
//#define BNC_STAGE_ENV

src/ios/dependencies/Branch.framework/Versions/A/Headers/BNCPreferenceHelper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
@property (assign, nonatomic) NSTimeInterval timeout;
3737
@property (strong, nonatomic) NSString *externalIntentURI;
3838
@property (strong, nonatomic) NSMutableDictionary *savedAnalyticsData;
39+
@property (assign, nonatomic) NSInteger installRequestDelay;
3940

4041
+ (BNCPreferenceHelper *)preferenceHelper;
4142

src/ios/dependencies/Branch.framework/Versions/A/Headers/Branch.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
448448
but that UL is not a Facebook UL. Some developers prefer not to modify
449449
`application:didFinishLaunchingWithOptions:` to always return `YES` and should use this method instead.
450450
*/
451-
- (void)accountForFacebookSDKPreventingAppLaunch;
451+
- (void)accountForFacebookSDKPreventingAppLaunch __attribute__((deprecated(("Please ensure application:didFinishLaunchingWithOptions: always returns YES/true instead of using this method. It will be removed in a future release."))));
452452

453453
- (void)suppressWarningLogs;
454454

@@ -468,6 +468,8 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
468468

469469
- (void)resumeInit;
470470

471+
- (void)setInstallRequestDelay:(NSInteger)installRequestDelay;
472+
471473
#pragma mark - Session Item methods
472474

473475
///--------------------

0 commit comments

Comments
 (0)