Sdk 1934 add public method for branch api base url #1262
Merged
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-1934 -- Expose a public method to change the Branch API base url.
Summary
Added following APIs in BranchPluginSupport class for setting up Server and CDN Urls-
Note: If url passed is not valid or it doesn't start with "http" or "https" then default Urls defined BNCConfig are used.
Type Of Change
Testing Instructions
==> Run Unit tests. Following Tests are added for above APIs -
Note: Tests for Null url are not added. Because of non_null attribute assigned to class BranchPluginSupport, API was giving warning on passing Null param. So I removed tests for null url.
==> In any test app, set URL https://dashboard.stage.branch.io and then check in Server requests logs, if this new url is used.
[BranchPluginSupport setAPIUrl:@"https://dashboard.stage.branch.io"];cc @BranchMetrics/saas-sdk-devs for visibility.