Skip to content

Commit 231fb5c

Browse files
committed
Fix init params order
1 parent bbb7a95 commit 231fb5c

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void run() {
118118
* @param invocationEventValues The events that invoke the SDK's UI.
119119
*/
120120
@ReactMethod
121-
public void init(final String token, final ReadableArray invocationEventValues, final String codePushLabel, final String logLevel) {
121+
public void init(final String token, final ReadableArray invocationEventValues, final String logLevel, final String codePushLabel) {
122122
MainThreadHandler.runOnMainThread(new Runnable() {
123123
@Override
124124
public void run() {
@@ -132,8 +132,8 @@ public void run() {
132132

133133
new Instabug.Builder(getCurrentActivity().getApplication(), token)
134134
.setInvocationEvents(parsedInvocationEvents.toArray(new InstabugInvocationEvent[0]))
135-
.setCodePushVersion(codePushLabel)
136135
.setSdkDebugLogsLevel(parsedLogLevel)
136+
.setCodePushVersion(codePushLabel)
137137
.build();
138138

139139
// Temporarily disabling APM hot launches

examples/default/ios/InstabugTests/InstabugSampleTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ - (void)testInit {
7272
XCTestExpectation *expectation = [self expectationWithDescription:@"Testing [Instabug init]"];
7373

7474
OCMStub([mock startWithToken:appToken invocationEvents:floatingButtonInvocationEvent]);
75-
[self.instabugBridge init:appToken invocationEvents:invocationEvents codePushLabel:codePushLabel debugLogsLevel:sdkDebugLogsLevel];
75+
[self.instabugBridge init:appToken invocationEvents:invocationEvents debugLogsLevel:sdkDebugLogsLevel codePushLabel:codePushLabel];
7676

7777
[[NSRunLoop mainRunLoop] performBlock:^{
7878
OCMVerify([mock setCodePushVersion:codePushLabel]);

ios/RNInstabug/InstabugReactBridge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
- (void)setEnabled:(BOOL)isEnabled;
2929

30-
- (void)init:(NSString *)token invocationEvents:(NSArray *)invocationEventsArray codePushLabel:(NSString *)codePushLabel debugLogsLevel:(IBGSDKDebugLogsLevel)sdkDebugLogsLevel;
30+
- (void)init:(NSString *)token invocationEvents:(NSArray *)invocationEventsArray debugLogsLevel:(IBGSDKDebugLogsLevel)sdkDebugLogsLevel codePushLabel:(NSString *)codePushLabel;
3131

3232
- (void)setUserData:(NSString *)userData;
3333

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ - (dispatch_queue_t)methodQueue {
3838
Instabug.enabled = isEnabled;
3939
}
4040

41-
RCT_EXPORT_METHOD(init:(NSString *)token invocationEvents:(NSArray*)invocationEventsArray codePushLabel:(NSString *)codePushLabel debugLogsLevel:(IBGSDKDebugLogsLevel)sdkDebugLogsLevel) {
41+
RCT_EXPORT_METHOD(init:(NSString *)token invocationEvents:(NSArray*)invocationEventsArray debugLogsLevel:(IBGSDKDebugLogsLevel)sdkDebugLogsLevel codePushLabel:(NSString *)codePushLabel) {
4242
SEL setPrivateApiSEL = NSSelectorFromString(@"setCurrentPlatform:");
4343
if ([[Instabug class] respondsToSelector:setPrivateApiSEL]) {
4444
NSInteger *platform = IBGPlatformReactNative;

src/models/InstabugConfig.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ export interface InstabugConfig {
1010
* An array of events that invoke the SDK's UI.
1111
*/
1212
invocationEvents: invocationEvent[] | InvocationEvent[];
13+
/**
14+
* An optional LogLevel to indicate the verbosity of SDK logs. Default is Error.
15+
*/
16+
debugLogsLevel?: LogLevel;
1317
/**
1418
* An optional CodePush version label. Default is an empty string.
1519
* The version name and code are read from the native files
1620
* build.gradle and Info.plist for Android and iOS respectively.
1721
*/
1822
codePushLabel?: string;
19-
/**
20-
* An optional LogLevel to indicate the verbosity of SDK logs. Default is Error.
21-
*/
22-
debugLogsLevel?: LogLevel;
2323
}

0 commit comments

Comments
 (0)