Skip to content

Commit 45ddbde

Browse files
authored
Merge pull request #133 from Instabug/release/11.0.0
[MOB-9110] Release/11.0.0
2 parents f457e68 + 887c98a commit 45ddbde

File tree

552 files changed

+4003
-51223
lines changed

Some content is hidden

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

552 files changed

+4003
-51223
lines changed

.circleci/config.yml

Lines changed: 59 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,99 @@
1-
version: 2
1+
version: 2.1
2+
3+
orbs:
4+
android: circleci/[email protected]
5+
26
jobs:
3-
android_tests:
4-
working_directory: ~/project
5-
macos:
6-
xcode: "9.4.0"
7-
environment:
8-
JVM_OPTS: -Xmx3200m
7+
8+
test_android:
9+
working_directory: ~/project/example
10+
executor:
11+
name: android/android-machine
12+
resource-class: xlarge
13+
tag: 2022.04.1
914
steps:
1015
- checkout:
1116
path: ~/project
1217
- run:
13-
name: Setup environment variables
14-
command: |
15-
echo 'export PATH="$PATH:/usr/local/opt/node@8/bin:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin:/usr/local/share/android-sdk/tools/bin"' >> $BASH_ENV
16-
echo 'export ANDROID_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV
17-
echo 'export ANDROID_SDK_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV
18-
echo 'export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"' >> $BASH_ENV
19-
echo 'export QEMU_AUDIO_DRV=none' >> $BASH_ENV
20-
echo 'export JAVA_HOME=/Library/Java/Home' >> $BASH_ENV
21-
echo 'export PATH="$PATH:`pwd`/flutter/bin"' >> $BASH_ENV
22-
echo "export PATH=\$PATH:/usr/local/share/android-sdk/platform-tools/" >>$BASH_ENV
23-
- run:
24-
name: Install Android sdk
25-
command: |
26-
HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask android-sdk
27-
- run:
28-
name: Install Gradle
29-
command: |
30-
HOMEBREW_NO_AUTO_UPDATE=1 brew install gradle
31-
no_output_timeout: 30m
32-
- run:
33-
name: Install emulator dependencies
34-
command: (yes | sdkmanager "platform-tools" "platforms;android-26" "extras;intel;Hardware_Accelerated_Execution_Manager" "build-tools;26.0.0" "system-images;android-26;google_apis;x86" "emulator" --verbose) || true
35-
- run: avdmanager create avd -n Pixel_2_API_26 -k "system-images;android-26;google_apis;x86" -g google_apis -d "Nexus 5"
36-
- run:
37-
name: Run emulator in background
38-
command: /usr/local/share/android-sdk/tools/emulator @Pixel_2_API_26 -noaudio -no-boot-anim -no-window
39-
background: true
40-
- run:
41-
name: download Cordova
18+
name: Install Cordova CLI
4219
command: npm install -g cordova
4320
- run:
44-
name: Copy sampleApp
45-
command: cp -a sampleApp ../
46-
- run:
47-
name: chmod permissions
48-
command: cd ../; chmod -R 777 sampleApp
49-
- run:
50-
name: Npm Install
51-
command: cd ../sampleApp; npm install
52-
- run:
53-
name: Add Instabug
54-
command: cd ../sampleApp; cordova plugin add ../project
55-
- run:
56-
name: Build App
57-
command: cd ../sampleApp; cordova build android
21+
name: Install Android Platform
22+
command: cordova platform add android || true
5823
- run:
59-
name: Download Android Dependencies
60-
command: cd ../sampleApp/platforms/android; ./gradlew androidDependencies
61-
- run:
62-
name: Disable animations
63-
command: |
64-
adb shell settings put global window_animation_scale 0.0
65-
adb shell settings put global transition_animation_scale 0.0
66-
adb shell settings put global animator_duration_scale 0.0
67-
adb shell settings put secure long_press_timeout 1500
24+
name: Install Plugins
25+
command: cordova plugins add --link ../ tests
6826
- run:
69-
name: Run unit Tests
70-
command: cd ../sampleApp/platforms/android; ./gradlew test
71-
# - run:
72-
# name: Run UI Tests
73-
# command: cd ../sampleApp/platforms/android; ./gradlew app:connectedAndroidTest
27+
name: Install Build Tools v30.0.3
28+
command: sdkmanager "build-tools;30.0.3"
29+
- android/start-emulator-and-run-tests:
30+
run-tests-working-directory: platforms/android
31+
system-image: system-images;android-30;google_apis;x86
32+
additional-avd-args: -d "Nexus 5"
33+
post-emulator-launch-assemble-command: cordova build android
34+
test-command: ./gradlew app:connectedAndroidTest
35+
- android/run-tests:
36+
working-directory: platforms/android
37+
test-command: ./gradlew test
7438

