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

[SDK-2328] Added API URL check for Branch.json #1371

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

nsingh-branch
Copy link
Contributor

Reference

SDK-2328 -- Support setting Branch API URL in Branch.json

Summary

Added a new field to branch.json for setting the Branch API URL. The config check and setAPIUrl call are done in Branch.m's initWithInterface() in the same place as the deferInitForPluginRuntime() and enableLogging() checks.

Motivation

To support setting the API URL in our plugins like React Native.

Type Of Change

  • New feature (non-breaking change which adds functionality)

Testing Instructions

Add "apiUrl": "https://api.branch.io" to a branch.json file and observe the API URL properly change for each request.

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

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 51.17%. Comparing base (1b03a81) to head (84ef9b2).
Report is 12 commits behind head on master.

Files Patch % Lines
Sources/BranchSDK/Branch.m 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1371      +/-   ##
==========================================
- Coverage   51.27%   51.17%   -0.10%     
==========================================
  Files          66       66              
  Lines       10092    10098       +6     
  Branches     3697     3703       +6     
==========================================
- Hits         5175     5168       -7     
- Misses       4654     4661       +7     
- Partials      263      269       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@echo-branch echo-branch left a comment

Choose a reason for hiding this comment

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

Code change looks good. Bit disappointing that there's no existing tests around this class, let's make a follow up ticket to add tests.

@nsingh-branch nsingh-branch merged commit 0e1bedb into master Mar 29, 2024
14 checks passed
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.

2 participants