Skip to content

Commit a16dc95

Browse files
authored
🤝 Merge pull request #22 from Instabug/hotfix/crash_no_primary_color_set
Hotfix/crash no primary color set
2 parents 474ae94 + 9aa29af commit a16dc95

File tree

4 files changed

+41
-31
lines changed

4 files changed

+41
-31
lines changed

.github/issue_template.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!--
2+
Please fill in the template below when creating an issue
3+
to help us reproduce it and fix it faster.
4+
5+
While not required, including a sample project that reproduces
6+
your issue will help us a lot.
7+
-->
8+
9+
### Steps to Reproduce the Problem
10+
11+
### Expected Behavior
12+
13+
### Actual Behavior
14+
15+
### Instabug integration code
16+
*Make sure to remove your app token.*
17+
18+
### SDK Version
19+
20+
### React Native, iOS and Android Versions
21+
22+
### Device Model
23+
24+
### [Optional] Project That Reproduces the Issue

README.md

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Instabug for react native
1+
# Instabug for React Native
22

33
[![npm](https://img.shields.io/npm/v/instabug-reactnative.svg)](https://www.npmjs.com/package/instabug-reactnative)
44
[![npm](https://img.shields.io/npm/dt/instabug-reactnative.svg)](https://www.npmjs.com/package/instabug-reactnative)
@@ -7,17 +7,15 @@
77
[![Analytics](https://instabug-ga.appspot.com/UA-41982088-6/github/Instabug/instabug-reactnative?pixel)](https://instabug.com)
88

99

10-
Upgrading? Check the [Upgrade Guide](#upgrading-guide) before bumping to a new major version.
10+
Upgrading? Check the [Upgrade Guide](#upgrade-guide) before bumping to a new major version.
1111

12-
<img src="http://s3.amazonaws.com/instabug-assets/mockups/annotation.gif" width="25%"/> <img src="http://s3.amazonaws.com/instabug-assets/mockups/dashboard.gif" width="73%"/>
12+
Instabug is an in-app feedback and bug reporting tool for mobile apps. With just a simple shake, your users or beta testers can [report bugs](https://instabug.com/bug-reporting) or send in-app feedback and the SDK will capture an environment snapshot of your user's device including all console logs, [server-side network requests](https://instabug.com/network-logging) and bug reproduction steps compiling all these details in one organised dashboard to help you debug and fix bugs faster.
1313

14-
Instabug is a reliable [bug reporting and user feedback platform](https://instabug.com/bug-reporting) that empowers mobile-first companies to iterate faster and enhance their app quality.
15-
Gather bug reports from your users and the Instabug SDK will automatically capture an environment snapshot of your user's device including all console logs, [server-side network requests](https://instabug.com/network-logging), [bug reproduction steps](https://instabug.com/user-steps) and more details that would help you debug and fix bugs faster.
14+
Instabug also provides you with a [reliable crash reporter](https://instabug.com/crash-reporting) that automatically captures a detailed report of the running environment, the different threads’ states, [the steps to reproduce the crash](https://instabug.com/user-steps), and the network request logs. All the data is captured automatically with no need for breadcrumbs, and you can always [reply back to your users](https://instabug.com/in-app-chat) and they will receive your messages within the app.
1615

1716
For more info, visit [Instabug.com](https://www.instabug.com).
1817

1918
## Installation
20-
This section explains how to install Instabug SDK into your React Native application.
2119

2220
1. Open the terminal and navigate to your React Native Directory. Then run the following command.
2321

@@ -71,12 +69,7 @@ protected List<ReactPackage> getPackages() {
7169
```
7270
You can find your app token by selecting the SDK tab from your [**Instabug dashboard**](https://dashboard.instabug.com/app/sdk/).
7371
74-
## Upgrading guide
75-
76-
Version 2.0.0
77-
78-
- **removes dependency on Cocoapods** when installing Instabug
79-
- **ensures consistency** between the React Native SDK, and the Native SDK
72+
## Upgrade Guide
8073
8174
### Upgrading from 1.x.x
8275
@@ -99,9 +92,9 @@ pod install
9992
react-native link instabug-reactnative
10093
```
10194
102-
### Upgrading from 2.0.x and from 8.0.3
95+
### Upgrading from 8.0.3 to 8.x
10396
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:
97+
When upgrading from 8.0.3 to 8.x, please make sure you do the following steps:
10598
10699
1. Unlink the project before upgrading to the new version
107100
```bash
@@ -119,6 +112,7 @@ react-native link instabug-reactnative
119112
```
120113
121114
## Microphone and Photo Library Usage Description (iOS Only)
115+
122116
Instabug needs access to the microphone and photo library to be able to let users add audio and video attachments. Starting from iOS 10, apps that don’t provide a usage description for those 2 permissions would be rejected when submitted to the App Store.
123117
124118
For your app not to be rejected, you’ll need to add the following 2 keys to your app’s info.plist file with text explaining to the user why those permissions are needed:
@@ -134,16 +128,5 @@ If your app doesn’t already access the microphone or photo library, we recomme
134128
**The permission alert for accessing the microphone/photo library will NOT appear unless users attempt to attach a voice note/photo while using Instabug.**
135129
136130
## Documentation
137-
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).
138-
139-
140-
## Contact Us
141-
If you have any questions or feedback don't hesitate to get in touch. You can reach us at any time through **[email protected]**.
142-
143-
144-
145-
## License
146-
147-
This software is released under <a href="https://opensource.org/licenses/mit-license.php">MIT License</a>.
148131
149-
© 2017 Instabug. All rights reserved.
132+
For more details about the supported APIs and how to use them, check our [**Documentation**](https://docs.instabug.com/docs/react-native-overview).

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class RNInstabugReactnativePackage implements ReactPackage {
3535

3636
public RNInstabugReactnativePackage(String androidApplicationToken, Application androidApplication,
3737
String[] invocationEventValues, String primaryColor,
38-
InstabugFloatingButtonEdge floatingButtonEdge, int offset) {
38+
InstabugFloatingButtonEdge floatingButtonEdge, Integer offset) {
3939
this.androidApplication = androidApplication;
4040
this.mAndroidApplicationToken = androidApplicationToken;
4141

@@ -48,9 +48,12 @@ public RNInstabugReactnativePackage(String androidApplicationToken, Application
4848
.setReproStepsState(State.DISABLED)
4949
.build();
5050

51-
Instabug.setPrimaryColor(Color.parseColor(primaryColor));
52-
BugReporting.setFloatingButtonEdge(floatingButtonEdge);
53-
BugReporting.setFloatingButtonOffset(offset);
51+
if(primaryColor != null)
52+
Instabug.setPrimaryColor(Color.parseColor(primaryColor));
53+
if(floatingButtonEdge != null)
54+
BugReporting.setFloatingButtonEdge(floatingButtonEdge);
55+
if(offset != null)
56+
BugReporting.setFloatingButtonOffset(offset);
5457

5558
}
5659

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": "8.0.7",
3+
"version": "8.0.9",
44
"description": "React Native plugin for integrating the Instabug SDK",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)