75-
ios_tests:
39+
test_ios:
40+
working_directory: ~/project/example
7641
macos:
77-
xcode: "10.2.0"
78-
working_directory: ~/project
79-
environment:
80-
FL_OUTPUT_DIR: output
42+
xcode: 13.3.0
8143
steps:
8244
- checkout:
8345
path: ~/project
8446
- run:
85-
name: download Cordova
47+
name: Install Cordova CLI
8648
command: npm install -g cordova
8749
- run:
88-
name: Copy sampleApp
89-
command: cp -a sampleApp ../
50+
name: Install iOS Platform
51+
command: cordova platform add ios || true
9052
- run:
91-
name: chmod permissions
92-
command: cd ../; chmod -R 777 sampleApp
93-
- run:
94-
name: Npm Install
95-
command: cd ../sampleApp; npm install
96-
- run:
97-
name: Add Instabug
98-
command: cd ../sampleApp; cordova plugin add ../project
99-
- run:
100-
name: Build App
101-
command: cd ../sampleApp; cordova build ios
53+
name: Install Plugins
54+
command: cordova plugins add --link ../ tests
10255
- run:
103-
name: Build and run tests
104-
command: cd ../sampleApp/platforms/ios; xcodebuild -workspace HelloCordova.xcworkspace -scheme HelloCordova -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=12.2' test | xcpretty
56+
name: Build iOS App
57+
command: cordova build ios
58+
- run:
59+
name: Run Tests
60+
working_directory: platforms/ios
61+
command: |
62+
xcodebuild -allowProvisioningUpdates \
63+
-workspace InstabugExample.xcworkspace \
64+
-scheme InstabugExample \
65+
-sdk iphonesimulator \
66+
-destination 'name=iPhone 12 Pro Max' \
67+
test | xcpretty
10568
106-
publish:
69+
publish:
10770
macos:
108-
xcode: "10.1.0"
71+
xcode: 13.3.0
72+
working_directory: "~"
10973
steps:
11074
- checkout
11175
- run: git clone https://InstabugCI:[email protected]/Instabug/Escape.git
112-
- run: cd Escape; swift build -c release -Xswiftc -static-stdlib
113-
- run: cd Escape/.build/release; cp -f Escape /usr/local/bin/escape
76+
- run: cd Escape && swift build -c release
77+
- run: cd Escape/.build/release && cp -f Escape /usr/local/bin/escape
11478
- run: Escape cordova publish
79+
11580
workflows:
11681
version: 2
117-
publish:
82+
build-test-and-approval-deploy:
11883
jobs:
119-
- android_tests
120-
- ios_tests
84+
- test_android
85+
- test_ios
12186
- hold:
12287
type: approval
12388
requires:
124-
- android_tests
125-
- ios_tests
89+
- test_android
90+
- test_ios
12691
filters:
12792
branches:
12893
only: master
12994
- publish:
130-
context: cross-platform
13195
requires:
13296
- hold
13397
filters:
13498
branches:
13599
only: master
136-

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@
99

1010
local.properties
1111
node_modules/
12-
13-
#sample-app
14-
sample-app/.idea
15-
sample-app/hooks/
16-
sample-app/plugins/
-1 Bytes
Binary file not shown.
-17 Bytes
Binary file not shown.

.gradle/5.4/gc.properties

Whitespace-only changes.
-1 Bytes
Binary file not shown.
-17 Bytes
Binary file not shown.

.gradle/6.3/gc.properties

Whitespace-only changes.

.gradle/checksums/checksums.lock

-17 Bytes
Binary file not shown.

.gradle/vcs-1/gc.properties

Whitespace-only changes.

.npmignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Logs
21
logs
32
*.log
43
npm-debug.log*
4+
5+
.circleci/
6+
.github/
57

6-
#sample-app
7-
sample-app/
8+
node_modules/
9+
example/

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## v11.0.0 (2022-07-07)
2+
3+
* Bumps Instabug native SDKs to v11
4+
* Adds the ability to initialize the Android SDK from JavaScript. Check the migration guide referenced in our docs
5+
* Improves Instabug modules import usage. Check the migration guide referenced in our docs
6+
* Migrates Instabug iOS SDK to be installed through CocoaPods
7+
* Moves Instabug.setVideoRecordingFloatingButtonPosition to the BugReporting module
8+
* Adds Instabug.setString API to allow for SDK text customizations
9+
* Replaces Instabug.setShakingThreshold with BugReporting.setShakingThresholdForAndroid
10+
* Adds new API BugReporting.setShakingThresholdForiPhone
11+
* Adds new API BugReporting.setShakingThresholdForiPad
12+
* Adds new API Instabug.setWelcomeMessageMode
13+
* Adds new API Instabug.setColorTheme
14+
* Adds new API Instabug.setSessionProfilerEnabled
15+
* Adds new API BugReporting.setFloatingButtonEdge
16+
* Fixes an issue with uploading attachments in URL form on iOS
17+
* Fixes an issue with BugReporting.setEnabledAttachmentTypes not working on Android
18+
* Removes the deprecated APIs. Check the migration guide referenced in our docs
19+
* Removes the Android multidex dependency
20+
* Removes Instabug.setAutoScreenRecordingMaxDuration
21+
* Removes Surveys.setThresholdForReshowingSurveyAfterDismiss
22+
* Removes BugReporting.invocationModes enum
23+
24+
125
## v9.1.7 (2021-05-11)
226

