Skip to content

Commit 1ae07db

Browse files
authored
🤝 Merge pull request #19 from Instabug/hotfix/setWelcomeMessage_api_mapping
Hotfix/set welcome message api mapping
2 parents 9403e8e + ca88064 commit 1ae07db

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import Instabug from 'instabug-reactnative';
5151
2. Then initialize it in the `constructor` or `componentWillMount`. This line will let the Instabug SDK work with the default behavior. The SDK will be invoked when the device is shaken. You can customize this behavior through the APIs (You can skip this step if you are building an Android app only).
5252

5353
```javascript
54-
Instabug.startWithToken('IOS_APP_TOKEN', Instabug.invocationEvent.shake);
54+
Instabug.startWithToken('IOS_APP_TOKEN', [Instabug.invocationEvent.shake]);
5555
```
5656
3. Open `android/app/src/main/java/[...]/MainApplication.java`
5757
You should find the getPackages method looks like the following snippet. You just need to add your Android app token (You can skip this step if you are building an iOS app only). You can change the invocation event from here, simply by replacing the `"shake"` with any of the following `"button"`, `"none"`, `"screenshot"`, or `"swipe"`. You can change the primary color by replacing the `"#1D82DC"` with any colour of your choice.
@@ -99,13 +99,13 @@ pod install
9999
react-native link instabug-reactnative
100100
```
101101
102-
### Upgrading from 2.0.x
102+
### Upgrading from 2.0.x and from 8.0.3
103103
104-
When upgrading from 2.0.x to 2.1.x, please make sure you do the following steps:
104+
When upgrading from 2.0.x to 2.1.x or from 8.0.3 to 8.x, please make sure you do the following steps:
105105
106106
1. Unlink the project before upgrading to the new version
107107
```bash
108-
reacy-native unlink instabug-reactnative
108+
react-native unlink instabug-reactnative
109109
```
110110
111111
2. Install the new version by running
@@ -137,7 +137,7 @@ If your app doesn’t already access the microphone or photo library, we recomme
137137
For more details about the supported APIs and how to use them, you can check our [**Documentation**](https://docs.instabug.com/docs/react-native-overview).
138138
139139
140-
## Contact US
140+
## Contact Us
141141
If you have any questions or feedback don't hesitate to get in touch. You can reach us at any time through **[email protected]**.
142142
143143

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ public void invokeWithInvocationMode(String invocationMode) {
247247
} else {
248248
mode = InstabugInvocationMode.PROMPT_OPTION;
249249
}
250-
251250
try {
252251
mInstabug.invoke(mode);
253252
} catch (Exception e) {
@@ -1649,16 +1648,16 @@ public void setWelcomeMessageMode(String welcomeMessageMode) {
16491648
try {
16501649
switch (welcomeMessageMode) {
16511650
case WELCOME_MESSAGE_MODE_LIVE:
1652-
Instabug.showWelcomeMessage(WelcomeMessage.State.LIVE);
1651+
Instabug.setWelcomeMessageState(WelcomeMessage.State.LIVE);
16531652
break;
16541653
case WELCOME_MESSAGE_MODE_BETA:
1655-
Instabug.showWelcomeMessage(WelcomeMessage.State.BETA);
1654+
Instabug.setWelcomeMessageState(WelcomeMessage.State.BETA);
16561655
break;
16571656
case WELCOME_MESSAGE_MODE_DISABLED:
1658-
Instabug.showWelcomeMessage(WelcomeMessage.State.DISABLED);
1657+
Instabug.setWelcomeMessageState(WelcomeMessage.State.DISABLED);
16591658
break;
16601659
default:
1661-
Instabug.showWelcomeMessage(WelcomeMessage.State.LIVE);
1660+
Instabug.setWelcomeMessageState(WelcomeMessage.State.LIVE);
16621661
}
16631662

16641663
} catch (Exception e) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "instabug-reactnative",
3-
"version": "2.13.1",
3+
"version": "8.0.7",
44
"description": "React Native plugin for integrating the Instabug SDK",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)