Skip to content

Commit 1d16f03

Browse files
committed
Release 3.4.0
1 parent 2cea6b7 commit 1d16f03

File tree

10 files changed

+34
-15
lines changed

10 files changed

+34
-15
lines changed

Branch-TestBed/Branch-SDK-Tests/NSMutableDictionaryBranchTests.m

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,24 +363,27 @@ - (void)testGetBooleanForKey {
363363
@"bool2" : @(0),
364364
@"bool3" : @"1", // valid bool
365365
@"bool4" : @"0", // valid bool
366-
@"bool5" : @"YES", // invalid bool, server expects a number. treated as false
367-
@"bool6" : @"NO", // invalid bool, server expects a number. treated as false
366+
@"bool5" : @"YES",
367+
@"bool6" : @"NO",
368368
@"bool7" : @(-1), // all non-zero numbers are true
369369
@"bool8" : @(1234), // all non-zero numbers are true
370-
@"bool9" : @[ ] // invalid bool, treated as false
371-
370+
@"bool9" : @[ ], // invalid bool, treated as false
371+
@"bool10": @"true",
372+
@"bool11": @"false"
372373
};
373374
NSMutableDictionary *dict = [tmp mutableCopy];
374375

375376
XCTAssertTrue([dict bnc_getBooleanForKey:@"bool1"]);
376377
XCTAssertFalse([dict bnc_getBooleanForKey:@"bool2"]);
377378
XCTAssertTrue([dict bnc_getBooleanForKey:@"bool3"]);
378379
XCTAssertFalse([dict bnc_getBooleanForKey:@"bool4"]);
379-
XCTAssertFalse([dict bnc_getBooleanForKey:@"bool5"]);
380+
XCTAssertTrue([dict bnc_getBooleanForKey:@"bool5"]);
380381
XCTAssertFalse([dict bnc_getBooleanForKey:@"bool6"]);
381382
XCTAssertTrue([dict bnc_getBooleanForKey:@"bool7"]);
382383
XCTAssertTrue([dict bnc_getBooleanForKey:@"bool8"]);
383384
XCTAssertFalse([dict bnc_getBooleanForKey:@"bool9"]);
385+
XCTAssertTrue([dict bnc_getBooleanForKey:@"bool10"]);
386+
XCTAssertFalse([dict bnc_getBooleanForKey:@"bool11"]);
384387
}
385388

386389
@end

BranchSDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "BranchSDK"
3-
s.version = "3.3.0"
3+
s.version = "3.4.0"
44
s.summary = "Create an HTTP URL for any piece of content in your app"
55
s.description = <<-DESC
66
- Want the highest possible conversions on your sharing feature?

