File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -576,6 +576,12 @@ extern NSString * __nonnull const BNCSpotlightFeature;
576576 */
577577- (void )useEUEndpoints ;
578578
579+ /* *
580+ Sets a custom base URL for all calls to the Branch API.
581+ @param url Base URL that the Branch API will use.
582+ */
583+ + (void )setAPIUrl : (NSString *)url ;
584+
579585/* *
580586 @brief Use the `validateSDKIntegration` method as a debugging aid to assure that you've
581587 integrated the Branch SDK correctly.
Original file line number Diff line number Diff line change @@ -434,6 +434,14 @@ - (void)useEUEndpoints {
434434 [BNCServerAPI sharedInstance ].useEUServers = YES ;
435435}
436436
437+ + (void )setAPIUrl : (NSString *)url {
438+ if ([url hasPrefix: @" http://" ] || [url hasPrefix: @" https://" ] ){
439+ [BNCServerAPI sharedInstance ].customAPIURL = url;
440+ } else {
441+ [[BranchLogger shared ] logWarning: (@" Ignoring invalid custom API URL" )];
442+ }
443+ }
444+
437445- (void )validateSDKIntegration {
438446 [self validateSDKIntegrationCore ];
439447}
You can’t perform that action at this time.
0 commit comments