-
Couldn't load subscription status.
- Fork 209
[EMT-2556] Updating iOS SDK version and exposing Javascript functions #1072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary By MatterAI
🔄 What Changed
🔍 Impact of the ChangeEnsures platform-specific methods are safely gated behind runtime OS checks, preventing unintended behavior or crashes on Android. Improves developer experience by providing clear console warnings instead of silent failures or native exceptions. Complements prior input validation with platform-level defense. 📁 Total Files Changed
🧪 Test Added/RecommendedRecommended
🔒 Security VulnerabilitiesNo security vulnerabilities detected. Platform checks prevent misuse of iOS-only APIs on other platforms, reducing attack surface and improving runtime safety. Combined with prior input validation, the implementation is robust and secure. Caution Package Vulnerabilities
⏳ Estimated code review effortLOW (~7 minutes) Tip Quality Recommendations
♫ Tanka Poem
Sequence DiagramsequenceDiagram
participant JS as JavaScript Layer
participant Platform as Platform.OS
participant Native as iOS Native SDK
JS->>Platform: Check OS
alt OS is not iOS
JS-->>JS: console.warn('[Branch] method is iOS-only')
JS-->>JS: return early
else OS is iOS
JS->>Native: Forward call with validated params
Native-->>JS: Return result or error
end
|
|
Important PR Review SkippedPR review skipped as per the configuration setting. Run a manually review by commenting /matter review 💡Tips to use MatterAICommand List
|
|
Important PR Review SkippedPR review skipped as per the configuration setting. Run a manually review by commenting /matter review 💡Tips to use MatterAICommand List
|
|
Note PR Review SkippedPR review skipped as no relevant changes found due to large diff hunk OR part of a non-reviewable file. 📄Files skipped in review
💡Tips to use MatterAICommand List
|
|
Note PR Review SkippedPR review skipped as no relevant changes found due to large diff hunk OR part of a non-reviewable file. 📄Files skipped in review
💡Tips to use MatterAICommand List
|
|
Important PR Review SkippedPR review skipped as per the configuration setting. Run a manually review by commenting /matter review 💡Tips to use MatterAICommand List
|
|
Important PR Review SkippedPR review skipped as per the configuration setting. Run a manually review by commenting /matter review 💡Tips to use MatterAICommand List
|
|
Important PR Review SkippedPR review skipped as per the configuration setting. Run a manually review by commenting /matter review 💡Tips to use MatterAICommand List
|
|
/matter review-full |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧪 PR Review is completed: PR updates iOS SDK and exposes new JS functions. Key areas reviewed: SDK versioning, native method bridging, and type safety.
Skipped files
ChangeLog.md: Skipped file patternbranchreactnativetestbed/ios/Podfile.lock: Skipped file patternbranchreactnativetestbed/package-lock.json: Skipped file patternpackage-lock.json: File hunk diff too large
⬇️ Low Priority Suggestions (1)
ios/RNBranch.m
Location:
ios/RNBranch.m(Lines 788-788)🟡 Code Quality
Issue: The comment
// CRASH GUARD: This is mandatory. We only convert the timestamp if the NSNumber object is valid.while descriptive, uses informal language (CRASH GUARD) and could be more precise about what constitutes a 'valid'NSNumberin this context (e.g., non-nil, not NaN).Fix: Rephrase for clarity and professionalism, e.g.,
// Safety check: Only convert timestamp if NSNumber is non-nil.Impact: Improves code readability and maintainability
- // CRASH GUARD: This is mandatory. We only convert the timestamp if the NSNumber object is valid. + // Safety check: Only convert timestamp if NSNumber is non-nil. +
|
Important PR Review SkippedPR review skipped as per the configuration setting. Run a manually review by commenting /matter review 💡Tips to use MatterAICommand List
|
|
Important PR Review SkippedPR review skipped as per the configuration setting. Run a manually review by commenting /matter review 💡Tips to use MatterAICommand List
|
Reference
SDK-2556 -- <TITLE>.
Summary
Bumping iOS SDK native version to 3.13.3
Exposing 3 functions
Motivation
Type Of Change
Testing Instructions
cc @BranchMetrics/saas-sdk-devs for visibility.