Skip to content

Commit e7482f5

Browse files
authored
Merge pull request #216 from BranchMetrics/update-ios-lib-12-10
chore: Update iOS library and changlog
2 parents 10f13bd + 3ea9353 commit e7482f5

File tree

10 files changed

+37
-19
lines changed

10 files changed

+37
-19
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
All notable changes to the Branch Web SDK will be documented here.
33
The Branch Web SDK adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [v2.2.1] - 2016-09-15
6+
- Updated iOS library to v 0.12.10
7+
- Support for iOS extensions (iMessage apps)
8+
- New mechanism for incorporating the Android library (build.gradle extension)
9+
- Added support for routing non Branch links (`NonBranchLinkHandler`)
10+
- Number of small fixes and tweaks
11+
512
## [v2.1.0] - 2016-05-20
613

714
We've been frantically addressing all of the discrepancies and bugs over the last couple months. This version marks a stable update that should have resolved most of the issues.

plugin.template.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SOFTWARE.
2626
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
2727
xmlns:android="http://schemas.android.com/apk/res/android"
2828
id="io.branch.sdk"
29-
version="2.1.10">
29+
version="2.2.1">
3030

3131
<name>branch-cordova-sdk</name>
3232
<description>Branch SDK Plugin</description>

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SOFTWARE.
2626
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
2727
xmlns:android="http://schemas.android.com/apk/res/android"
2828
id="io.branch.sdk"
29-
version="2.2.0">
29+
version="2.2.1">
3030

3131
<name>branch-cordova-sdk</name>
3232
<description>Branch SDK Plugin</description>

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.9"
12+
#define SDK_VERSION @"0.12.10"
1313

1414
#define BNC_PROD_ENV
1515
//#define BNC_STAGE_ENV

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,8 @@ - (BOOL)continueUserActivity:(NSUserActivity *)userActivity {
410410
//check to see if a browser activity needs to be handled
411411
if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
412412
self.preferenceHelper.universalLinkUrl = [userActivity.webpageURL absoluteString];
413-
[self initUserSessionAndCallCallback:YES];
414413
self.preferenceHelper.shouldWaitForInit = NO;
414+
[self initUserSessionAndCallCallback:YES];
415415

416416
id branchUniversalLinkDomains = [self.preferenceHelper getBranchUniversalLinkDomains];
417417
if ([branchUniversalLinkDomains isKindOfClass:[NSString class]] && [[userActivity.webpageURL absoluteString] containsString:branchUniversalLinkDomains]) {
@@ -448,8 +448,8 @@ - (BOOL)continueUserActivity:(NSUserActivity *)userActivity {
448448
}
449449
}
450450

451-
[self initUserSessionAndCallCallback:YES];
452451
self.preferenceHelper.shouldWaitForInit = NO;
452+
[self initUserSessionAndCallCallback:YES];
453453

454454
return spotlightIdentifier != nil;
455455
}
@@ -1165,7 +1165,10 @@ - (void)processNextQueueItem {
11651165
// First, gather all the requests to fail
11661166
NSMutableArray *requestsToFail = [[NSMutableArray alloc] init];
11671167
for (int i = 0; i < self.requestQueue.size; i++) {
1168-
[requestsToFail addObject:[self.requestQueue peekAt:i]];
1168+
BNCServerRequest *request = [self.requestQueue peekAt:i];
1169+
if (request) {
1170+
[requestsToFail addObject:request];
1171+
}
11691172
}
11701173

11711174
// Next, remove all the requests that should not be replayed. Note, we do this before calling callbacks, in case any
@@ -1361,7 +1364,7 @@ + (NSString *)bundleIdentifier {
13611364
}
13621365

13631366
+ (NSString *)kitDisplayVersion {
1364-
return @"0.12.9";
1367+
return @"0.12.10";
13651368
}
13661369

13671370
@end

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ typedef NS_ENUM(NSInteger, ContentIndexMode) {
3838
@property (nonatomic, assign) BOOL automaticallyListOnSpotlight;
3939

4040

41-
- (nullable instancetype)initWithCanonicalIdentifier:(nonnull NSString *)canonicalIdentifier;
42-
- (nullable instancetype)initWithTitle:(nonnull NSString *)title;
41+
- (nonnull instancetype)initWithCanonicalIdentifier:(nonnull NSString *)canonicalIdentifier;
42+
- (nonnull instancetype)initWithTitle:(nonnull NSString *)title;
4343

4444
- (void)addMetadataKey:(nonnull NSString *)key value:(nonnull NSString *)value;
4545

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

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,26 @@ - (void)processResponse:(BNCServerResponse *)response error:(NSError *)error {
4646
NSArray *responseKeys = [response.data allKeys];
4747
NSArray *storedKeys = [currentCreditDictionary allKeys];
4848

49-
if ([responseKeys count]) {
49+
if ([responseKeys count] && ([response.data isKindOfClass:[NSDictionary class]] || [response.data isKindOfClass:[NSMutableDictionary class]])) {
50+
5051
for (NSString *key in response.data) {
51-
NSInteger credits = [response.data[key] integerValue];
52+
if (![key isKindOfClass:[NSString class]]) { continue; }
53+
54+
NSInteger credits = [preferenceHelper getCreditCountForBucket:key];
55+
if (response.data[key] && [response.data[key] respondsToSelector:@selector(integerValue)]) {
56+
credits = [response.data[key] integerValue];
57+
}
5258

53-
BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper preferenceHelper];
54-
if (credits != [preferenceHelper getCreditCountForBucket:key]) {
55-
hasUpdated = YES;
56-
}
59+
BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper preferenceHelper];
60+
if (credits != [preferenceHelper getCreditCountForBucket:key]) {
61+
hasUpdated = YES;
62+
}
5763

58-
[preferenceHelper setCreditCount:credits forBucket:key];
64+
[preferenceHelper setCreditCount:credits forBucket:key];
5965
}
6066
for(NSString *key in storedKeys) {
67+
if (![key isKindOfClass:[NSString class]]) { continue; }
68+
6169
if(![response.data objectForKey:key]) {
6270
[preferenceHelper removeCreditCountForBucket:key];
6371
hasUpdated = YES;
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.9"
12+
#define SDK_VERSION @"0.12.10"
1313

1414
#define BNC_PROD_ENV
1515
//#define BNC_STAGE_ENV

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ typedef NS_ENUM(NSInteger, ContentIndexMode) {
3838
@property (nonatomic, assign) BOOL automaticallyListOnSpotlight;
3939

4040

41-
- (nullable instancetype)initWithCanonicalIdentifier:(nonnull NSString *)canonicalIdentifier;
42-
- (nullable instancetype)initWithTitle:(nonnull NSString *)title;
41+
- (nonnull instancetype)initWithCanonicalIdentifier:(nonnull NSString *)canonicalIdentifier;
42+
- (nonnull instancetype)initWithTitle:(nonnull NSString *)title;
4343

4444
- (void)addMetadataKey:(nonnull NSString *)key value:(nonnull NSString *)value;
4545

0 commit comments

Comments
 (0)