BranchSDK.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,7 @@
19741974
"@executable_path/Frameworks",
19751975
"@loader_path/Frameworks",
19761976
);
1977-
MARKETING_VERSION = 3.3.0;
1977+
MARKETING_VERSION = 3.4.0;
19781978
OTHER_LDFLAGS = (
19791979
"-weak_framework",
19801980
LinkPresentation,
@@ -2009,7 +2009,7 @@
20092009
"@executable_path/Frameworks",
20102010
"@loader_path/Frameworks",
20112011
);
2012-
MARKETING_VERSION = 3.3.0;
2012+
MARKETING_VERSION = 3.4.0;
20132013
OTHER_LDFLAGS = (
20142014
"-weak_framework",
20152015
LinkPresentation,
@@ -2215,7 +2215,7 @@
22152215
"@loader_path/Frameworks",
22162216
);
22172217
MACH_O_TYPE = staticlib;
2218-
MARKETING_VERSION = 3.3.0;
2218+
MARKETING_VERSION = 3.4.0;
22192219
OTHER_LDFLAGS = (
22202220
"-weak_framework",
22212221
LinkPresentation,
@@ -2254,7 +2254,7 @@
22542254
"@loader_path/Frameworks",
22552255
);
22562256
MACH_O_TYPE = staticlib;
2257-
MARKETING_VERSION = 3.3.0;
2257+
MARKETING_VERSION = 3.4.0;
22582258
OTHER_LDFLAGS = (
22592259
"-weak_framework",
22602260
LinkPresentation,
@@ -2291,7 +2291,7 @@
22912291
"@executable_path/Frameworks",
22922292
"@loader_path/Frameworks",
22932293
);
2294-
MARKETING_VERSION = 3.3.0;
2294+
MARKETING_VERSION = 3.4.0;
22952295
OTHER_LDFLAGS = (
22962296
"-weak_framework",
22972297
LinkPresentation,
@@ -2326,7 +2326,7 @@
23262326
"@executable_path/Frameworks",
23272327
"@loader_path/Frameworks",
23282328
);
2329-
MARKETING_VERSION = 3.3.0;
2329+
MARKETING_VERSION = 3.4.0;
23302330
OTHER_LDFLAGS = (
23312331
"-weak_framework",
23322332
LinkPresentation,

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Branch iOS SDK Change Log
22

3+
v.3.4.0
4+
- Added support for setting the Branch API base URL through the `branch.json` file.
5+
36
v.3.3.0
47
- SDK behavior change to fix a race condition when opening a closed app with a link. In some apps, this race condition could cause the occasional loss of link data.
58

Sources/BranchSDK/BNCConfig.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "BNCConfig.h"
1010

11-
NSString * const BNC_SDK_VERSION = @"3.3.0";
11+
NSString * const BNC_SDK_VERSION = @"3.4.0";
1212
NSString * const BNC_LINK_URL = @"https://bnc.lt";
1313
NSString * const BNC_CDN_URL = @"https://cdn.branch.io";
1414

Sources/BranchSDK/Branch.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ - (id)initWithInterface:(BNCServerInterface *)interface
235235
BranchJsonConfig *config = BranchJsonConfig.instance;
236236
self.deferInitForPluginRuntime = config.deferInitForPluginRuntime;
237237

238+
if (config.apiUrl) {
239+
[Branch setAPIUrl:config.apiUrl];
240+
}
241+
238242
if (config.enableLogging) {
239243
[self enableLogging];
240244
}

Sources/BranchSDK/BranchJsonConfig.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
NSString * _Nonnull const BranchJsonConfigDeferInitForPluginRuntimeOption = @"deferInitForPluginRuntime";
1818
NSString * _Nonnull const BranchJsonConfigEnableLogging = @"enableLogging";
1919
NSString * _Nonnull const BranchJsonConfigCheckPasteboardOnInstall = @"checkPasteboardOnInstall";
20+
NSString * _Nonnull const BranchJsonConfigAPIUrl = @"apiUrl";
21+
2022

2123
@interface BranchJsonConfig()
2224
@property (nonatomic, strong) NSDictionary *configuration;
@@ -161,6 +163,11 @@ - (NSString *)testKey
161163
return self[BranchJsonConfigTestKeyOption];
162164
}
163165

166+
- (NSString *)apiUrl
167+
{
168+
return self[BranchJsonConfigAPIUrl];
169+
}
170+
164171
- (id)objectForKey:(NSString *)key
165172
{
166173
return self.configuration[key];

Sources/BranchSDK/NSMutableDictionary+Branch.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ - (BOOL)bnc_getBooleanForKey:(NSString *)key {
192192
returnValue = [number boolValue];
193193
} else if ([tmp isKindOfClass:[NSString class]]) {
194194
NSString *numberAsString = (NSString *)tmp;
195-
returnValue = [numberAsString doubleValue];
195+
returnValue = [numberAsString boolValue];
196196
}
197197

198198
return returnValue;

Sources/BranchSDK/Private/BranchJsonConfig.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ extern NSString * _Nonnull const BranchJsonConfigUseTestInstanceOption;
1616
extern NSString * _Nonnull const BranchJsonConfigDeferInitForPluginRuntimeOption;
1717
extern NSString * _Nonnull const BranchJsonConfigEnableLogging;
1818
extern NSString * _Nonnull const BranchJsonConfigCheckPasteboardOnInstall;
19+
extern NSString * _Nonnull const BranchJsonConfigAPIUrl;
1920

2021
@interface BranchJsonConfig : NSObject
2122

@@ -29,6 +30,7 @@ extern NSString * _Nonnull const BranchJsonConfigCheckPasteboardOnInstall;
2930
@property (nonatomic, readonly, assign) BOOL deferInitForPluginRuntime;
3031
@property (nonatomic, readonly, assign) BOOL enableLogging;
3132
@property (nonatomic, readonly, assign) BOOL checkPasteboardOnInstall;
33+
@property (nonatomic, readonly, nullable, copy) NSString *apiUrl;
3234

3335
- (nullable id)objectForKey:(NSString * _Nonnull)key;
3436
- (nullable id)objectForKeyedSubscript:(NSString * _Nonnull)key;

scripts/version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Options:
3030
USAGE
3131
}
3232

33-
version=3.3.0
33+
version=3.4.0
3434
prev_version="$version"
3535

3636
if (( $# == 0 )); then

0 commit comments

Comments
 (0)