Skip to content

Commit 66790e9

Browse files
[EMT-2556] Updating iOS SDK version and exposing Javascript functions (#1072)
* first update with SDK versions and new Javascript functions * second update with removed validation logic * removed android update from Changelog * further updated changelog with new methods * fixed index.d.ts file * updated the RNBranch.m methods to call Branch class * fixed non-null error * added validation for Javascript methods * adding further platform validations --------- Co-authored-by: bboothe-branch <[email protected]>
1 parent 89a0364 commit 66790e9

File tree

10 files changed

+13737
-17
lines changed

10 files changed

+13737
-17
lines changed

ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2025-10-20 Version 6.9.0
2+
- Update iOS SDK to 3.13.3
3+
- Exposed new method `setAnonID` to set Meta anonymous ID
4+
- Exposed new method `setODMInfo` to set ODM info
5+
- Exposed new method `setSDKWaitTimeForThirdPartyAPIs` to setSDKWaitTimeforThirdPartyAPIs
6+
17
2025-07-22 Version 6.8.0
28
- Update iOS SDK to 3.12.2
39
- Update Android SDK to 5.19.0

branchreactnativetestbed/ios/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- boost (1.76.0)
3-
- BranchSDK (3.9.0)
3+
- BranchSDK (3.12.2)
44
- CocoaAsyncSocket (7.6.5)
55
- DoubleConversion (1.1.6)
66
- FBLazyVector (0.72.9)
@@ -376,8 +376,8 @@ PODS:
376376
- React-jsinspector (0.72.9)
377377
- React-logger (0.72.9):
378378
- glog
379-
- react-native-branch (6.5.0-alpha.3):
380-
- BranchSDK (= 3.9.0)
379+
- react-native-branch (6.9.0-alpha.0):
380+
- BranchSDK (= 3.12.2)
381381
- React-Core
382382
- React-NativeModulesApple (0.72.9):
383383
- hermes-engine
@@ -662,7 +662,7 @@ EXTERNAL SOURCES:
662662

663663
SPEC CHECKSUMS:
664664
boost: 7dcd2de282d72e344012f7d6564d024930a6a440
665-
BranchSDK: caa0aad74d39bcd08573661d13ae0821feecdada
665+
BranchSDK: db2c2ffa5b85ad3e202f73393ca794878afd3c52
666666
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
667667
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
668668
FBLazyVector: dc178b8748748c036ef9493a5d59d6d1f91a36ce
@@ -695,7 +695,7 @@ SPEC CHECKSUMS:
695695
React-jsiexecutor: 5a169b1dd1abad06bed40ab7e1aca883c657d865
696696
React-jsinspector: 54205b269da20c51417e0fc02c4cde9f29a4bf1a
697697
React-logger: f42d2f2bc4cbb5d19d7c0ce84b8741b1e54e88c8
698-
react-native-branch: fa9884e4e783d2e65ae951aa6d756da2dc5060b9
698+
react-native-branch: 5ad83cec5616ca5e3b835b1b342f296daa860c46
699699
React-NativeModulesApple: 9f72feb8a04020b32417f768a7e1e40eec91fef4
700700
React-perflogger: cb433f318c6667060fc1f62e26eb58d6eb30a627
701701
React-RCTActionSheet: 0af3f8ac067e8a1dde902810b7ad169d0a0ec31e
@@ -719,4 +719,4 @@ SPEC CHECKSUMS:
719719

720720
PODFILE CHECKSUM: c898504490632400eb01d1b1cd6fd39bceabca1f
721721

722-
COCOAPODS: 1.16.2
722+
COCOAPODS: 1.11.3

branchreactnativetestbed/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

branchreactnativetestbed/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"react": "18.2.0",
1414
"react-native": "0.72.9",
15-
"react-native-branch": "6.8.0-beta.0"
15+
"react-native-branch": "6.9.0-alpha.0"
1616
},
1717
"devDependencies": {
1818
"@babel/core": "^7.20.0",

ios/RNBranch.m

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,4 +769,30 @@ - (CGFloat) colorComponentFrom: (NSString *) string start: (NSUInteger) start le
769769
[[Branch getInstance] validateSDKIntegration];
770770
}
771771

772+
#pragma mark setSDKWaitTimeForThirdPartyAPIs
773+
RCT_EXPORT_METHOD(setSDKWaitTimeForThirdPartyAPIs:(double)waitTime) {
774+
[Branch setSDKWaitTimeForThirdPartyAPIs: waitTime];
775+
}
776+
777+
#pragma mark setAnonID
778+
RCT_EXPORT_METHOD(setAnonID:(NSString *)anonID) {
779+
[Branch setAnonID: anonID];
780+
}
781+
782+
#pragma mark setODMInfo
783+
RCT_EXPORT_METHOD(setODMInfo:(NSString *)odmInfo
784+
andFirstOpenTimestamp:(NSNumber * __nonnull)firstOpenTimestamp) {
785+
786+
NSDate *firstOpenDate = nil;
787+
788+
// CRASH GUARD: This is mandatory. We only convert the timestamp if the NSNumber object is valid.
789+
if (firstOpenTimestamp) {
790+
// NSTimeInterval is a double in seconds, so we divide the incoming milliseconds by 1000.0
791+
NSTimeInterval timeInSeconds = [firstOpenTimestamp doubleValue] / 1000.0;
792+
firstOpenDate = [NSDate dateWithTimeIntervalSince1970:timeInSeconds];
793+
}
794+
795+
[Branch setODMInfo:odmInfo andFirstOpenTimestamp:firstOpenDate];
796+
}
797+
772798
@end

0 commit comments

Comments
 (0)