-
Notifications
You must be signed in to change notification settings - Fork 243
Description
Describe the bug
When no URI scheme has been set on the dashboard and an URI scheme has been set in info.plist, running Branch.getInstance().validateSDKIntegration() will cause the URI validation alert to claim that the client scheme matches the server scheme:
✅ URI Scheme matches:
'<null>'
It looks like the validator is actually using a check between the client bundle ID and the server bundle ID to construct this part of the alert message:
https://github.com/BranchMetrics/ios-branch-sdk-spm/blob/3.7.0/Sources/BranchSDK/Branch%2BValidator.m#L77
The URI scheme validation itself seems to be working correctly when fetching <null> from the dashboard. However, I'm also getting an index error from a Staging version of our app from this part of the validation process which fetches an empty string from the server instead of <null>, which fails here:
https://github.com/BranchMetrics/ios-branch-sdk-spm/blob/3.7.0/Sources/BranchSDK/BNCSystemObserver.m#L160
This should probably be handled gracefully.
Steps to reproduce
- Set a URI scheme in an iOS project's
info.plist, and no scheme on the Branch Dashboard. - Run the project w/
Branch.getInstance().validateSDKIntegration() - Observe that the Branch Validation Alert popup in-app shows a successful URI scheme validation with a match on
'<null>'
Expected behavior
I expect the Branch Validation Alert displays that the URI scheme validation failed.
And sidebar re: index error, I expect that case to be handled gracefully as an error, at the very least by adding a check and return false around here: https://github.com/BranchMetrics/ios-branch-sdk-spm/blob/3.7.0/Sources/BranchSDK/BNCSystemObserver.m#L160
SDK Version
3.7.0
XCode Version
16.1
Device
iPhone 16
OS
18.0
Additional Information/Context
No response