Skip to content
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

iOS Integration Validator Bugfix (for client<>server URI scheme check) #1311

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

rob-gioia-branch
Copy link
Contributor

Reference

No ticket - this was confusing clients, so I wanted to fix this.

Summary

Currently, our iOS integration validator would check for the Branch URI scheme as the first URI scheme in the list (apart from a few like facebook, etc... that are hardcoded for it to skip when checking). The new code fixes this issue by looping through each of the URI schemes so that Branch doesn't have to be the first URI scheme in the list for the integration validator to pass.

Motivation

This was confusing clients.

To see an example of this issue, please view the Master ProServe iOS Branch example-of-uri-scheme-bug (Link: https://github.com/BranchMetrics/Master-Proserve-iOS/tree/example-of-uri-scheme-bug)

I added psmaster0, an incorrect URI scheme, at index 0.

Screenshot 2023-10-23 at 10 10 46 AM

This caused the integration validator check for the URI scheme to fail, even though the correct URI scheme of psmaster was in the list right below it.

Screenshot 2023-10-20 at 4 21 03 PM

With the changes in this PR, the issue is fixed by checking if the correct URI scheme is present anywhere in the list

Screenshot 2023-10-23 at 10 04 46 AM

Type Of Change

  • Bug fix (non-breaking change which fixes an issue)

Testing Instructions

To test this, do one of the following:

  • Test the Master ProServe iOS branch I put together where I recreated the bug and then used this sample code to fix it (Link: https://github.com/BranchMetrics/Master-Proserve-iOS/tree/integration-validator-uri-fix-test)
  • Utilize your own sample app. Add an incorrect URI scheme (one other than the one you have on your Branch dashboard) as Item 0 in the list. If you run the integration validator, notice the fail message. Then add the code from this PR and observe the issue is fixed.

cc @BranchMetrics/saas-sdk-devs for visibility.

… be the first URI scheme in the list for the integration validator to pass

Looped through each of the URI schemes so that Branch doesn't have to be the first URI scheme in the list for the integration validator to pass
@ahmednawar
Copy link
Contributor

@rob-gioia-branch is this PR still valid? Do you need someone to review?

@rob-gioia-branch
Copy link
Contributor Author

@rob-gioia-branch is this PR still valid? Do you need someone to review?

@ahmednawar yes it is still valid, would be great if we could get someone to review it. Thanks!

@ahmednawar
Copy link
Contributor

@NidhiDixit09 can you please review this PR?

Copy link
Collaborator

@NidhiDixit09 NidhiDixit09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have validated fix with my test app and adding some random url schemes. Fix looks good to me.

@rob-gioia-branch
Copy link
Contributor Author

I have validated fix with my test app and adding some random url schemes. Fix looks good to me.

Thanks @NidhiDixit09 ! Do you have recommendations on fixing the merge conflicts so that this can be merge into master? Thanks!

cc: @ahmednawar

Fix for iOS integration validator. This fix will loop through each of the URI schemes while matching.
@NidhiDixit09
Copy link
Collaborator

@rob-gioia-branch I have merged master into this branch and we dont have any conflicts now.

@rob-gioia-branch rob-gioia-branch merged commit 34681fe into master Jun 4, 2024
11 of 12 checks passed
@rob-gioia-branch rob-gioia-branch deleted the integration-validator-uri-scheme-fix branch June 4, 2024 19:47
@rob-gioia-branch
Copy link
Contributor Author

@rob-gioia-branch I have merged master into this branch and we dont have any conflicts now.

Merged, thanks @NidhiDixit09 ! I appreciate the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants