CodePush for React Native
Enables adding your CodePush version to all Instabug reports. (Bug reports, crash reports, etc.)
Prerequisites
Make sure your React Native app is using Instabug version v12.6.0 or higher for optimal compatibility with CodePush integration.
Initialization
To integrate Instabug with CodePush, pass the codePushVersion to allow you to change the reported versions.
Instabug.init({
token: '<User-App-token>',
codePushVersion: '<Code-push-version>',
invocationEvents: [<Invocation-events>],
// ... Other optional arguments here
});
Make sure to replace "User-App-token", "Code-push-version", and "Invocation-events" with your actual Instabug token, CodePush version, and invocation events.
Native Initialization
To send the CodePush version from your native side, please use the following APIs:
//This should be called before startingWithToken.
Instabug.setCodePushVersion("")
//This should be called before startingWithToken.
[Instabug setCodePushVersion:@""];
new Instabug.Builder(application,"INSTABUG_TOKEN")
.setCodePushVersion("")
.build()
Instabug.Builder(application, "INSTABUG_TOKEN")
.setCodePushVersion("")
.build()
Character Limit
- The total length of the combined app version and codePushVersion should not exceed 40 characters. Exceeding the limit will result in trimming the excess characters.
- The combined versions will show as: "+codepush:". For example, if the app version is 1.0.0 (1), it would show as 1.0.0 (1)+codepush:1.0.6 (2) on the Instabug Dashboard.
Updated 9 months ago