Skip to content

Commit 8b6ada4

Browse files
authored
Merge pull request #547 from BranchMetrics/INTENG-4503-update-native-sdk
SDK-173 update native sdks
2 parents 963edef + 7df49cb commit 8b6ada4

36 files changed

+202
-122
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "branch-cordova-sdk",
33
"description": "Branch Metrics Cordova SDK",
44
"main": "src/index.js",
5-
"version": "3.1.5",
5+
"version": "3.1.6",
66
"homepage": "https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking",
77
"repository": {
88
"type": "git",

plugin.template.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SOFTWARE.
2424
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
2525
xmlns:android="http://schemas.android.com/apk/res/android"
2626
id="branch-cordova-sdk"
27-
version="3.1.5">
27+
version="3.1.6">
2828

2929
<!-- DO NOT EDIT THIS FILE. MAKE ALL CHANGES TO plugin.template.xml INSTEAD -->
3030

plugin.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SOFTWARE.
2424
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
2525
xmlns:android="http://schemas.android.com/apk/res/android"
2626
id="branch-cordova-sdk"
27-
version="3.1.5">
27+
version="3.1.6">
2828

2929
<!-- DO NOT EDIT THIS FILE. MAKE ALL CHANGES TO plugin.template.xml INSTEAD -->
3030

@@ -63,7 +63,8 @@ SOFTWARE.
6363
</config-file>
6464

6565
<source-file src="src/android/io/branch/BranchSDK.java" target-dir="src/io/branch" />
66-
<lib-file src="src/android/dependencies/Branch.jar" />
66+
<source-file src="src/android/dependencies/Branch.aar" target-dir="app/libs" />
67+
<framework src="src/android/dependencies/rules.gradle" custom="true" type="gradleReference" />
6768
</platform>
6869

6970
<!-- iOS -->

src/android/dependencies/Branch.aar

285 KB
Binary file not shown.

src/android/dependencies/Branch.jar

-304 KB
Binary file not shown.

src/android/dependencies/rules.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dependencies {
2+
implementation fileTree(dir: 'libs', include: '*.aar')
3+
}
4+

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ NSArray<BNCCurrency>*_Nonnull BNCCurrencyAllCurrencies(void);
263263
@end
264264

265265

266-
@interface BranchCommerceEventRequest : BNCServerRequest <NSCoding>
266+
@interface BranchCommerceEventRequest : BNCServerRequest <NSSecureCoding>
267267

268268
- (instancetype _Nonnull) initWithCommerceEvent:(BNCCommerceEvent*_Nonnull)commerceEvent
269269
metadata:(NSDictionary*_Nullable)dictionary

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,14 +599,13 @@ - (void)processResponse:(BNCServerResponse*)response
599599
self.completion(dictionary, error);
600600
}
601601

602-
#pragma mark BranchCommerceEventRequest NSCoding
602+
#pragma mark BranchCommerceEventRequest NSSecureCoding
603603

604604
- (instancetype)initWithCoder:(NSCoder *)decoder {
605605
self = [super initWithCoder:decoder];
606606
if (!self) return self;
607-
608-
self.commerceDictionary = [decoder decodeObjectForKey:@"commerceDictionary"];
609-
self.metadata = [decoder decodeObjectForKey:@"metaData"];
607+
self.commerceDictionary = [decoder decodeObjectOfClass:NSDictionary.class forKey:@"commerceDictionary"];
608+
self.metadata = [decoder decodeObjectOfClass:NSDictionary.class forKey:@"metaData"];
610609
return self;
611610
}
612611

@@ -616,4 +615,8 @@ - (void)encodeWithCoder:(NSCoder *)coder {
616615
[coder encodeObject:self.metadata forKey:@"metadata"];
617616
}
618617

618+
+ (BOOL) supportsSecureCoding {
619+
return YES;
620+
}
621+
619622
@end

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include "BNCConfig.h"
1010

11-
NSString * const BNC_API_BASE_URL = @"https://api.branch.io";
12-
BOOL const BNC_API_PINNED = YES;
11+
NSString * const BNC_API_BASE_URL = @"https://api2.branch.io";
12+
BOOL const BNC_API_PINNED = NO;
1313
NSString * const BNC_API_VERSION = @"v1";
1414
NSString * const BNC_LINK_URL = @"https://bnc.lt";
15-
NSString * const BNC_SDK_VERSION = @"0.25.5";
15+
NSString * const BNC_SDK_VERSION = @"0.25.11";

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ extern NSString* BNCWireFormatFromString(NSString *string);
5252
+ (NSString*) stringByPercentDecodingString:(NSString*)string;
5353
+ (NSString*) stringByPercentEncodingStringForQuery:(NSString *)string;
5454

55+
+ (NSString *)sanitizedStringFromString:(NSString *)dirtyString;
5556
+ (NSDictionary *)decodeJsonDataToDictionary:(NSData *)jsonData;
5657
+ (NSDictionary *)decodeJsonStringToDictionary:(NSString *)jsonString;
58+
5759
+ (NSDictionary *)decodeQueryStringToDictionary:(NSString *)queryString;
5860
+ (NSString *)encodeDictionaryToQueryString:(NSDictionary *)dictionary;
5961

0 commit comments

Comments
 (0)