[SDK-2474] Fix for sending URI scheme as universal_link_url #1420
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference
SDK-2474 -- Fix for sending URI schemes as universal_link_urls
Summary
When the app was opened via URI scheme, the SDK was incorrectly setting the
universal_link_url
as that URI. This is because the URI would be passed into the request factory and there wasn't a check for if it was actually a universal link instead of a URI. This would lead to requests incorrectly havingexternal_intent_uri
anduniversal_link_url
be the same value.This change adds a check for if
urlString
contains http or https to confirm its a universal link.Motivation
To avoid having
universal_link_url
wrongly set to a URI.Type Of Change
Testing Instructions
Open your app via a uri scheme (e.g. branchtest://) before and after the change and observe the
external_intent_uri
anduniversal_link_url
fields in the requests to make sure they look correct.cc @BranchMetrics/saas-sdk-devs for visibility.