327
* Adds support for Azerbaijani and Danish locales

README.md

Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -20,48 +20,17 @@ cordova plugin add instabug-cordova
2020
ionic cordova plugin add instabug-cordova
2121
```
2222

23-
## Android Integration Steps
23+
## Integration Steps
2424

25-
1. Change the name of the application class in your AndroidManifest.xml file to `android:name="com.instabug.cordova.plugin.MyApplication"`.
25+
- Add the following snippet to your `index.js` file inside `onDeviceReady` function:
2626

27-
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`)
27+
```js
28+
var Instabug = cordova.require('instabug-cordova.Instabug');
29+
var BugReporting = cordova.require('instabug-cordova.BugReporting');
2830

29-
3. You can change the invocation event by changing this line `InstabugInvocationEvent.SHAKE` in the **MyApplication** class to any of the following:
30-
31-
`InstabugInvocationEvent.FLOATING_BUTTON`, `InstabugInvocationEvent.SCREENSHOT_GESTURE`, `InstabugInvocationEvent.TWO_FINGER_SWIPE_LEFT`, or `InstabugInvocationEvent.NONE`.
32-
33-
4. Make sure the following snippet is added to your project level `build.gradle`, if not you can manually add it as follows:.
34-
35-
```dart
36-
allprojects {
37-
repositories {
38-
maven {
39-
url "https://sdks.instabug.com/nexus/repository/instabug-cp"
40-
}
41-
}
42-
}
43-
```
44-
45-
⚠️ 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:
46-
47-
android {
48-
compileSdkVersion 29
49-
}
50-
51-
## iOS Integration Steps
52-
53-
You can initialize the SDK by using this method in your App JS file.
54-
55-
```
56-
cordova.plugins.instabug.activate(
57-
{
58-
ios: 'MY_IOS_TOKEN'
59-
},
60-
'shake',
61-
{
62-
commentRequired: true,
63-
colorTheme: 'light'
64-
},
31+
Instabug.start(
32+
'YOUR_CORDOVA_TOKEN',
33+
[BugReporting.invocationEvents.button],
6534
function () {
6635
console.log('Instabug initialized.');
6736
},
@@ -71,11 +40,9 @@ cordova.plugins.instabug.activate(
7140
);
7241
```
7342

74-
You can change the invocation event with any of the following: `'button'`, `'screenshot'`, `'swipe'`, or `'shake'`.
75-
76-
⚠️ 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.
7744

78-
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).
7946
8047
## Features Not Yet Supported
8148
- User steps.
@@ -89,4 +56,4 @@ You can change the invocation event with any of the following: `'button'`, `'scr
8956

9057
This software is released under the <a href="http://opensource.org/licenses/Apache-2.0">Apache 2.0 License</a>.
9158

92-
© 2016 Instabug. All rights reserved.
59+
© 2022 Instabug. All rights reserved.

build.gradle

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#! /bin/sh
21
#
32
# Licensed to the Apache Software Foundation (ASF) under one
43
# or more contributor license agreements. See the NOTICE file
@@ -7,17 +6,21 @@
76
# to you under the Apache License, Version 2.0 (the
87
# "License"); you may not use this file except in compliance
98
# with the License. You may obtain a copy of the License at
10-
#
9+
#
1110
# http://www.apache.org/licenses/LICENSE-2.0
12-
#
11+
#
1312
# Unless required by applicable law or agreed to in writing,
1413
# software distributed under the License is distributed on an
1514
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1615
# KIND, either express or implied. See the License for the
1716
# specific language governing permissions and limitations
1817
# under the License.
19-
#
2018

21-
CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
19+
.DS_Store
20+
21+
# Generated by package manager
22+
node_modules/
2223

23-
tail -f "$CORDOVA_PATH/console.log"
24+
# Generated by Cordova
25+
/plugins/
26+
/platforms/

example/config.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<widget id="com.instabug.example" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3+
<name>InstabugExample</name>
4+
<description>Sample Apache Cordova App</description>
5+
<author email="[email protected]" href="https://cordova.apache.org">
6+
Apache Cordova Team
7+
</author>
8+
<content src="index.html" />
9+
<allow-intent href="http://*/*" />
10+
<allow-intent href="https://*/*" />
11+
</widget>

0 commit comments

Comments
 (0)