Skip to content

Commit e3c7cb7

Browse files
authored
Release 9.0.5 (#91)
1 parent 101e297 commit e3c7cb7

File tree

156 files changed

+1928
-440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+1928
-440
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v9.0.0 (2020-03-10)
2+
3+
* Bump native SDKs to v9
4+
15
## v8.6.5 (2019-09-06)
26

37
* Fixes various android issues

README.md

Lines changed: 53 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Instabug Cordova Plugin
2-
=================================
1+
# Instabug Cordova Plugin
32

43
The purpose of this plugin is to simplify the process of integrating the Instabug SDK in a hybrid application, as well as to provide an interface to interact with the SDK through JavaScript.
54

@@ -8,28 +7,69 @@ Instabug is a bug reporting and in-app feedback tool that provides your testers
87
For more info, visit [Instabug.com](https://instabug.com).
98

109
### Installation
10+
1111
Currently, this plugin can only be installed via the Command-Line Interface.
12+
1213
```
1314
cordova plugin add instabug-cordova
1415
```
16+
1517
##### Ionic
18+
1619
If you're using this plugin with Ionic, you can install using this command.
20+
1721
```
1822
ionic cordova plugin add instabug-cordova
1923
```
2024

2125
## Usage
22-
1. You can initialize the SDK by using this method in your JS class
26+
27+
To initialize Instabug in your app, you need to do the following:
28+
29+
### Android
30+
31+
1. Change the name of the application class in your AndroidManifest.xml file to `android:name="com.instabug.cordova.plugin.MyApplication"`.
32+
33+
Starting from _Cordova Android v7.0.0_ `AndroidManifest.xml` location has been changed and its new path now is `app/src/main/AndroidManifest.xml` ([read more](http://cordova.apache.org/announcements/2017/12/04/cordova-android-7.0.0.html)).
34+
35+
If you're using _Cordova Android v7+, please make sure you update its location inside Cordova's `build.gradle` file at `platforms/android/CordovaLib/build.gradle`:
36+
37+
```
38+
sourceSets {
39+
main {
40+
manifest.srcFile 'src/main/AndroidManifest.xml'
41+
}
42+
}
43+
```
44+
45+
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`)
46+
47+
3. You can change the invocation event by changing this line `InstabugInvocationEvent.SHAKE` in the **MyApplication** class to any of the following:
48+
49+
`InstabugInvocationEvent.FLOATING_BUTTON`, `InstabugInvocationEvent.SCREENSHOT_GESTURE`, `InstabugInvocationEvent.TWO_FINGER_SWIPE_LEFT`, or `InstabugInvocationEvent.NONE`.
50+
51+
4. Make sure the following snippet is added to your project level `build.gradle`, if not you can manually add it as follows:.
52+
53+
```dart
54+
allprojects {
55+
repositories {
56+
maven {
57+
url "https://sdks.instabug.com/nexus/repository/instabug-cp"
58+
}
59+
}
60+
}
61+
```
62+
63+
### iOS
64+
65+
You can initialize the SDK by using this method in your JS class
66+
2367
```
2468
cordova.plugins.instabug.activate(
2569
{
26-
token: 'MY_TOKEN'
70+
ios: 'MY_IOS_TOKEN'
2771
},
2872
'shake',
29-
{
30-
commentRequired: true,
31-
colorTheme: 'dark'
32-
},
3373
function () {
3474
console.log('Instabug initialized.');
3575
},
@@ -38,20 +78,12 @@ cordova.plugins.instabug.activate(
3878
}
3979
);
4080
```
41-
You can change the invocation event with any of the following: ```'button'```, ```'screenshot'```, ```'swipe'```, or ```'shake'```.
4281

43-
2. Make sure the following snippet is added to your project level `build.gradle`, if not you can manually add it as follows:.
44-
```dart
45-
allprojects {
46-
repositories {
47-
maven {
48-
url "https://sdks.instabug.com/nexus/repository/instabug-cp"
49-
}
50-
}
51-
}
52-
```
53-
##### TypeScript
54-
If you're using this plugin with TypeScript, you need to add this line at the beginning of your __app.component.ts__ class.
82+
You can change the invocation event with any of the following: `'button'`, `'screenshot'`, `'swipe'`, or `'shake'`.
83+
84+
##### Ionic
85+
86+
If you're using this plugin with Ionic, you need to add this line at the beginning of your **app.component.ts** class.
5587

5688
```
5789
declare let cordova: any;

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ android {
2121
}
2222

2323
dependencies {
24-
implementation 'com.instabug.library:instabug:8.6.3.0'
24+
implementation 'com.instabug.library:instabug:9.0.5.5'
2525
implementation 'com.android.support:multidex:1.0.0'
2626
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "instabug-cordova",
3-
"version": "8.6.5",
3+
"version": "9.0.0",
44
"description": "The purpose of this plugin is to simplify the process of integrating the Instabug SDK in a hybrid application, as well as to provide an interface to interfacing with the SDK through JavaScript.",
55
"main": "index.js",
66
"repository": {

plugin.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@
8787

8888
<source-file src="src/android/IBGPluginActivity.java" target-dir="src/com/instabug/cordova/plugin"/>
8989
<source-file src="src/android/IBGPlugin.java" target-dir="src/com/instabug/cordova/plugin"/>
90-
<!-- <source-file src="src/android/MyApplication.java" target-dir="src/com/instabug/cordova/plugin"/> -->
90+
<source-file src="src/android/MyApplication.java" target-dir="src/com/instabug/cordova/plugin"/>
9191
<source-file src="src/android/util/Util.java" target-dir="src/com/instabug/cordova/plugin/util"/>
92-
<hook type="before_plugin_install" src="scripts/android/link_gradle.js"/>
93-
<hook type="before_plugin_uninstall" src="scripts/android/unlink_gradle.js"/>
92+
<hook type="before_plugin_install" src="scripts/android/before_plugin_install.js"/>
93+
<hook type="before_plugin_uninstall" src="scripts/android/before_plugin_uninstall.js"/>
9494
</platform>
9595

9696
<!-- ios -->

sampleApp/config.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@
2323
<allow-intent href="itms:*" />
2424
<allow-intent href="itms-apps:*" />
2525
</platform>
26+
<platform name="android">
27+
<preference name="android-targetSdkVersion" value="29" />
28+
</platform>
2629
</widget>

sampleApp/platforms/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
</intent-filter>
1010
</activity>
1111
</application>
12-
<uses-sdk android:targetSdkVersion="28" />
12+
<uses-sdk android:targetSdkVersion="29" />
1313
</manifest>

sampleApp/platforms/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ allprojects {
4545

4646
//This replaces project.properties w.r.t. build settings
4747
project.ext {
48-
defaultBuildToolsVersion="28.0.3" //String
48+
defaultBuildToolsVersion="29.0.0" //String
4949
defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
50-
defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default
51-
defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default
50+
defaultTargetSdkVersion=29 //Integer - We ALWAYS target the latest by default
51+
defaultCompileSdkVersion=29 //Integer - We ALWAYS compile with the latest by default
5252
}
5353
}
5454

sampleApp/platforms/android/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
# This is the application project. This is only required for Android Studio Gradle projects
99

1010
# Project target.
11-
target=android-28
11+
target=android-29
1212
android.library.reference.1=CordovaLib
1313
android.library.reference.2=app

sampleApp/platforms/ios/HelloCordovaUITest/HelloCordovaUITest.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ - (void)setUp {
2121
- (void)testInstabugSendBugReport {
2222

2323
XCUIApplication *app = [[XCUIApplication alloc] init];
24-
XCUIElement *ibgfloatingbuttonaccessibilityidentifierElement = app/*@START_MENU_TOKEN@*/.otherElements[@"IBGFloatingButtonAccessibilityIdentifier"]/*[[".otherElements[@\"Floating Button\"]",".otherElements[@\"IBGFloatingButtonAccessibilityIdentifier\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/;
25-
[ibgfloatingbuttonaccessibilityidentifierElement tap];
24+
[app/*@START_MENU_TOKEN@*/.buttons[@"IBGFloatingButtonAccessibilityIdentifier"]/*[[".windows[@\"Floating button window\"]",".buttons[@\"Floating Button\"]",".buttons[@\"IBGFloatingButtonAccessibilityIdentifier\"]"],[[[-1,2],[-1,1],[-1,0,1]],[[-1,2],[-1,1]]],[0]]@END_MENU_TOKEN@*/ tap];
2625
[app.tables.staticTexts[@"Report a bug"] tap];
2726

2827
XCUIElement *textField = app.scrollViews.otherElements.textFields[@"IBGBugInputViewEmailFieldAccessibilityIdentifier"];

0 commit comments

Comments
 (0)