You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the following snippet to your `index.js` file inside `onDeviceReady` function:
28
-
> Don't forget to replace `YOUR_CORDOVA_TOKEN` with your token.
25
+
- Add the following snippet to your `index.js` file inside `onDeviceReady` function:
29
26
30
27
```js
31
-
var Instabug =cordova.require("instabug-cordova.Instabug");
32
-
var BugReporting =cordova.require("instabug-cordova.BugReporting");
28
+
var Instabug =cordova.require('instabug-cordova.Instabug');
29
+
var BugReporting =cordova.require('instabug-cordova.BugReporting');
33
30
34
31
Instabug.start(
35
-
"YOUR_CORDOVA_TOKEN",
32
+
'YOUR_CORDOVA_TOKEN',
36
33
[BugReporting.invocationEvents.button],
37
-
() =>console.log("Instabug initialized."),
38
-
(error) =>console.log("Instabug could not be initialized - "+ error)
39
-
);
40
-
```
41
-
42
-
### instabug-cordova <= 9.1.7
43
-
44
-
#### Android
45
-
46
-
1. Change the name of the application class in your AndroidManifest.xml file to `android:name="com.instabug.cordova.plugin.MyApplication"`.
47
-
48
-
2. You need to add your app token in the **MyApplication** class, by replacing `YOUR_ANDROID_TOKEN`. (You can find this class under this path `YourProjectName/platforms/android/app/src/main/java/com.instabug.cordova.plugin/MyApplication.java`)
49
-
50
-
3. You can change the invocation event by changing this line `InstabugInvocationEvent.SHAKE` in the **MyApplication** class to any of the following:
51
-
52
-
`InstabugInvocationEvent.FLOATING_BUTTON`, `InstabugInvocationEvent.SCREENSHOT_GESTURE`, `InstabugInvocationEvent.TWO_FINGER_SWIPE_LEFT`, or `InstabugInvocationEvent.NONE`.
53
-
54
-
4. Make sure the following snippet is added to your project level `build.gradle`, if not you can manually add it as follows:.
⚠️ Starting from Instabug-Cordova v9, we require the `compileSdkVersion` to be set to a minimum of `29`. It can be set inside the app's `build.gradle` file as below:
67
-
68
-
android {
69
-
compileSdkVersion 29
70
-
}
71
-
72
-
#### iOS
73
-
74
-
You can initialize the SDK by using this method in your App JS file.
You can change the invocation event with any of the following: `'button'`, `'screenshot'`, `'swipe'`, or `'shake'`.
96
-
97
-
⚠️ TypeScript users, make sure you declare `cordova` at the beginning of your app class (app.component.ts):
43
+
- Replace `YOUR_CORDOVA_TOKEN` with your application token.
98
44
99
-
declare let cordova: any;
45
+
> :warning: If you're updating the SDK from versions prior to v11, please check our [migration guide](https://docs.instabug.com/docs/cordova-migration-guide).
100
46
101
47
## Features Not Yet Supported
102
48
- User steps.
@@ -110,4 +56,4 @@ You can change the invocation event with any of the following: `'button'`, `'scr
110
56
111
57
This software is released under the <ahref="http://opensource.org/licenses/Apache-2.0">Apache 2.0 License</a>.
0 commit comments