Skip to content

Commit 6031f8c

Browse files
committed
(iOS) Added base url allowing to change the dashboard of bugfender
1 parent 65fbe16 commit 6031f8c

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

bugfender.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ export default {
3131
*/
3232
setApiUrl: apiUrl => Bugfender.setApiUrl(apiUrl),
3333

34+
/**
35+
* Sets the URL of the Bugfender Dashboard
36+
*
37+
* Usage of this function is not necessary in the general use case. Please use exclusively when
38+
* directed from technical support. This method must be called before Bugfender.init().
39+
* @param {string} url - base URL of the Bugfender's dashboard
40+
*/
41+
setBaseURL: baseURL => Bugfender.setBaseURL(baseURL),
42+
3443
/**
3544
* Sets the name for the device. If the Device Name is not set, then the platform standard device name will be automatically sent
3645
*

ios/RNBugfender.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ @implementation RNBugfender
1717
[Bugfender setApiURL:url];
1818
}
1919

20+
RCT_EXPORT_METHOD(setBaseURL:(NSString *)apiUrl)
21+
{
22+
NSURL *url = [NSURL URLWithString:apiUrl];
23+
[Bugfender setBaseURL:url];
24+
}
25+
2026
RCT_EXPORT_METHOD(setForceEnabled:(BOOL)enabled)
2127
{
2228
[Bugfender setForceEnabled:enabled];

0 commit comments

Comments
 (0)