diff --git a/.circleci/config.yml b/.circleci/config.yml index 526c9d9f..bf38230d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,136 +1,99 @@ -version: 2 +version: 2.1 + +orbs: + android: circleci/android@2.0 + jobs: - android_tests: - working_directory: ~/project - macos: - xcode: "9.4.0" - environment: - JVM_OPTS: -Xmx3200m + + test_android: + working_directory: ~/project/example + executor: + name: android/android-machine + resource-class: xlarge + tag: 2022.04.1 steps: - checkout: path: ~/project - run: - name: Setup environment variables - command: | - 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 - echo 'export ANDROID_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV - echo 'export ANDROID_SDK_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV - echo 'export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"' >> $BASH_ENV - echo 'export QEMU_AUDIO_DRV=none' >> $BASH_ENV - echo 'export JAVA_HOME=/Library/Java/Home' >> $BASH_ENV - echo 'export PATH="$PATH:`pwd`/flutter/bin"' >> $BASH_ENV - echo "export PATH=\$PATH:/usr/local/share/android-sdk/platform-tools/" >>$BASH_ENV - - run: - name: Install Android sdk - command: | - HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask android-sdk - - run: - name: Install Gradle - command: | - HOMEBREW_NO_AUTO_UPDATE=1 brew install gradle - no_output_timeout: 30m - - run: - name: Install emulator dependencies - 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 - - run: avdmanager create avd -n Pixel_2_API_26 -k "system-images;android-26;google_apis;x86" -g google_apis -d "Nexus 5" - - run: - name: Run emulator in background - command: /usr/local/share/android-sdk/tools/emulator @Pixel_2_API_26 -noaudio -no-boot-anim -no-window - background: true - - run: - name: download Cordova + name: Install Cordova CLI command: npm install -g cordova - run: - name: Copy sampleApp - command: cp -a sampleApp ../ - - run: - name: chmod permissions - command: cd ../; chmod -R 777 sampleApp - - run: - name: Npm Install - command: cd ../sampleApp; npm install - - run: - name: Add Instabug - command: cd ../sampleApp; cordova plugin add ../project - - run: - name: Build App - command: cd ../sampleApp; cordova build android + name: Install Android Platform + command: cordova platform add android || true - run: - name: Download Android Dependencies - command: cd ../sampleApp/platforms/android; ./gradlew androidDependencies - - run: - name: Disable animations - command: | - adb shell settings put global window_animation_scale 0.0 - adb shell settings put global transition_animation_scale 0.0 - adb shell settings put global animator_duration_scale 0.0 - adb shell settings put secure long_press_timeout 1500 + name: Install Plugins + command: cordova plugins add --link ../ tests - run: - name: Run unit Tests - command: cd ../sampleApp/platforms/android; ./gradlew test - # - run: - # name: Run UI Tests - # command: cd ../sampleApp/platforms/android; ./gradlew app:connectedAndroidTest + name: Install Build Tools v30.0.3 + command: sdkmanager "build-tools;30.0.3" + - android/start-emulator-and-run-tests: + run-tests-working-directory: platforms/android + system-image: system-images;android-30;google_apis;x86 + additional-avd-args: -d "Nexus 5" + post-emulator-launch-assemble-command: cordova build android + test-command: ./gradlew app:connectedAndroidTest + - android/run-tests: + working-directory: platforms/android + test-command: ./gradlew test - ios_tests: + test_ios: + working_directory: ~/project/example macos: - xcode: "10.2.0" - working_directory: ~/project - environment: - FL_OUTPUT_DIR: output + xcode: 13.3.0 steps: - checkout: path: ~/project - run: - name: download Cordova + name: Install Cordova CLI command: npm install -g cordova - run: - name: Copy sampleApp - command: cp -a sampleApp ../ + name: Install iOS Platform + command: cordova platform add ios || true - run: - name: chmod permissions - command: cd ../; chmod -R 777 sampleApp - - run: - name: Npm Install - command: cd ../sampleApp; npm install - - run: - name: Add Instabug - command: cd ../sampleApp; cordova plugin add ../project - - run: - name: Build App - command: cd ../sampleApp; cordova build ios + name: Install Plugins + command: cordova plugins add --link ../ tests - run: - name: Build and run tests - 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 + name: Build iOS App + command: cordova build ios + - run: + name: Run Tests + working_directory: platforms/ios + command: | + xcodebuild -allowProvisioningUpdates \ + -workspace InstabugExample.xcworkspace \ + -scheme InstabugExample \ + -sdk iphonesimulator \ + -destination 'name=iPhone 12 Pro Max' \ + test | xcpretty - publish: + publish: macos: - xcode: "10.1.0" + xcode: 13.3.0 + working_directory: "~" steps: - checkout - run: git clone https://InstabugCI:$RELEASE_GITHUB_TOKEN@github.com/Instabug/Escape.git - - run: cd Escape; swift build -c release -Xswiftc -static-stdlib - - run: cd Escape/.build/release; cp -f Escape /usr/local/bin/escape + - run: cd Escape && swift build -c release + - run: cd Escape/.build/release && cp -f Escape /usr/local/bin/escape - run: Escape cordova publish + workflows: version: 2 - publish: + build-test-and-approval-deploy: jobs: - - android_tests - - ios_tests + - test_android + - test_ios - hold: type: approval requires: - - android_tests - - ios_tests + - test_android + - test_ios filters: branches: only: master - publish: - context: cross-platform requires: - hold filters: branches: only: master - diff --git a/.gitignore b/.gitignore index 14d47386..28e81867 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,3 @@ local.properties node_modules/ - -#sample-app -sample-app/.idea -sample-app/hooks/ -sample-app/plugins/ diff --git a/.gradle/5.4/fileChanges/last-build.bin b/.gradle/5.4/fileChanges/last-build.bin deleted file mode 100644 index f76dd238..00000000 Binary files a/.gradle/5.4/fileChanges/last-build.bin and /dev/null differ diff --git a/.gradle/5.4/fileHashes/fileHashes.lock b/.gradle/5.4/fileHashes/fileHashes.lock deleted file mode 100644 index c5c8f43e..00000000 Binary files a/.gradle/5.4/fileHashes/fileHashes.lock and /dev/null differ diff --git a/.gradle/5.4/gc.properties b/.gradle/5.4/gc.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/.gradle/6.3/fileChanges/last-build.bin b/.gradle/6.3/fileChanges/last-build.bin deleted file mode 100644 index f76dd238..00000000 Binary files a/.gradle/6.3/fileChanges/last-build.bin and /dev/null differ diff --git a/.gradle/6.3/fileHashes/fileHashes.lock b/.gradle/6.3/fileHashes/fileHashes.lock deleted file mode 100644 index e005a984..00000000 Binary files a/.gradle/6.3/fileHashes/fileHashes.lock and /dev/null differ diff --git a/.gradle/6.3/gc.properties b/.gradle/6.3/gc.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock deleted file mode 100644 index 7e6cb4f8..00000000 Binary files a/.gradle/checksums/checksums.lock and /dev/null differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/.npmignore b/.npmignore index 02faeeae..4852b57d 100644 --- a/.npmignore +++ b/.npmignore @@ -1,7 +1,9 @@ -# Logs logs *.log npm-debug.log* + +.circleci/ +.github/ -#sample-app -sample-app/ \ No newline at end of file +node_modules/ +example/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 834e33d3..793fb27a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## v11.0.0 (2022-07-07) + +* Bumps Instabug native SDKs to v11 +* Adds the ability to initialize the Android SDK from JavaScript. Check the migration guide referenced in our docs +* Improves Instabug modules import usage. Check the migration guide referenced in our docs +* Migrates Instabug iOS SDK to be installed through CocoaPods +* Moves Instabug.setVideoRecordingFloatingButtonPosition to the BugReporting module +* Adds Instabug.setString API to allow for SDK text customizations +* Replaces Instabug.setShakingThreshold with BugReporting.setShakingThresholdForAndroid +* Adds new API BugReporting.setShakingThresholdForiPhone +* Adds new API BugReporting.setShakingThresholdForiPad +* Adds new API Instabug.setWelcomeMessageMode +* Adds new API Instabug.setColorTheme +* Adds new API Instabug.setSessionProfilerEnabled +* Adds new API BugReporting.setFloatingButtonEdge +* Fixes an issue with uploading attachments in URL form on iOS +* Fixes an issue with BugReporting.setEnabledAttachmentTypes not working on Android +* Removes the deprecated APIs. Check the migration guide referenced in our docs +* Removes the Android multidex dependency +* Removes Instabug.setAutoScreenRecordingMaxDuration +* Removes Surveys.setThresholdForReshowingSurveyAfterDismiss +* Removes BugReporting.invocationModes enum + + ## v9.1.7 (2021-05-11) * Adds support for Azerbaijani and Danish locales diff --git a/README.md b/README.md index 5e854f2e..46d7d81b 100644 --- a/README.md +++ b/README.md @@ -20,48 +20,17 @@ cordova plugin add instabug-cordova ionic cordova plugin add instabug-cordova ``` -## Android Integration Steps +## Integration Steps -1. Change the name of the application class in your AndroidManifest.xml file to `android:name="com.instabug.cordova.plugin.MyApplication"`. +- Add the following snippet to your `index.js` file inside `onDeviceReady` function: -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`) +```js +var Instabug = cordova.require('instabug-cordova.Instabug'); +var BugReporting = cordova.require('instabug-cordova.BugReporting'); -3. You can change the invocation event by changing this line `InstabugInvocationEvent.SHAKE` in the **MyApplication** class to any of the following: - -`InstabugInvocationEvent.FLOATING_BUTTON`, `InstabugInvocationEvent.SCREENSHOT_GESTURE`, `InstabugInvocationEvent.TWO_FINGER_SWIPE_LEFT`, or `InstabugInvocationEvent.NONE`. - -4. Make sure the following snippet is added to your project level `build.gradle`, if not you can manually add it as follows:. - -```dart -allprojects { - repositories { - maven { - url "https://sdks.instabug.com/nexus/repository/instabug-cp" - } - } -} -``` - -⚠️ 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: - - android { - compileSdkVersion 29 - } - -## iOS Integration Steps - -You can initialize the SDK by using this method in your App JS file. - -``` -cordova.plugins.instabug.activate( - { - ios: 'MY_IOS_TOKEN' - }, - 'shake', - { - commentRequired: true, - colorTheme: 'light' - }, +Instabug.start( + 'YOUR_CORDOVA_TOKEN', + [BugReporting.invocationEvents.button], function () { console.log('Instabug initialized.'); }, @@ -71,11 +40,9 @@ cordova.plugins.instabug.activate( ); ``` -You can change the invocation event with any of the following: `'button'`, `'screenshot'`, `'swipe'`, or `'shake'`. - -⚠️ TypeScript users, make sure you declare `cordova` at the beginning of your app class (app.component.ts): +- Replace `YOUR_CORDOVA_TOKEN` with your application token. - declare let cordova: any; +> :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). ## Features Not Yet Supported - User steps. @@ -89,4 +56,4 @@ You can change the invocation event with any of the following: `'button'`, `'scr This software is released under the Apache 2.0 License. -© 2016 Instabug. All rights reserved. +© 2022 Instabug. All rights reserved. diff --git a/build.gradle b/build.gradle deleted file mode 100644 index f45a9220..00000000 --- a/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -import java.util.regex.Pattern - -def doExtractStringFromManifest(name) { - def manifestFile = file(android.sourceSets.main.manifest.srcFile) - def pattern = Pattern.compile(name + "=\"(.*?)\"") - def matcher = pattern.matcher(manifestFile.getText()) - matcher.find() - return matcher.group(1) -} - -android { - sourceSets { - main { - manifest.srcFile 'src/main/AndroidManifest.xml' - } - } - - defaultConfig { - applicationId = doExtractStringFromManifest("package") - } -} - -dependencies { - implementation 'com.instabug.library:instabug:9.1.8.2' - implementation 'com.android.support:multidex:1.0.0' -} diff --git a/sampleApp/platforms/ios/cordova/log b/example/.gitignore old mode 100755 new mode 100644 similarity index 88% rename from sampleApp/platforms/ios/cordova/log rename to example/.gitignore index b235b09f..3292cebb --- a/sampleApp/platforms/ios/cordova/log +++ b/example/.gitignore @@ -1,4 +1,3 @@ -#! /bin/sh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -7,17 +6,21 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -# -CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P) +.DS_Store + +# Generated by package manager +node_modules/ -tail -f "$CORDOVA_PATH/console.log" +# Generated by Cordova +/plugins/ +/platforms/ diff --git a/example/config.xml b/example/config.xml new file mode 100644 index 00000000..b16da495 --- /dev/null +++ b/example/config.xml @@ -0,0 +1,11 @@ + + + InstabugExample + Sample Apache Cordova App + + Apache Cordova Team + + + + + diff --git a/example/package-lock.json b/example/package-lock.json new file mode 100644 index 00000000..af5f07ee --- /dev/null +++ b/example/package-lock.json @@ -0,0 +1,2170 @@ +{ + "name": "com.instabug.example", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "com.instabug.example", + "version": "1.0.0", + "license": "Apache-2.0", + "devDependencies": { + "cordova-android": "^10.1.1", + "cordova-ios": "^6.2.0", + "instabug-cordova": "file:..", + "tests-example": "file:tests" + } + }, + "..": { + "version": "11.0.0", + "dev": true, + "license": "Apache 2.0 License" + }, + "node_modules/@netflix/nerror": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@netflix/nerror/-/nerror-1.1.3.tgz", + "integrity": "sha512-b+MGNyP9/LXkapreJzNUzcvuzZslj/RGgdVVJ16P2wSlYatfLycPObImqVJSmNAdyeShvNeM/pl3sVZsObFueg==", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "extsprintf": "^1.4.0", + "lodash": "^4.17.15" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/android-versions": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.7.0.tgz", + "integrity": "sha512-TCy4b8Dk8YS6A23ZPfhSKqK66JHFq0D8avGYiwvYpjno6HrrcI0DRgHx9+jtkvWYmrsE2vQWgbHJhvGGhhOb0g==", + "dev": true, + "dependencies": { + "semver": "^5.7.1" + } + }, + "node_modules/android-versions/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/ansi": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", + "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=", + "dev": true + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/bplist-creator": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.1.0.tgz", + "integrity": "sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg==", + "dev": true, + "dependencies": { + "stream-buffers": "2.2.x" + } + }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/cordova-android": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-10.1.1.tgz", + "integrity": "sha512-eoJp5AcDMHniqmxj0CbUF/rVQfbbp108TWKU6oyJW9rl/ZTJqZxm5ybznl+1/1MBksklxhMeipMn0Iwd0kEzEQ==", + "dev": true, + "dependencies": { + "android-versions": "^1.7.0", + "cordova-common": "^4.0.2", + "execa": "^5.1.1", + "fast-glob": "^3.2.7", + "fs-extra": "^10.0.0", + "is-path-inside": "^3.0.3", + "nopt": "^5.0.0", + "properties-parser": "^0.3.1", + "semver": "^7.3.5", + "untildify": "^4.0.0", + "which": "^2.0.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/cordova-android/node_modules/fs-extra": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cordova-common": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-4.0.2.tgz", + "integrity": "sha512-od7aNShyuBajzPY83mUEO8tERwwWdFklXETHiXP5Ft87CWeo/tSuwNPFztyTy8XYc74yXdogXKPTJeUHuVzB8Q==", + "dev": true, + "dependencies": { + "@netflix/nerror": "^1.1.3", + "ansi": "^0.3.1", + "bplist-parser": "^0.2.0", + "cross-spawn": "^7.0.1", + "elementtree": "^0.1.7", + "endent": "^1.4.1", + "fast-glob": "^3.2.2", + "fs-extra": "^9.0.0", + "glob": "^7.1.6", + "plist": "^3.0.1", + "q": "^1.5.1", + "read-chunk": "^3.2.0", + "strip-bom": "^4.0.0", + "underscore": "^1.9.2" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/cordova-ios": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-6.2.0.tgz", + "integrity": "sha512-sLjZg2QBI1SpQVwfe0MSn89YNVkBGLW9Q1vcFJBsqKBrhvoEOJ5Ytq0gwqdhgTOGzlwJUfxC6OHM3jcsRjtYrw==", + "dev": true, + "dependencies": { + "cordova-common": "^4.0.2", + "fs-extra": "^9.1.0", + "ios-sim": "^8.0.2", + "nopt": "^5.0.0", + "plist": "^3.0.1", + "semver": "^7.3.4", + "unorm": "^1.6.0", + "which": "^2.0.2", + "xcode": "^3.0.1", + "xml-escape": "^1.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "node_modules/elementtree": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz", + "integrity": "sha1-mskb5uUvtuYkTE5UpKw+2K6OKcA=", + "dev": true, + "dependencies": { + "sax": "1.1.4" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/endent": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/endent/-/endent-1.4.1.tgz", + "integrity": "sha512-buHTb5c8AC9NshtP6dgmNLYkiT+olskbq1z6cEGvfGCF3Qphbu/1zz5Xu+yjTDln8RbxNhPoUyJ5H8MSrp1olQ==", + "dev": true, + "dependencies": { + "dedent": "^0.7.0", + "fast-json-parse": "^1.0.3", + "objectorarray": "^1.0.4" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/extsprintf": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", + "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-parse": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/fast-json-parse/-/fast-json-parse-1.0.3.tgz", + "integrity": "sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/instabug-cordova": { + "resolved": "..", + "link": true + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/ios-sim": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz", + "integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.0.6", + "nopt": "1.0.9", + "plist": "^3.0.1", + "simctl": "^2" + }, + "bin": { + "ios-sim": "bin/ios-sim" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ios-sim/node_modules/bplist-parser": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", + "integrity": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=", + "dev": true + }, + "node_modules/ios-sim/node_modules/nopt": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz", + "integrity": "sha1-O8DXy6e/sNWmdtvtfA6+SKT9RU4=", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/objectorarray": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/objectorarray/-/objectorarray-1.0.5.tgz", + "integrity": "sha512-eJJDYkhJFFbBBAxeh8xW+weHlkI28n2ZdQV/J/DNfWfSKlGEf2xcfAbZTv3riEXHAhL9SVOTs2pRmXiSTf78xg==", + "dev": true + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/plist": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.5.tgz", + "integrity": "sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA==", + "dev": true, + "dependencies": { + "base64-js": "^1.5.1", + "xmlbuilder": "^9.0.7" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/properties-parser": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.3.1.tgz", + "integrity": "sha1-ExbpU5/7/ZOEXjabIRAiq9R4dxo=", + "dev": true, + "dependencies": { + "string.prototype.codepointat": "^0.2.0" + }, + "engines": { + "node": ">= 0.3.1" + } + }, + "node_modules/q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true, + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/read-chunk": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-3.2.0.tgz", + "integrity": "sha512-CEjy9LCzhmD7nUpJ1oVOE6s/hBkejlcJEgLQHVnQznOSilOPb+kpKktlLfFDK3/WP43+F80xkUTM2VOkYoSYvQ==", + "dev": true, + "dependencies": { + "pify": "^4.0.1", + "with-open-file": "^0.1.6" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/sax": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.4.tgz", + "integrity": "sha1-dLbTPJrh4AFRDxeakRaFiPGu2qk=", + "dev": true + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/simctl": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/simctl/-/simctl-2.0.3.tgz", + "integrity": "sha512-kKCak0yszxHae5eVWcmrjV3ouUGac3sjlhjdLWpyPu4eiQcWoHsCrqS34kkgzHN8Ystqkh/LFjzrldk/g3BYJg==", + "dev": true, + "dependencies": { + "shelljs": "^0.8.5", + "tail": "^0.4.0" + } + }, + "node_modules/simple-plist": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.3.0.tgz", + "integrity": "sha512-uYWpeGFtZtVt2NhG4AHgpwx323zxD85x42heMJBan1qAiqqozIlaGrwrEt6kRjXWRWIXsuV1VLCvVmZan2B5dg==", + "dev": true, + "dependencies": { + "bplist-creator": "0.1.0", + "bplist-parser": "0.3.0", + "plist": "^3.0.4" + } + }, + "node_modules/simple-plist/node_modules/bplist-parser": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.0.tgz", + "integrity": "sha512-zgmaRvT6AN1JpPPV+S0a1/FAtoxSreYDccZGIqEMSvZl9DMe70mJ7MFzpxa1X+gHVdkToE2haRUHHMiW1OdejA==", + "dev": true, + "dependencies": { + "big-integer": "1.6.x" + }, + "engines": { + "node": ">= 5.10.0" + } + }, + "node_modules/stream-buffers": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", + "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/string.prototype.codepointat": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz", + "integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==", + "dev": true + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tail": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz", + "integrity": "sha1-0p3nJ1DMmdseBTr/E8NZ7PtxMAI=", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/tests-example": { + "resolved": "tests", + "link": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/underscore": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz", + "integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==", + "dev": true + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unorm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", + "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/with-open-file": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/with-open-file/-/with-open-file-0.1.7.tgz", + "integrity": "sha512-ecJS2/oHtESJ1t3ZfMI3B7KIDKyfN0O16miWxdn30zdh66Yd3LsRFebXZXq6GU4xfxLf6nVxp9kIqElb5fqczA==", + "dev": true, + "dependencies": { + "p-finally": "^1.0.0", + "p-try": "^2.1.0", + "pify": "^4.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/xcode": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/xcode/-/xcode-3.0.1.tgz", + "integrity": "sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA==", + "dev": true, + "dependencies": { + "simple-plist": "^1.1.0", + "uuid": "^7.0.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/xml-escape": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz", + "integrity": "sha1-OQTBQ/qOs6ADDsZG0pAqLxtwbEQ=", + "dev": true + }, + "node_modules/xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "tests": { + "name": "tests-example", + "version": "1.0.0", + "dev": true, + "license": "Apache-2.0" + } + }, + "dependencies": { + "@netflix/nerror": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@netflix/nerror/-/nerror-1.1.3.tgz", + "integrity": "sha512-b+MGNyP9/LXkapreJzNUzcvuzZslj/RGgdVVJ16P2wSlYatfLycPObImqVJSmNAdyeShvNeM/pl3sVZsObFueg==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "extsprintf": "^1.4.0", + "lodash": "^4.17.15" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "android-versions": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.7.0.tgz", + "integrity": "sha512-TCy4b8Dk8YS6A23ZPfhSKqK66JHFq0D8avGYiwvYpjno6HrrcI0DRgHx9+jtkvWYmrsE2vQWgbHJhvGGhhOb0g==", + "dev": true, + "requires": { + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "ansi": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", + "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=", + "dev": true + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true + }, + "bplist-creator": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.1.0.tgz", + "integrity": "sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg==", + "dev": true, + "requires": { + "stream-buffers": "2.2.x" + } + }, + "bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "requires": { + "big-integer": "^1.6.44" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "cordova-android": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-10.1.1.tgz", + "integrity": "sha512-eoJp5AcDMHniqmxj0CbUF/rVQfbbp108TWKU6oyJW9rl/ZTJqZxm5ybznl+1/1MBksklxhMeipMn0Iwd0kEzEQ==", + "dev": true, + "requires": { + "android-versions": "^1.7.0", + "cordova-common": "^4.0.2", + "execa": "^5.1.1", + "fast-glob": "^3.2.7", + "fs-extra": "^10.0.0", + "is-path-inside": "^3.0.3", + "nopt": "^5.0.0", + "properties-parser": "^0.3.1", + "semver": "^7.3.5", + "untildify": "^4.0.0", + "which": "^2.0.2" + }, + "dependencies": { + "fs-extra": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + } + } + }, + "cordova-common": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-4.0.2.tgz", + "integrity": "sha512-od7aNShyuBajzPY83mUEO8tERwwWdFklXETHiXP5Ft87CWeo/tSuwNPFztyTy8XYc74yXdogXKPTJeUHuVzB8Q==", + "dev": true, + "requires": { + "@netflix/nerror": "^1.1.3", + "ansi": "^0.3.1", + "bplist-parser": "^0.2.0", + "cross-spawn": "^7.0.1", + "elementtree": "^0.1.7", + "endent": "^1.4.1", + "fast-glob": "^3.2.2", + "fs-extra": "^9.0.0", + "glob": "^7.1.6", + "plist": "^3.0.1", + "q": "^1.5.1", + "read-chunk": "^3.2.0", + "strip-bom": "^4.0.0", + "underscore": "^1.9.2" + } + }, + "cordova-ios": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-6.2.0.tgz", + "integrity": "sha512-sLjZg2QBI1SpQVwfe0MSn89YNVkBGLW9Q1vcFJBsqKBrhvoEOJ5Ytq0gwqdhgTOGzlwJUfxC6OHM3jcsRjtYrw==", + "dev": true, + "requires": { + "cordova-common": "^4.0.2", + "fs-extra": "^9.1.0", + "ios-sim": "^8.0.2", + "nopt": "^5.0.0", + "plist": "^3.0.1", + "semver": "^7.3.4", + "unorm": "^1.6.0", + "which": "^2.0.2", + "xcode": "^3.0.1", + "xml-escape": "^1.1.0" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "elementtree": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz", + "integrity": "sha1-mskb5uUvtuYkTE5UpKw+2K6OKcA=", + "dev": true, + "requires": { + "sax": "1.1.4" + } + }, + "endent": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/endent/-/endent-1.4.1.tgz", + "integrity": "sha512-buHTb5c8AC9NshtP6dgmNLYkiT+olskbq1z6cEGvfGCF3Qphbu/1zz5Xu+yjTDln8RbxNhPoUyJ5H8MSrp1olQ==", + "dev": true, + "requires": { + "dedent": "^0.7.0", + "fast-json-parse": "^1.0.3", + "objectorarray": "^1.0.4" + } + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "extsprintf": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", + "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", + "dev": true + }, + "fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "fast-json-parse": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/fast-json-parse/-/fast-json-parse-1.0.3.tgz", + "integrity": "sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw==", + "dev": true + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "instabug-cordova": { + "version": "file:.." + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, + "ios-sim": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz", + "integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==", + "dev": true, + "requires": { + "bplist-parser": "^0.0.6", + "nopt": "1.0.9", + "plist": "^3.0.1", + "simctl": "^2" + }, + "dependencies": { + "bplist-parser": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", + "integrity": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=", + "dev": true + }, + "nopt": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz", + "integrity": "sha1-O8DXy6e/sNWmdtvtfA6+SKT9RU4=", + "dev": true, + "requires": { + "abbrev": "1" + } + } + } + }, + "is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "objectorarray": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/objectorarray/-/objectorarray-1.0.5.tgz", + "integrity": "sha512-eJJDYkhJFFbBBAxeh8xW+weHlkI28n2ZdQV/J/DNfWfSKlGEf2xcfAbZTv3riEXHAhL9SVOTs2pRmXiSTf78xg==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "plist": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.5.tgz", + "integrity": "sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA==", + "dev": true, + "requires": { + "base64-js": "^1.5.1", + "xmlbuilder": "^9.0.7" + } + }, + "properties-parser": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.3.1.tgz", + "integrity": "sha1-ExbpU5/7/ZOEXjabIRAiq9R4dxo=", + "dev": true, + "requires": { + "string.prototype.codepointat": "^0.2.0" + } + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "read-chunk": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-3.2.0.tgz", + "integrity": "sha512-CEjy9LCzhmD7nUpJ1oVOE6s/hBkejlcJEgLQHVnQznOSilOPb+kpKktlLfFDK3/WP43+F80xkUTM2VOkYoSYvQ==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "with-open-file": "^0.1.6" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "dev": true, + "requires": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "sax": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.4.tgz", + "integrity": "sha1-dLbTPJrh4AFRDxeakRaFiPGu2qk=", + "dev": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "simctl": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/simctl/-/simctl-2.0.3.tgz", + "integrity": "sha512-kKCak0yszxHae5eVWcmrjV3ouUGac3sjlhjdLWpyPu4eiQcWoHsCrqS34kkgzHN8Ystqkh/LFjzrldk/g3BYJg==", + "dev": true, + "requires": { + "shelljs": "^0.8.5", + "tail": "^0.4.0" + } + }, + "simple-plist": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.3.0.tgz", + "integrity": "sha512-uYWpeGFtZtVt2NhG4AHgpwx323zxD85x42heMJBan1qAiqqozIlaGrwrEt6kRjXWRWIXsuV1VLCvVmZan2B5dg==", + "dev": true, + "requires": { + "bplist-creator": "0.1.0", + "bplist-parser": "0.3.0", + "plist": "^3.0.4" + }, + "dependencies": { + "bplist-parser": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.0.tgz", + "integrity": "sha512-zgmaRvT6AN1JpPPV+S0a1/FAtoxSreYDccZGIqEMSvZl9DMe70mJ7MFzpxa1X+gHVdkToE2haRUHHMiW1OdejA==", + "dev": true, + "requires": { + "big-integer": "1.6.x" + } + } + } + }, + "stream-buffers": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", + "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=", + "dev": true + }, + "string.prototype.codepointat": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz", + "integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==", + "dev": true + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "tail": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz", + "integrity": "sha1-0p3nJ1DMmdseBTr/E8NZ7PtxMAI=", + "dev": true + }, + "tests-example": { + "version": "file:tests" + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "underscore": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz", + "integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==", + "dev": true + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, + "unorm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", + "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==", + "dev": true + }, + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true + }, + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "with-open-file": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/with-open-file/-/with-open-file-0.1.7.tgz", + "integrity": "sha512-ecJS2/oHtESJ1t3ZfMI3B7KIDKyfN0O16miWxdn30zdh66Yd3LsRFebXZXq6GU4xfxLf6nVxp9kIqElb5fqczA==", + "dev": true, + "requires": { + "p-finally": "^1.0.0", + "p-try": "^2.1.0", + "pify": "^4.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xcode": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/xcode/-/xcode-3.0.1.tgz", + "integrity": "sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA==", + "dev": true, + "requires": { + "simple-plist": "^1.1.0", + "uuid": "^7.0.3" + } + }, + "xml-escape": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz", + "integrity": "sha1-OQTBQ/qOs6ADDsZG0pAqLxtwbEQ=", + "dev": true + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } +} diff --git a/sampleApp/package.json b/example/package.json similarity index 52% rename from sampleApp/package.json rename to example/package.json index 39aa71d9..37db88f7 100644 --- a/sampleApp/package.json +++ b/example/package.json @@ -1,31 +1,31 @@ { - "name": "helloworld", - "displayName": "HelloCordova", + "name": "com.instabug.example", + "displayName": "InstabugExample", "version": "1.0.0", "description": "A sample Apache Cordova application that responds to the deviceready event.", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "build": "cordova prepare; cordova plugins add --link ../ tests" }, "keywords": [ "ecosystem:cordova" ], "author": "Apache Cordova Team", "license": "Apache-2.0", - "dependencies": { - "cordova-android": "^8.0.0", - "cordova-ios": "^5.0.1" - }, "devDependencies": { - "cordova-plugin-whitelist": "^1.3.4" + "cordova-android": "^10.1.1", + "cordova-ios": "^6.2.0", + "instabug-cordova": "file:..", + "tests-example": "file:tests" }, "cordova": { - "plugins": { - "cordova-plugin-whitelist": {} - }, "platforms": [ "ios", "android" - ] + ], + "plugins": { + "instabug-cordova": {}, + "tests-example": {} + } } } \ No newline at end of file diff --git a/example/tests/.gitignore b/example/tests/.gitignore new file mode 100644 index 00000000..5e1e597f --- /dev/null +++ b/example/tests/.gitignore @@ -0,0 +1,8 @@ +.DS_Store + +# Generated by package manager +node_modules/ + +# Generated by Cordova +/plugins/ +/platforms/ diff --git a/example/tests/package.json b/example/tests/package.json new file mode 100644 index 00000000..1fece743 --- /dev/null +++ b/example/tests/package.json @@ -0,0 +1,15 @@ +{ + "name": "tests-example", + "displayName": "Example Tests", + "version": "1.0.0", + "description": "Contains tests for example projects.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [ + "ecosystem:cordova" + ], + "author": "Apache Cordova Team", + "license": "Apache-2.0" +} diff --git a/example/tests/plugin.xml b/example/tests/plugin.xml new file mode 100644 index 00000000..f2a383e0 --- /dev/null +++ b/example/tests/plugin.xml @@ -0,0 +1,26 @@ + + + + + instabug-tests + Injects unit and UI tests for android and iOS platforms in the example app. + + + + + + + + + + + + + + + + + diff --git a/example/tests/scripts/xcode-project.js b/example/tests/scripts/xcode-project.js new file mode 100644 index 00000000..d068eccb --- /dev/null +++ b/example/tests/scripts/xcode-project.js @@ -0,0 +1,37 @@ +const fs = require("fs"); +const path = require('path'); + +// Overwrites both the project file (.pbxproj) +// and the workspace scheme file (.xcscheme) +// by the files found in src/ios. +// +// The new files should contain two targets as follows: +// 1. InstabugExampleTests : unit tests bundle target +// 2. InstabugExampleUITests : ui tests bundle target + +module.exports = (ctx) => { + const srcRoot = path.join(ctx.opts.plugin.dir, "src/ios"); + const iosRoot = path.join(ctx.opts.projectRoot, "platforms/ios"); + + const projectFile = "InstabugExample.xcodeproj/project.pbxproj"; + + fs.copyFile( + path.join(srcRoot, projectFile), + path.join(iosRoot, projectFile), + (err) => { + if (err) throw err; + console.log(`${projectFile} copied successfully!`); + } + ); + + const schemeFile = "InstabugExample.xcworkspace/xcshareddata/xcschemes/InstabugExample.xcscheme"; + + fs.copyFile( + path.join(srcRoot, schemeFile), + path.join(iosRoot, schemeFile), + (err) => { + if (err) throw err; + console.log(`${schemeFile} copied successfully!`); + } + ); +}; diff --git a/example/tests/src/android/androidTest/InvokeInstabugUITest.java b/example/tests/src/android/androidTest/InvokeInstabugUITest.java new file mode 100644 index 00000000..b87439c9 --- /dev/null +++ b/example/tests/src/android/androidTest/InvokeInstabugUITest.java @@ -0,0 +1,34 @@ +package com.instabug.example; + +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.action.ViewActions.replaceText; +import static androidx.test.espresso.matcher.ViewMatchers.withResourceName; +import static androidx.test.espresso.matcher.ViewMatchers.withText; + +import androidx.test.ext.junit.rules.ActivityScenarioRule; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(AndroidJUnit4.class) +public class InvokeInstabugUITest { + + @Rule + public ActivityScenarioRule mActivityRule = + new ActivityScenarioRule<>(MainActivity.class); + + @Test + public void ensureInstabugInvocation() throws InterruptedException { + Thread.sleep(5000); + onView(withResourceName("instabug_floating_button")).perform(click()); + + onView(withText("Report a bug")).perform(click()); + onView(withResourceName("instabug_edit_text_email")).perform(replaceText("inst@bug.com")); + onView(withResourceName("instabug_bugreporting_send")).perform(click()); + onView(withResourceName("instabug_success_dialog_container")).perform(click()); + } + +} diff --git a/example/tests/src/android/test/IBGPluginTests.java b/example/tests/src/android/test/IBGPluginTests.java new file mode 100644 index 00000000..9669bef2 --- /dev/null +++ b/example/tests/src/android/test/IBGPluginTests.java @@ -0,0 +1,32 @@ +package com.instabug.example; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.mockStatic; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.verify; + +import com.instabug.cordova.plugin.IBGPlugin; +import com.instabug.library.Instabug; + +import org.apache.cordova.CallbackContext; +import org.junit.Before; +import org.junit.Test; +import org.mockito.MockedStatic; + + +public class IBGPluginTests { + private MockedStatic mockInstabug; + private final IBGPlugin mockPlugin = spy(new IBGPlugin()); + private final CallbackContext mockContext = mock(CallbackContext.class); + + @Before + public void setup() { + mockInstabug = mockStatic(Instabug.class); + } + + @Test + public void testShow() { + mockPlugin.show(mockContext); + verify(mockContext).success(); + } +} diff --git a/example/tests/src/android/tests.gradle b/example/tests/src/android/tests.gradle new file mode 100644 index 00000000..fda20c0e --- /dev/null +++ b/example/tests/src/android/tests.gradle @@ -0,0 +1,16 @@ +// Dependencies for Unit and UI tests +dependencies { + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test:rules:1.4.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + + testImplementation 'junit:junit:4.13.2' + testImplementation 'org.mockito:mockito-inline:3.4.0' + testImplementation 'org.json:json:20180813' +} + +android { + defaultConfig { + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } +} \ No newline at end of file diff --git a/sampleApp/platforms/ios/HelloCordova.xcodeproj/project.pbxproj b/example/tests/src/ios/InstabugExample.xcodeproj/project.pbxproj old mode 100755 new mode 100644 similarity index 60% rename from sampleApp/platforms/ios/HelloCordova.xcodeproj/project.pbxproj rename to example/tests/src/ios/InstabugExample.xcodeproj/project.pbxproj index 6b71c607..ea5bc3fd --- a/sampleApp/platforms/ios/HelloCordova.xcodeproj/project.pbxproj +++ b/example/tests/src/ios/InstabugExample.xcodeproj/project.pbxproj @@ -3,81 +3,74 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { + /* Begin PBXBuildFile section */ 0207DA581B56EA530066E2B4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0207DA571B56EA530066E2B4 /* Images.xcassets */; }; + 0E31CB20285A12920090BCF6 /* InvokeInstabugUITest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E31CB1F285A12920090BCF6 /* InvokeInstabugUITest.m */; }; + 0E31CB30285A12A50090BCF6 /* InstabugExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E31CB2F285A12A50090BCF6 /* InstabugExampleTests.m */; }; 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; settings = {ATTRIBUTES = (Required, ); }; }; 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; }; 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; }; + 5E56E9D77C2A469E968F11CB /* ArgsRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = 1718742CB8BD4C72AC4D8AFB /* ArgsRegistry.m */; }; 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; - A0637B572322C51F00D5BDA3 /* HelloCordovaUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0637B562322C51F00D5BDA3 /* HelloCordovaUITests.swift */; }; - A0637B662322C5C400D5BDA3 /* HelloCordovaUITest.m in Sources */ = {isa = PBXBuildFile; fileRef = A0637B652322C5C400D5BDA3 /* HelloCordovaUITest.m */; }; + 8163E8A2B4324A7EAB9F01BB /* IBGPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E7C69F401A64034A22084C5 /* IBGPlugin.m */; }; + A89BFCA79E392FD771BA8CA1 /* Pods_InstabugExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4FD05904E49982B6BC61107A /* Pods_InstabugExample.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 0E31CB23285A12920090BCF6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1D6058900D05DD3D006BFB54; + remoteInfo = InstabugExample; + }; + 0E31CB31285A12A50090BCF6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1D6058900D05DD3D006BFB54; + remoteInfo = InstabugExample; + }; 301BF534109A57CC0062928A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = CordovaLib; }; 301BF550109A68C00062928A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; proxyType = 1; remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = CordovaLib; }; 907D8123214C687600058A10 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; proxyType = 2; remoteGlobalIDString = C0C01EB21E3911D50056E6CB; remoteInfo = Cordova; }; - A0637B592322C51F00D5BDA3 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1D6058900D05DD3D006BFB54; - remoteInfo = HelloCordova; - }; - A0637B682322C5C400D5BDA3 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1D6058900D05DD3D006BFB54; - remoteInfo = HelloCordova; - }; /* End PBXContainerItemProxy section */ -/* Begin PBXCopyFilesBuildPhase section */ - 6969D0C6BFDD45318A4C3FF7 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - D0E5A41C7B5748E58EEED802 /* Instabug.framework in Embed Frameworks */, - 7F03AB0D2D8A4A4F93A277F0 /* Instabug.framework in Embed Frameworks */, - CA77A2CAC74C426D9AFF8650 /* Instabug.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ - 0207DA571B56EA530066E2B4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HelloCordova/Images.xcassets; sourceTree = SOURCE_ROOT; }; + 0207DA571B56EA530066E2B4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = InstabugExample/Images.xcassets; sourceTree = SOURCE_ROOT; }; + 0E31CB1D285A12920090BCF6 /* InstabugExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InstabugExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E31CB1F285A12920090BCF6 /* InvokeInstabugUITest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InvokeInstabugUITest.m; sourceTree = ""; }; + 0E31CB2D285A12A50090BCF6 /* InstabugExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InstabugExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E31CB2F285A12A50090BCF6 /* InstabugExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstabugExampleTests.m; sourceTree = ""; }; + 1718742CB8BD4C72AC4D8AFB /* ArgsRegistry.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = ArgsRegistry.m; path = ../../../../../src/ios/util/ArgsRegistry.m; sourceTree = ""; }; 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* HelloCordova.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloCordova.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1D6058910D05DD3D006BFB54 /* InstabugExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InstabugExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = ""; }; + 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = ""; }; 301BF56E109A69640062928A /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = SOURCE_ROOT; }; 302D95EE14D2391D003F00A1 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; 302D95EF14D2391D003F00A1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; @@ -85,41 +78,42 @@ 3047A50F1AB8059700498E2A /* build-debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-debug.xcconfig"; path = "cordova/build-debug.xcconfig"; sourceTree = SOURCE_ROOT; }; 3047A5101AB8059700498E2A /* build-release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-release.xcconfig"; path = "cordova/build-release.xcconfig"; sourceTree = SOURCE_ROOT; }; 3047A5111AB8059700498E2A /* build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = build.xcconfig; path = cordova/build.xcconfig; sourceTree = SOURCE_ROOT; }; - 32CA4F630368D1EE00C91783 /* HelloCordova-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HelloCordova-Prefix.pch"; sourceTree = ""; }; - 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = CDVLaunchScreen.storyboard; path = HelloCordova/CDVLaunchScreen.storyboard; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* HelloCordova-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "HelloCordova-Info.plist"; path = "HelloCordova/HelloCordova-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = SOURCE_ROOT; }; - A0637B542322C51F00D5BDA3 /* HelloCordovaUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HelloCordovaUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - A0637B562322C51F00D5BDA3 /* HelloCordovaUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelloCordovaUITests.swift; sourceTree = ""; }; - A0637B582322C51F00D5BDA3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A0637B632322C5C400D5BDA3 /* HelloCordovaUITest.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HelloCordovaUITest.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - A0637B652322C5C400D5BDA3 /* HelloCordovaUITest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HelloCordovaUITest.m; sourceTree = ""; }; - A0637B672322C5C400D5BDA3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* InstabugExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "InstabugExample-Prefix.pch"; sourceTree = ""; }; + 4FD05904E49982B6BC61107A /* Pods_InstabugExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_InstabugExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6A632DF3F21A402FBC537F53 /* ArgsRegistry.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = ArgsRegistry.h; path = ../../../../../src/ios/util/ArgsRegistry.h; sourceTree = ""; }; + 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = CDVLaunchScreen.storyboard; path = InstabugExample/CDVLaunchScreen.storyboard; sourceTree = SOURCE_ROOT; }; + 8D1107310486CEB800E47090 /* InstabugExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "InstabugExample-Info.plist"; path = "InstabugExample/InstabugExample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = SOURCE_ROOT; }; + 8E7C69F401A64034A22084C5 /* IBGPlugin.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = IBGPlugin.m; path = ../../../../../src/ios/IBGPlugin.m; sourceTree = ""; }; + BDE959C269D6DC7381B8FA15 /* Pods-InstabugExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugExample.release.xcconfig"; path = "Target Support Files/Pods-InstabugExample/Pods-InstabugExample.release.xcconfig"; sourceTree = ""; }; EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = ""; }; EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = ""; }; ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = ""; }; - F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = HelloCordova/config.xml; sourceTree = ""; }; + EDF9F5601B46201F82297D24 /* Pods-InstabugExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugExample.debug.xcconfig"; path = "Target Support Files/Pods-InstabugExample/Pods-InstabugExample.debug.xcconfig"; sourceTree = ""; }; + F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = InstabugExample/config.xml; sourceTree = ""; }; + FD0720A4FF3A41AC8B3F2ED5 /* IBGPlugin.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = IBGPlugin.h; path = ../../../../../src/ios/IBGPlugin.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + 0E31CB1A285A12920090BCF6 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 301BF552109A68D80062928A /* libCordova.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - A0637B512322C51F00D5BDA3 /* Frameworks */ = { + 0E31CB2A285A12A50090BCF6 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - A0637B602322C5C400D5BDA3 /* Frameworks */ = { + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 301BF552109A68D80062928A /* libCordova.a in Frameworks */, + A89BFCA79E392FD771BA8CA1 /* Pods_InstabugExample.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -136,15 +130,31 @@ 1D3623250D0F684500981E51 /* AppDelegate.m */, ); name = Classes; - path = HelloCordova/Classes; + path = InstabugExample/Classes; sourceTree = SOURCE_ROOT; }; + 0E31CB1E285A12920090BCF6 /* InstabugExampleUITests */ = { + isa = PBXGroup; + children = ( + 0E31CB1F285A12920090BCF6 /* InvokeInstabugUITest.m */, + ); + path = InstabugExampleUITests; + sourceTree = ""; + }; + 0E31CB2E285A12A50090BCF6 /* InstabugExampleTests */ = { + isa = PBXGroup; + children = ( + 0E31CB2F285A12A50090BCF6 /* InstabugExampleTests.m */, + ); + path = InstabugExampleTests; + sourceTree = ""; + }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 1D6058910D05DD3D006BFB54 /* HelloCordova.app */, - A0637B542322C51F00D5BDA3 /* HelloCordovaUITests.xctest */, - A0637B632322C5C400D5BDA3 /* HelloCordovaUITest.xctest */, + 1D6058910D05DD3D006BFB54 /* InstabugExample.app */, + 0E31CB1D285A12920090BCF6 /* InstabugExampleUITests.xctest */, + 0E31CB2D285A12A50090BCF6 /* InstabugExampleTests.xctest */, ); name = Products; sourceTree = ""; @@ -155,15 +165,16 @@ EB87FDF41871DAF40020F90C /* config.xml */, EB87FDF31871DA8E0020F90C /* www */, EB87FDF11871DA420020F90C /* Staging */, - 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */, + 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */, 080E96DDFE201D6D7F000001 /* Classes */, 307C750510C5A3420062BCA9 /* Plugins */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, - A0637B552322C51F00D5BDA3 /* HelloCordovaUITests */, - A0637B642322C5C400D5BDA3 /* HelloCordovaUITest */, + 0E31CB1E285A12920090BCF6 /* InstabugExampleUITests */, + 0E31CB2E285A12A50090BCF6 /* InstabugExampleTests */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, + B76558EE59B0DAC9B313741D /* Pods */, ); name = CustomTemplate; sourceTree = ""; @@ -171,12 +182,12 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( - 32CA4F630368D1EE00C91783 /* HelloCordova-Prefix.pch */, + 32CA4F630368D1EE00C91783 /* InstabugExample-Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */, ); name = "Other Sources"; - path = HelloCordova; + path = InstabugExample; sourceTree = ""; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { @@ -184,16 +195,17 @@ children = ( 0207DA571B56EA530066E2B4 /* Images.xcassets */, 3047A50E1AB8057F00498E2A /* config */, - 8D1107310486CEB800E47090 /* HelloCordova-Info.plist */, + 8D1107310486CEB800E47090 /* InstabugExample-Info.plist */, 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */, ); name = Resources; - path = HelloCordova/Resources; + path = InstabugExample/Resources; sourceTree = ""; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + 4FD05904E49982B6BC61107A /* Pods_InstabugExample.framework */, ); name = Frameworks; sourceTree = ""; @@ -220,27 +232,22 @@ 307C750510C5A3420062BCA9 /* Plugins */ = { isa = PBXGroup; children = ( + 8E7C69F401A64034A22084C5 /* IBGPlugin.m */, + 1718742CB8BD4C72AC4D8AFB /* ArgsRegistry.m */, + FD0720A4FF3A41AC8B3F2ED5 /* IBGPlugin.h */, + 6A632DF3F21A402FBC537F53 /* ArgsRegistry.h */, ); name = Plugins; - path = HelloCordova/Plugins; + path = InstabugExample/Plugins; sourceTree = SOURCE_ROOT; }; - A0637B552322C51F00D5BDA3 /* HelloCordovaUITests */ = { - isa = PBXGroup; - children = ( - A0637B562322C51F00D5BDA3 /* HelloCordovaUITests.swift */, - A0637B582322C51F00D5BDA3 /* Info.plist */, - ); - path = HelloCordovaUITests; - sourceTree = ""; - }; - A0637B642322C5C400D5BDA3 /* HelloCordovaUITest */ = { + B76558EE59B0DAC9B313741D /* Pods */ = { isa = PBXGroup; children = ( - A0637B652322C5C400D5BDA3 /* HelloCordovaUITest.m */, - A0637B672322C5C400D5BDA3 /* Info.plist */, + EDF9F5601B46201F82297D24 /* Pods-InstabugExample.debug.xcconfig */, + BDE959C269D6DC7381B8FA15 /* Pods-InstabugExample.release.xcconfig */, ); - path = HelloCordovaUITest; + path = Pods; sourceTree = ""; }; EB87FDF11871DA420020F90C /* Staging */ = { @@ -255,64 +262,62 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* HelloCordova */ = { + 0E31CB1C285A12920090BCF6 /* InstabugExampleUITests */ = { isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HelloCordova" */; + buildConfigurationList = 0E31CB28285A12920090BCF6 /* Build configuration list for PBXNativeTarget "InstabugExampleUITests" */; buildPhases = ( - 304B58A110DAC018002A0835 /* Copy www directory */, - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - 6969D0C6BFDD45318A4C3FF7 /* Embed Frameworks */, - FD80B8FE5F434FE098361D7A /* StripFrameworkScript */, - 92C402A4ADBD41ECA6623F9A /* StripFrameworkScript */, - 89B6C1C3E17046628E7EF9F6 /* StripFrameworkScript */, + 0E31CB19285A12920090BCF6 /* Sources */, + 0E31CB1A285A12920090BCF6 /* Frameworks */, + 0E31CB1B285A12920090BCF6 /* Resources */, ); buildRules = ( ); dependencies = ( - 301BF551109A68C00062928A /* PBXTargetDependency */, + 0E31CB24285A12920090BCF6 /* PBXTargetDependency */, ); - name = HelloCordova; - productName = HelloCordova; - productReference = 1D6058910D05DD3D006BFB54 /* HelloCordova.app */; - productType = "com.apple.product-type.application"; + name = InstabugExampleUITests; + productName = InstabugExampleUITests; + productReference = 0E31CB1D285A12920090BCF6 /* InstabugExampleUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; }; - A0637B532322C51F00D5BDA3 /* HelloCordovaUITests */ = { + 0E31CB2C285A12A50090BCF6 /* InstabugExampleTests */ = { isa = PBXNativeTarget; - buildConfigurationList = A0637B5E2322C51F00D5BDA3 /* Build configuration list for PBXNativeTarget "HelloCordovaUITests" */; + buildConfigurationList = 0E31CB33285A12A50090BCF6 /* Build configuration list for PBXNativeTarget "InstabugExampleTests" */; buildPhases = ( - A0637B502322C51F00D5BDA3 /* Sources */, - A0637B512322C51F00D5BDA3 /* Frameworks */, - A0637B522322C51F00D5BDA3 /* Resources */, + 0E31CB29285A12A50090BCF6 /* Sources */, + 0E31CB2A285A12A50090BCF6 /* Frameworks */, + 0E31CB2B285A12A50090BCF6 /* Resources */, ); buildRules = ( ); dependencies = ( - A0637B5A2322C51F00D5BDA3 /* PBXTargetDependency */, + 0E31CB32285A12A50090BCF6 /* PBXTargetDependency */, ); - name = HelloCordovaUITests; - productName = HelloCordovaUITests; - productReference = A0637B542322C51F00D5BDA3 /* HelloCordovaUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; + name = InstabugExampleTests; + productName = InstabugExampleTests; + productReference = 0E31CB2D285A12A50090BCF6 /* InstabugExampleTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; }; - A0637B622322C5C400D5BDA3 /* HelloCordovaUITest */ = { + 1D6058900D05DD3D006BFB54 /* InstabugExample */ = { isa = PBXNativeTarget; - buildConfigurationList = A0637B6A2322C5C400D5BDA3 /* Build configuration list for PBXNativeTarget "HelloCordovaUITest" */; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "InstabugExample" */; buildPhases = ( - A0637B5F2322C5C400D5BDA3 /* Sources */, - A0637B602322C5C400D5BDA3 /* Frameworks */, - A0637B612322C5C400D5BDA3 /* Resources */, + BC7C68A1A8714B8585B103AF /* [CP] Check Pods Manifest.lock */, + 304B58A110DAC018002A0835 /* Copy www directory */, + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + A50B1BF1D93A04BFDC9741F5 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( - A0637B692322C5C400D5BDA3 /* PBXTargetDependency */, + 301BF551109A68C00062928A /* PBXTargetDependency */, ); - name = HelloCordovaUITest; - productName = HelloCordovaUITest; - productReference = A0637B632322C5C400D5BDA3 /* HelloCordovaUITest.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; + name = InstabugExample; + productName = InstabugExample; + productReference = 1D6058910D05DD3D006BFB54 /* InstabugExample.app */; + productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -320,44 +325,43 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 1010; - LastUpgradeCheck = 510; + LastUpgradeCheck = 1130; TargetAttributes = { - 1D6058900D05DD3D006BFB54 = { - ProvisioningStyle = Automatic; + 0E31CB1C285A12920090BCF6 = { + CreatedOnToolsVersion = 13.3; + TestTargetID = 1D6058900D05DD3D006BFB54; }; - A0637B532322C51F00D5BDA3 = { - CreatedOnToolsVersion = 10.1; - ProvisioningStyle = Automatic; + 0E31CB2C285A12A50090BCF6 = { + CreatedOnToolsVersion = 13.3; TestTargetID = 1D6058900D05DD3D006BFB54; }; - A0637B622322C5C400D5BDA3 = { - CreatedOnToolsVersion = 10.1; + 1D6058900D05DD3D006BFB54 = { ProvisioningStyle = Automatic; - TestTargetID = 1D6058900D05DD3D006BFB54; }; }; }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HelloCordova" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "InstabugExample" */; + compatibilityVersion = "Xcode 11.0"; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, + Base, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */; projectDirPath = ""; projectReferences = ( { ProductGroup = 301BF52E109A57CC0062928A /* Products */; - ProjectRef = 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */; + ProjectRef = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; }, ); projectRoot = ""; targets = ( - 1D6058900D05DD3D006BFB54 /* HelloCordova */, - A0637B532322C51F00D5BDA3 /* HelloCordovaUITests */, - A0637B622322C5C400D5BDA3 /* HelloCordovaUITest */, + 1D6058900D05DD3D006BFB54 /* InstabugExample */, + 0E31CB1C285A12920090BCF6 /* InstabugExampleUITests */, + 0E31CB2C285A12A50090BCF6 /* InstabugExampleTests */, ); }; /* End PBXProject section */ @@ -380,27 +384,27 @@ /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { + 0E31CB1B285A12920090BCF6 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */, - 0207DA581B56EA530066E2B4 /* Images.xcassets in Resources */, - 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - A0637B522322C51F00D5BDA3 /* Resources */ = { + 0E31CB2B285A12A50090BCF6 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - A0637B612322C5C400D5BDA3 /* Resources */ = { + 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */, + 0207DA581B56EA530066E2B4 /* Images.xcassets in Resources */, + 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -419,177 +423,116 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$SRCROOT/HelloCordova/Scripts/copy-www-build-step.sh\""; + shellScript = "\"$SRCROOT/InstabugExample/Scripts/copy-www-build-step.sh\""; showEnvVarsInLog = 0; }; - FD80B8FE5F434FE098361D7A /* StripFrameworkScript */ = { + A50B1BF1D93A04BFDC9741F5 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-InstabugExample/Pods-InstabugExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = StripFrameworkScript; - outputPaths = ( + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-InstabugExample/Pods-InstabugExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework/strip-frameworks.sh\""; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InstabugExample/Pods-InstabugExample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - 92C402A4ADBD41ECA6623F9A /* StripFrameworkScript */ = { + BC7C68A1A8714B8585B103AF /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - runOnlyForDeploymentPostprocessing = 0; - name = "StripFrameworkScript"; - inputPaths = ( - ); - outputPaths = ( - ); - shellPath = /bin/sh; - shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework/strip-frameworks.sh\""; - }; - 89B6C1C3E17046628E7EF9F6 /* StripFrameworkScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( + inputFileListPaths = ( ); - runOnlyForDeploymentPostprocessing = 0; - name = "StripFrameworkScript"; inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-InstabugExample-checkManifestLockResult.txt", ); + runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework/strip-frameworks.sh\""; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { + 0E31CB19285A12920090BCF6 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, + 0E31CB20285A12920090BCF6 /* InvokeInstabugUITest.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - A0637B502322C51F00D5BDA3 /* Sources */ = { + 0E31CB29285A12A50090BCF6 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A0637B572322C51F00D5BDA3 /* HelloCordovaUITests.swift in Sources */, + 0E31CB30285A12A50090BCF6 /* InstabugExampleTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - A0637B5F2322C5C400D5BDA3 /* Sources */ = { + 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A0637B662322C5C400D5BDA3 /* HelloCordovaUITest.m in Sources */, + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, + 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, + 8163E8A2B4324A7EAB9F01BB /* IBGPlugin.m in Sources */, + 5E56E9D77C2A469E968F11CB /* ArgsRegistry.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 301BF551109A68C00062928A /* PBXTargetDependency */ = { + 0E31CB24285A12920090BCF6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = CordovaLib; - targetProxy = 301BF550109A68C00062928A /* PBXContainerItemProxy */; + target = 1D6058900D05DD3D006BFB54 /* InstabugExample */; + targetProxy = 0E31CB23285A12920090BCF6 /* PBXContainerItemProxy */; }; - A0637B5A2322C51F00D5BDA3 /* PBXTargetDependency */ = { + 0E31CB32285A12A50090BCF6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 1D6058900D05DD3D006BFB54 /* HelloCordova */; - targetProxy = A0637B592322C51F00D5BDA3 /* PBXContainerItemProxy */; + target = 1D6058900D05DD3D006BFB54 /* InstabugExample */; + targetProxy = 0E31CB31285A12A50090BCF6 /* PBXContainerItemProxy */; }; - A0637B692322C5C400D5BDA3 /* PBXTargetDependency */ = { + 301BF551109A68C00062928A /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 1D6058900D05DD3D006BFB54 /* HelloCordova */; - targetProxy = A0637B682322C5C400D5BDA3 /* PBXContainerItemProxy */; + name = CordovaLib; + targetProxy = 301BF550109A68C00062928A /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"HelloCordova/Plugins/instabug-cordova\"", - "\"HelloCordova/Plugins/instabug-cordova\"", - "\"HelloCordova/Plugins/instabug-cordova\"", - ); - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "HelloCordova/HelloCordova-Prefix.pch"; - GCC_THUMB_SUPPORT = NO; - GCC_VERSION = ""; - INFOPLIST_FILE = "HelloCordova/HelloCordova-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.cordova.hellocordova; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3047A5101AB8059700498E2A /* build-release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"HelloCordova/Plugins/instabug-cordova\"", - "\"HelloCordova/Plugins/instabug-cordova\"", - "\"HelloCordova/Plugins/instabug-cordova\"", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "HelloCordova/HelloCordova-Prefix.pch"; - GCC_THUMB_SUPPORT = NO; - GCC_VERSION = ""; - INFOPLIST_FILE = "HelloCordova/HelloCordova-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.cordova.hellocordova; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - A0637B5B2322C51F00D5BDA3 /* Debug */ = { + 0E31CB25285A12920090BCF6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; @@ -600,83 +543,71 @@ ); GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = HelloCordovaUITests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.4; + MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = a.HelloCordovaUITests; + PRODUCT_BUNDLE_IDENTIFIER = tests.InstabugExampleUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_EMIT_LOC_STRINGS = NO; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = HelloCordova; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"HelloCordova/Plugins/instabug-cordova\"", - "\"HelloCordova/Plugins/instabug-cordova\"", - ); + TEST_TARGET_NAME = InstabugExample; }; name = Debug; }; - A0637B5C2322C51F00D5BDA3 /* Release */ = { + 0E31CB26285A12920090BCF6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = HelloCordovaUITests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.4; + MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = a.HelloCordovaUITests; + PRODUCT_BUNDLE_IDENTIFIER = tests.InstabugExampleUITests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_EMIT_LOC_STRINGS = NO; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = HelloCordova; + TEST_TARGET_NAME = InstabugExample; VALIDATE_PRODUCT = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"HelloCordova/Plugins/instabug-cordova\"", - "\"HelloCordova/Plugins/instabug-cordova\"", - ); }; name = Release; }; - A0637B6B2322C5C400D5BDA3 /* Debug */ = { + 0E31CB34285A12A50090BCF6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; @@ -687,59 +618,100 @@ ); GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = HelloCordovaUITest/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.4; + MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = a.HelloCordovaUITest; + PRODUCT_BUNDLE_IDENTIFIER = tests.InstabugExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = HelloCordova; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"HelloCordova/Plugins/instabug-cordova\"", - "\"HelloCordova/Plugins/instabug-cordova\"", - ); + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InstabugExample.app/InstabugExample"; }; name = Debug; }; - A0637B6C2322C5C400D5BDA3 /* Release */ = { + 0E31CB35285A12A50090BCF6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = HelloCordovaUITest/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.4; + MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = a.HelloCordovaUITest; + PRODUCT_BUNDLE_IDENTIFIER = tests.InstabugExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = HelloCordova; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InstabugExample.app/InstabugExample"; VALIDATE_PRODUCT = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"HelloCordova/Plugins/instabug-cordova\"", - "\"HelloCordova/Plugins/instabug-cordova\"", - ); + }; + name = Release; + }; + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "InstabugExample/InstabugExample-Prefix.pch"; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + INFOPLIST_FILE = "InstabugExample/InstabugExample-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.instabug.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE = NO; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3047A5101AB8059700498E2A /* build-release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "InstabugExample/InstabugExample-Prefix.pch"; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + INFOPLIST_FILE = "InstabugExample/InstabugExample-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.instabug.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_WORKSPACE = NO; }; name = Release; }; @@ -747,6 +719,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 3047A5111AB8059700498E2A /* build.xcconfig */; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; @@ -779,9 +752,9 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.cordova.hellocordova; SDKROOT = iphoneos; SKIP_INSTALL = NO; + WK_WEB_VIEW_ONLY = 1; }; name = Debug; }; @@ -789,6 +762,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 3047A5111AB8059700498E2A /* build.xcconfig */; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; @@ -819,43 +793,43 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.cordova.hellocordova; SDKROOT = iphoneos; SKIP_INSTALL = NO; + WK_WEB_VIEW_ONLY = 1; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HelloCordova" */ = { + 0E31CB28285A12920090BCF6 /* Build configuration list for PBXNativeTarget "InstabugExampleUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, + 0E31CB25285A12920090BCF6 /* Debug */, + 0E31CB26285A12920090BCF6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A0637B5E2322C51F00D5BDA3 /* Build configuration list for PBXNativeTarget "HelloCordovaUITests" */ = { + 0E31CB33285A12A50090BCF6 /* Build configuration list for PBXNativeTarget "InstabugExampleTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0637B5B2322C51F00D5BDA3 /* Debug */, - A0637B5C2322C51F00D5BDA3 /* Release */, + 0E31CB34285A12A50090BCF6 /* Debug */, + 0E31CB35285A12A50090BCF6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A0637B6A2322C5C400D5BDA3 /* Build configuration list for PBXNativeTarget "HelloCordovaUITest" */ = { + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "InstabugExample" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0637B6B2322C5C400D5BDA3 /* Debug */, - A0637B6C2322C5C400D5BDA3 /* Release */, + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HelloCordova" */ = { + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "InstabugExample" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, diff --git a/sampleApp/platforms/ios/HelloCordova.xcworkspace/xcshareddata/xcschemes/HelloCordova.xcscheme b/example/tests/src/ios/InstabugExample.xcworkspace/xcshareddata/xcschemes/InstabugExample.xcscheme similarity index 67% rename from sampleApp/platforms/ios/HelloCordova.xcworkspace/xcshareddata/xcschemes/HelloCordova.xcscheme rename to example/tests/src/ios/InstabugExample.xcworkspace/xcshareddata/xcschemes/InstabugExample.xcscheme index f8259f9f..c2db9c88 100644 --- a/sampleApp/platforms/ios/HelloCordova.xcworkspace/xcshareddata/xcschemes/HelloCordova.xcscheme +++ b/example/tests/src/ios/InstabugExample.xcworkspace/xcshareddata/xcschemes/InstabugExample.xcscheme @@ -15,9 +15,9 @@ + BuildableName = "InstabugExample.app" + BlueprintName = "InstabugExample" + ReferencedContainer = "container:InstabugExample.xcodeproj"> @@ -27,29 +27,37 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + + BlueprintIdentifier = "0E31CB1C285A12920090BCF6" + BuildableName = "InstabugExampleUITests.xctest" + BlueprintName = "InstabugExampleUITests" + ReferencedContainer = "container:InstabugExample.xcodeproj"> + + + + - - - - - - + BuildableName = "InstabugExample.app" + BlueprintName = "InstabugExample" + ReferencedContainer = "container:InstabugExample.xcodeproj"> - - + BuildableName = "InstabugExample.app" + BlueprintName = "InstabugExample" + ReferencedContainer = "container:InstabugExample.xcodeproj"> diff --git a/example/tests/src/ios/InstabugExampleTests/InstabugExampleTests.m b/example/tests/src/ios/InstabugExampleTests/InstabugExampleTests.m new file mode 100644 index 00000000..61ded66b --- /dev/null +++ b/example/tests/src/ios/InstabugExampleTests/InstabugExampleTests.m @@ -0,0 +1,29 @@ +#import + +@interface InstabugExampleTests : XCTestCase + +@end + +@implementation InstabugExampleTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testExample { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git a/sampleApp/platforms/ios/HelloCordovaUITest/HelloCordovaUITest.m b/example/tests/src/ios/InstabugExampleUITests/InvokeInstabugUITest.m similarity index 70% rename from sampleApp/platforms/ios/HelloCordovaUITest/HelloCordovaUITest.m rename to example/tests/src/ios/InstabugExampleUITests/InvokeInstabugUITest.m index 27ef5f92..82848611 100644 --- a/sampleApp/platforms/ios/HelloCordovaUITest/HelloCordovaUITest.m +++ b/example/tests/src/ios/InstabugExampleUITests/InvokeInstabugUITest.m @@ -1,17 +1,10 @@ -// -// HelloCordovaUITest.m -// HelloCordovaUITest -// -// Created by Aly Ezz on 9/6/19. -// - #import -@interface HelloCordovaUITest : XCTestCase +@interface InstabugSampleUITests : XCTestCase @end -@implementation HelloCordovaUITest +@implementation InstabugSampleUITests - (void)setUp { self.continueAfterFailure = NO; @@ -19,12 +12,15 @@ - (void)setUp { } - (void)testInstabugSendBugReport { - XCUIApplication *app = [[XCUIApplication alloc] init]; - [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]; - [app.tables.staticTexts[@"Report a bug"] tap]; + [app.buttons[@"IBGFloatingButtonAccessibilityIdentifier"] tap]; + + XCUIElement *reportBugButton = app.tables.staticTexts[@"Report a bug"]; + [self waitForElementToAppear:reportBugButton withTimeout:5]; + [reportBugButton tap]; + + XCUIElement *textField = app.scrollViews.textFields[@"IBGBugInputViewEmailFieldAccessibilityIdentifier"]; - XCUIElement *textField = app.scrollViews.otherElements.textFields[@"IBGBugInputViewEmailFieldAccessibilityIdentifier"]; [textField tap]; if (![textField.value isEqual: @"Enter your email"]) { [textField pressForDuration:1.2]; @@ -32,11 +28,12 @@ - (void)testInstabugSendBugReport { } [textField typeText:@"inst@bug.com"]; [app.navigationBars[@"Report a bug"]/*@START_MENU_TOKEN@*/.buttons[@"IBGBugVCNextButtonAccessibilityIdentifier"]/*[[".buttons[@\"Send\"]",".buttons[@\"IBGBugVCNextButtonAccessibilityIdentifier\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/ tap]; - + XCUIElement *element = app.staticTexts[@"Thank you"]; [self waitForElementToAppear:element withTimeout:5]; } + - (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout { NSUInteger line = __LINE__; @@ -52,4 +49,5 @@ - (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterva } }]; } + @end diff --git a/sampleApp/www/css/index.css b/example/www/css/index.css similarity index 90% rename from sampleApp/www/css/index.css rename to example/www/css/index.css index 85724a87..ecea7e8e 100644 --- a/sampleApp/www/css/index.css +++ b/example/www/css/index.css @@ -25,14 +25,14 @@ body { -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ background-color:#E4E4E4; - background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%); + background-image:linear-gradient(to bottom, #A7A7A7 0%, #E4E4E4 51%); font-family: system-ui, -apple-system, -apple-system-font, 'Segoe UI', 'Roboto', sans-serif; font-size:12px; height:100vh; margin:0px; padding:0px; /* Padding to avoid the "unsafe" areas behind notches in the screen */ - padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-right, 0px); + padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); text-transform:uppercase; width:100%; } @@ -72,7 +72,6 @@ h1 { .event { border-radius:4px; - -webkit-border-radius:4px; color:#FFFFFF; font-size:12px; margin:0px 30px; @@ -89,19 +88,23 @@ h1 { display:none; } +#deviceready.ready .event.listening { display: none; } +#deviceready.ready .event.received { display: block; } + @keyframes fade { from { opacity: 1.0; } 50% { opacity: 0.4; } to { opacity: 1.0; } } - -@-webkit-keyframes fade { - from { opacity: 1.0; } - 50% { opacity: 0.4; } - to { opacity: 1.0; } -} - + .blink { animation:fade 3000ms infinite; -webkit-animation:fade 3000ms infinite; } + + +@media screen and (prefers-color-scheme: dark) { + body { + background-image:linear-gradient(to bottom, #585858 0%, #1B1B1B 51%); + } +} diff --git a/sampleApp/platforms/android/app/src/main/assets/www/img/logo.png b/example/www/img/logo.png similarity index 100% rename from sampleApp/platforms/android/app/src/main/assets/www/img/logo.png rename to example/www/img/logo.png diff --git a/sampleApp/www/index.html b/example/www/index.html similarity index 76% rename from sampleApp/www/index.html rename to example/www/index.html index d901e26e..716987c2 100644 --- a/sampleApp/www/index.html +++ b/example/www/index.html @@ -19,20 +19,21 @@ --> + - + - + + Hello World @@ -43,7 +44,7 @@

Apache Cordova

Device is Ready

- - + + diff --git a/example/www/js/index.js b/example/www/js/index.js new file mode 100644 index 00000000..8747653d --- /dev/null +++ b/example/www/js/index.js @@ -0,0 +1,17 @@ +document.addEventListener("deviceready", onDeviceReady, false); + +function onDeviceReady() { + var Instabug = cordova.require("instabug-cordova.Instabug"); + var BugReporting = cordova.require("instabug-cordova.BugReporting"); + + console.log("Running cordova-" + cordova.platformId + "@" + cordova.version); + document.getElementById("deviceready").classList.add("ready"); + + // Initialize Instabug SDK + Instabug.start( + "cb518c145decef204b0735cb7efa6016", + [BugReporting.invocationEvents.button], + () => console.log("Instabug initialized."), + (error) => console.log("Instabug could not be initialized - " + error) + ); +} diff --git a/package.json b/package.json index 9ef4e4c3..4eab6e78 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "instabug-cordova", - "version": "9.1.7", + "version": "11.0.0", "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.", - "main": "index.js", + "main": "www/index.js", "repository": { "type": "git", "url": "git+https://github.com/Instabug/instabug-cordova" @@ -12,8 +12,6 @@ "bugs": { "url": "https://github.com/Instabug/instabug-cordova/issues" }, - "dependencies": { - "xcode": "^0.9.0" - }, + "dependencies": {}, "homepage": "https://github.com/Instabug/instabug-cordova#readme" } diff --git a/plugin.xml b/plugin.xml index 46713558..d75eef9e 100644 --- a/plugin.xml +++ b/plugin.xml @@ -3,7 +3,7 @@ + version="11.0.0"> instabug-cordova @@ -25,23 +25,21 @@ - - + + + - - + + - - + + - - + + - - - - - + + @@ -54,12 +52,6 @@ - - - @@ -67,10 +59,6 @@ - - - - @@ -83,14 +71,11 @@ - + - - - - + @@ -102,10 +87,20 @@ - - + + + + + + + + + + + + diff --git a/sampleApp/config.xml b/sampleApp/config.xml deleted file mode 100644 index f0513b75..00000000 --- a/sampleApp/config.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - HelloCordova - - A sample Apache Cordova application that responds to the deviceready event. - - - Apache Cordova Team - - - - - - - - - - - - - - - - - - - - - diff --git a/sampleApp/hooks/README.md b/sampleApp/hooks/README.md deleted file mode 100644 index 574ad4c9..00000000 --- a/sampleApp/hooks/README.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Cordova Hooks - -Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide. diff --git a/sampleApp/package-lock.json b/sampleApp/package-lock.json deleted file mode 100644 index 537de586..00000000 --- a/sampleApp/package-lock.json +++ /dev/null @@ -1,660 +0,0 @@ -{ - "name": "helloworld", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "android-versions": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.4.0.tgz", - "integrity": "sha512-GnomfYsBq+nZh3c3UH/4r9Jt6FuTxdhUJbeHIdYOH5xBhQ8I0ZzC2/RM5IFFIjrzuNWSHb8JWP1lPK0/a26jrg==", - "requires": { - "semver": "^5.4.1" - } - }, - "ansi": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", - "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" - }, - "big-integer": { - "version": "1.6.44", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.44.tgz", - "integrity": "sha512-7MzElZPTyJ2fNvBkPxtFQ2fWIkVmuzw41+BZHSzpEq3ymB2MfeKp1+yXl/tS75xCx+WnyV+yb0kp+K1C3UNwmQ==" - }, - "bplist-creator": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.7.tgz", - "integrity": "sha1-N98VNgkoJLh8QvlXsBNEEXNyrkU=", - "requires": { - "stream-buffers": "~2.2.0" - } - }, - "bplist-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", - "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", - "requires": { - "big-integer": "^1.6.7" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "cordova-android": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-8.0.0.tgz", - "integrity": "sha512-Ipv8HbVJpxEyYFSFLTEOaLRp0yxBtJVNbgSuDEB4naa34FzQaRWSNiiMcPJnO+x3hRXNt7pcwa46hARNzhn7+w==", - "requires": { - "android-versions": "^1.3.0", - "cordova-common": "^3.1.0", - "elementtree": "^0.1.7", - "nopt": "^4.0.1", - "properties-parser": "^0.3.1", - "q": "^1.4.1", - "shelljs": "^0.5.3" - } - }, - "cordova-common": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-3.2.0.tgz", - "integrity": "sha512-EvlQ6PirfR65hGDoQvsluW00uSS2MTVIRKQ3c1Xvsddx7D5T5JgF3fHWkGik/Y/8yNcpI0zI2NcJyie2z/ak2A==", - "requires": { - "ansi": "^0.3.1", - "bplist-parser": "^0.1.0", - "cross-spawn": "^6.0.5", - "elementtree": "0.1.7", - "endent": "^1.1.1", - "fs-extra": "^8.0.0", - "glob": "^7.1.2", - "minimatch": "^3.0.0", - "plist": "^3.0.1", - "q": "^1.4.1", - "strip-bom": "^3.0.0", - "underscore": "^1.8.3", - "which": "^1.3.0" - } - }, - "cordova-ios": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-5.0.1.tgz", - "integrity": "sha512-JcFyDmlyzY2OQJo0eHpuFERFqvO4daHl8HL96RhUVjJVtuoqXHsOF0xTuQSAqIbefelMPEWwY3Lc/dvT4ttTwQ==", - "requires": { - "cordova-common": "^3.1.0", - "ios-sim": "^8.0.1", - "nopt": "^4.0.1", - "plist": "^3.0.1", - "q": "^1.5.1", - "shelljs": "^0.5.3", - "unorm": "^1.4.1", - "xcode": "^2.0.0", - "xml-escape": "^1.1.0" - } - }, - "cordova-plugin-whitelist": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.4.tgz", - "integrity": "sha512-EYC5eQFVkoYXq39l7tYKE6lEjHJ04mvTmKXxGL7quHLdFPfJMNzru/UYpn92AOfpl3PQaZmou78C7EgmFOwFQQ==", - "dev": true - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { - "object-keys": "^1.0.12" - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" - }, - "elementtree": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz", - "integrity": "sha1-mskb5uUvtuYkTE5UpKw+2K6OKcA=", - "requires": { - "sax": "1.1.4" - } - }, - "endent": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/endent/-/endent-1.3.0.tgz", - "integrity": "sha512-C8AryqPPwtydqcpO5AF6k9Bd1EpFkQtvsefJqS3y3n8TG13Jy63MascDxTOULZYqrUde+dK6BjNc6LIMr3iI2A==", - "requires": { - "dedent": "^0.7.0", - "fast-json-parse": "^1.0.3", - "objectorarray": "^1.0.3" - } - }, - "es-abstract": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.14.1.tgz", - "integrity": "sha512-cp/Tb1oA/rh2X7vqeSOvM+TSo3UkJLX70eNihgVEvnzwAgikjkTFr/QVgRCaxjm0knCNQzNoxxxcw2zO2LJdZA==", - "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.0", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-inspect": "^1.6.0", - "object-keys": "^1.1.1", - "string.prototype.trimleft": "^2.0.0", - "string.prototype.trimright": "^2.0.0" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "fast-json-parse": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/fast-json-parse/-/fast-json-parse-1.0.3.tgz", - "integrity": "sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw==" - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "requires": { - "is-callable": "^1.1.3" - } - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", - "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==" - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ios-sim": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz", - "integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==", - "requires": { - "bplist-parser": "^0.0.6", - "nopt": "1.0.9", - "plist": "^3.0.1", - "simctl": "^2" - }, - "dependencies": { - "bplist-parser": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz", - "integrity": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk=" - }, - "nopt": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz", - "integrity": "sha1-O8DXy6e/sNWmdtvtfA6+SKT9RU4=", - "requires": { - "abbrev": "1" - } - } - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "requires": { - "has": "^1.0.1" - } - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "requires": { - "has-symbols": "^1.0.0" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" - }, - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "object-inspect": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", - "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, - "objectorarray": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/objectorarray/-/objectorarray-1.0.3.tgz", - "integrity": "sha512-kPoflSYkAf/Onvjr4ZLaq37vDuOXjVzfwLCRuORRzYGdXkHa/vacPT0RgR+KmtkwOYFcxTMM62BRrZk8GGKHjw==", - "requires": { - "tape": "^4.8.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, - "plist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", - "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", - "requires": { - "base64-js": "^1.2.3", - "xmlbuilder": "^9.0.7", - "xmldom": "0.1.x" - } - }, - "properties-parser": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.3.1.tgz", - "integrity": "sha1-ExbpU5/7/ZOEXjabIRAiq9R4dxo=", - "requires": { - "string.prototype.codepointat": "^0.2.0" - } - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" - }, - "resolve": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", - "requires": { - "path-parse": "^1.0.6" - } - }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "requires": { - "through": "~2.3.4" - } - }, - "sax": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.4.tgz", - "integrity": "sha1-dLbTPJrh4AFRDxeakRaFiPGu2qk=" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "shelljs": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", - "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=" - }, - "simctl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/simctl/-/simctl-2.0.0.tgz", - "integrity": "sha512-5rB7rN4N3b0z0nFdy9eczVssXqrv2aAgdVRksPVqVoiDtvXmfzNvebp3EMdId2sAUzXIflarQlx4P0hjVQEzKQ==", - "requires": { - "shelljs": "^0.2.6", - "tail": "^0.4.0" - }, - "dependencies": { - "shelljs": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz", - "integrity": "sha1-kEktcv/MgVmXa6umL7D2iE8MM3g=" - } - } - }, - "simple-plist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.0.0.tgz", - "integrity": "sha512-043L2rO80LVF7zfZ+fqhsEkoJFvW8o59rt/l4ctx1TJWoTx7/jkiS1R5TatD15Z1oYnuLJytzE7gcnnBuIPL2g==", - "requires": { - "bplist-creator": "0.0.7", - "bplist-parser": "0.1.1", - "plist": "^3.0.1" - } - }, - "stream-buffers": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", - "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=" - }, - "string.prototype.codepointat": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz", - "integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==" - }, - "string.prototype.trim": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", - "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.0", - "function-bind": "^1.0.2" - } - }, - "string.prototype.trimleft": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.0.0.tgz", - "integrity": "sha1-aLaqjhYsaoDnbjqKDC50cYbicf8=", - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.0.2" - } - }, - "string.prototype.trimright": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.0.0.tgz", - "integrity": "sha1-q0pW2AKgH75yk+EehPJNyBZGYd0=", - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.0.2" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "tail": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz", - "integrity": "sha1-0p3nJ1DMmdseBTr/E8NZ7PtxMAI=" - }, - "tape": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.11.0.tgz", - "integrity": "sha512-yixvDMX7q7JIs/omJSzSZrqulOV51EC9dK8dM0TzImTIkHWfe2/kFyL5v+d9C+SrCMaICk59ujsqFAVidDqDaA==", - "requires": { - "deep-equal": "~1.0.1", - "defined": "~1.0.0", - "for-each": "~0.3.3", - "function-bind": "~1.1.1", - "glob": "~7.1.4", - "has": "~1.0.3", - "inherits": "~2.0.4", - "minimist": "~1.2.0", - "object-inspect": "~1.6.0", - "resolve": "~1.11.1", - "resumer": "~0.0.0", - "string.prototype.trim": "~1.1.2", - "through": "~2.3.8" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "underscore": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", - "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==" - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "unorm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", - "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==" - }, - "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xcode": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xcode/-/xcode-2.0.0.tgz", - "integrity": "sha512-5xF6RCjAdDEiEsbbZaS/gBRt3jZ/177otZcpoLCjGN/u1LrfgH7/Sgeeavpr/jELpyDqN2im3AKosl2G2W8hfw==", - "requires": { - "simple-plist": "^1.0.0", - "uuid": "^3.3.2" - } - }, - "xml-escape": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz", - "integrity": "sha1-OQTBQ/qOs6ADDsZG0pAqLxtwbEQ=" - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" - }, - "xmldom": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", - "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=" - } - } -} diff --git a/sampleApp/platforms/android/.gitignore b/sampleApp/platforms/android/.gitignore deleted file mode 100644 index 427a160a..00000000 --- a/sampleApp/platforms/android/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# Non-project-specific build files: -build.xml -local.properties -/gradlew -/gradlew.bat -/gradle -# Ant builds -ant-build -ant-gen -# Eclipse builds -gen -out -# Gradle build artifacts -.gradle -.gradletasknamecache -/build -/CordovaLib/build -/app/build -gradle-app.setting -# Android Studio -.idea diff --git a/sampleApp/platforms/android/CordovaLib/AndroidManifest.xml b/sampleApp/platforms/android/CordovaLib/AndroidManifest.xml deleted file mode 100755 index bd203026..00000000 --- a/sampleApp/platforms/android/CordovaLib/AndroidManifest.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/sampleApp/platforms/android/CordovaLib/build.gradle b/sampleApp/platforms/android/CordovaLib/build.gradle deleted file mode 100644 index a9b91897..00000000 --- a/sampleApp/platforms/android/CordovaLib/build.gradle +++ /dev/null @@ -1,139 +0,0 @@ -/* Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -ext { - apply from: 'cordova.gradle' - cdvCompileSdkVersion = privateHelpers.getProjectTarget() - cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools() -} - -buildscript { - repositories { - google() - jcenter() - } - - dependencies { - // The gradle plugin and the maven plugin have to be updated after each version of Android - // studio comes out - classpath 'com.android.tools.build:gradle:3.3.2' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' - } -} - -apply plugin: 'com.android.library' -apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' - -group = 'org.apache.cordova' -version = '8.0.0' - -android { - compileSdkVersion cdvCompileSdkVersion - buildToolsVersion cdvBuildToolsVersion - - compileOptions { - sourceCompatibility '1.7' - targetCompatibility '1.7' - } - - sourceSets { - main { - manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['src'] - resources.srcDirs = ['src'] - aidl.srcDirs = ['src'] - renderscript.srcDirs = ['src'] - res.srcDirs = ['res'] - assets.srcDirs = ['assets'] - } - } - - packagingOptions { - exclude 'META-INF/LICENSE' - exclude 'META-INF/LICENSE.txt' - exclude 'META-INF/DEPENDENCIES' - exclude 'META-INF/NOTICE' - } - defaultConfig { - minSdkVersion 19 - } -} - -install { - repositories.mavenInstaller { - pom { - project { - packaging 'aar' - name 'Cordova' - url 'https://cordova.apache.org' - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - developers { - developer { - id 'stevengill' - name 'Steve Gill' - } - } - scm { - connection 'scm:git:https://github.com/apache/cordova-android.git' - developerConnection 'scm:git:git@github.com:apache/cordova-android.git' - url 'https://github.com/apache/cordova-android' - - } - } - } - } -} - -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' -} - -artifacts { - archives sourcesJar -} - -bintray { - user = System.getenv('BINTRAY_USER') - key = System.getenv('BINTRAY_KEY') - configurations = ['archives'] - pkg { - repo = 'maven' - name = 'cordova-android' - userOrg = 'cordova' - licenses = ['Apache-2.0'] - vcsUrl = 'https://github.com/apache/cordova-android' - websiteUrl = 'https://cordova.apache.org' - issueTrackerUrl = 'https://github.com/apache/cordova-android/issues' - publicDownloadNumbers = true - licenses = ['Apache-2.0'] - labels = ['android', 'cordova', 'phonegap'] - version { - name = '8.0.0' - released = new Date() - vcsTag = '8.0.0' - } - } -} diff --git a/sampleApp/platforms/android/CordovaLib/cordova.gradle b/sampleApp/platforms/android/CordovaLib/cordova.gradle deleted file mode 100644 index 6c6819a1..00000000 --- a/sampleApp/platforms/android/CordovaLib/cordova.gradle +++ /dev/null @@ -1,205 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -import java.util.regex.Pattern -import groovy.swing.SwingBuilder - -String doEnsureValueExists(filePath, props, key) { - if (props.get(key) == null) { - throw new GradleException(filePath + ': Missing key required "' + key + '"') - } - return props.get(key) -} - -String doGetProjectTarget() { - def props = new Properties() - def propertiesFile = 'project.properties'; - if(!(file(propertiesFile).exists())) { - propertiesFile = '../project.properties'; - } - file(propertiesFile).withReader { reader -> - props.load(reader) - } - return doEnsureValueExists('project.properties', props, 'target') -} - -String[] getAvailableBuildTools() { - def buildToolsDir = new File(getAndroidSdkDir(), "build-tools") - buildToolsDir.list() - .findAll { it ==~ /[0-9.]+/ } - .sort { a, b -> compareVersions(b, a) } -} - -String doFindLatestInstalledBuildTools(String minBuildToolsVersion) { - def availableBuildToolsVersions - try { - availableBuildToolsVersions = getAvailableBuildTools() - } catch (e) { - println "An exception occurred while trying to find the Android build tools." - throw e - } - if (availableBuildToolsVersions.length > 0) { - def highestBuildToolsVersion = availableBuildToolsVersions[0] - if (compareVersions(highestBuildToolsVersion, minBuildToolsVersion) < 0) { - throw new RuntimeException( - "No usable Android build tools found. Highest installed version is " + - highestBuildToolsVersion + "; minimum version required is " + - minBuildToolsVersion + ".") - } - highestBuildToolsVersion - } else { - throw new RuntimeException( - "No installed build tools found. Install the Android build tools version " + - minBuildToolsVersion + " or higher.") - } -} - -// Return the first non-zero result of subtracting version list elements -// pairwise. If they are all identical, return the difference in length of -// the two lists. -int compareVersionList(Collection aParts, Collection bParts) { - def pairs = ([aParts, bParts]).transpose() - pairs.findResult(aParts.size()-bParts.size()) {it[0] - it[1] != 0 ? it[0] - it[1] : null} -} - -// Compare two version strings, such as "19.0.0" and "18.1.1.0". If all matched -// elements are identical, the longer version is the largest by this method. -// Examples: -// "19.0.0" > "19" -// "19.0.1" > "19.0.0" -// "19.1.0" > "19.0.1" -// "19" > "18.999.999" -int compareVersions(String a, String b) { - def aParts = a.tokenize('.').collect {it.toInteger()} - def bParts = b.tokenize('.').collect {it.toInteger()} - compareVersionList(aParts, bParts) -} - -String getAndroidSdkDir() { - def rootDir = project.rootDir - def androidSdkDir = null - String envVar = System.getenv("ANDROID_HOME") - def localProperties = new File(rootDir, 'local.properties') - String systemProperty = System.getProperty("android.home") - if (envVar != null) { - androidSdkDir = envVar - } else if (localProperties.exists()) { - Properties properties = new Properties() - localProperties.withInputStream { instr -> - properties.load(instr) - } - def sdkDirProp = properties.getProperty('sdk.dir') - if (sdkDirProp != null) { - androidSdkDir = sdkDirProp - } else { - sdkDirProp = properties.getProperty('android.dir') - if (sdkDirProp != null) { - androidSdkDir = (new File(rootDir, sdkDirProp)).getAbsolutePath() - } - } - } - if (androidSdkDir == null && systemProperty != null) { - androidSdkDir = systemProperty - } - if (androidSdkDir == null) { - throw new RuntimeException( - "Unable to determine Android SDK directory.") - } - androidSdkDir -} - -def doExtractIntFromManifest(name) { - def manifestFile = file(android.sourceSets.main.manifest.srcFile) - def pattern = Pattern.compile(name + "=\"(\\d+)\"") - def matcher = pattern.matcher(manifestFile.getText()) - matcher.find() - return new BigInteger(matcher.group(1)) -} - -def doExtractStringFromManifest(name) { - def manifestFile = file(android.sourceSets.main.manifest.srcFile) - def pattern = Pattern.compile(name + "=\"(\\S+)\"") - def matcher = pattern.matcher(manifestFile.getText()) - matcher.find() - return matcher.group(1) -} - -def doPromptForPassword(msg) { - if (System.console() == null) { - def ret = null - new SwingBuilder().edt { - dialog(modal: true, title: 'Enter password', alwaysOnTop: true, resizable: false, locationRelativeTo: null, pack: true, show: true) { - vbox { - label(text: msg) - def input = passwordField() - button(defaultButton: true, text: 'OK', actionPerformed: { - ret = input.password; - dispose(); - }) - } - } - } - if (!ret) { - throw new GradleException('User canceled build') - } - return new String(ret) - } else { - return System.console().readPassword('\n' + msg); - } -} - -def doGetConfigXml() { - def xml = file("src/main/res/xml/config.xml").getText() - // Disable namespace awareness since Cordova doesn't use them properly - return new XmlParser(false, false).parseText(xml) -} - -def doGetConfigPreference(name, defaultValue) { - name = name.toLowerCase() - def root = doGetConfigXml() - - def ret = defaultValue - root.preference.each { it -> - def attrName = it.attribute("name") - if (attrName && attrName.toLowerCase() == name) { - ret = it.attribute("value") - } - } - return ret -} - -// Properties exported here are visible to all plugins. -ext { - // These helpers are shared, but are not guaranteed to be stable / unchanged. - privateHelpers = {} - privateHelpers.getProjectTarget = { doGetProjectTarget() } - privateHelpers.findLatestInstalledBuildTools = { doFindLatestInstalledBuildTools('19.1.0') } - privateHelpers.extractIntFromManifest = { name -> doExtractIntFromManifest(name) } - privateHelpers.extractStringFromManifest = { name -> doExtractStringFromManifest(name) } - privateHelpers.promptForPassword = { msg -> doPromptForPassword(msg) } - privateHelpers.ensureValueExists = { filePath, props, key -> doEnsureValueExists(filePath, props, key) } - - // These helpers can be used by plugins / projects and will not change. - cdvHelpers = {} - // Returns a XmlParser for the config.xml. Added in 4.1.0. - cdvHelpers.getConfigXml = { doGetConfigXml() } - // Returns the value for the desired . Added in 4.1.0. - cdvHelpers.getConfigPreference = { name, defaultValue -> doGetConfigPreference(name, defaultValue) } -} - diff --git a/sampleApp/platforms/android/CordovaLib/project.properties b/sampleApp/platforms/android/CordovaLib/project.properties deleted file mode 100644 index cbb644c7..00000000 --- a/sampleApp/platforms/android/CordovaLib/project.properties +++ /dev/null @@ -1,11 +0,0 @@ -# This file was originally created by the Android Tools, but is now -# used by cordova-android to manage the project configuration. - -# Indicates whether an apk should be generated for each density. -split.density=false - -# Project target. -target=android-28 -apk-configurations= -renderscript.opt.level=O0 -android.library=true diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/AuthenticationToken.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/AuthenticationToken.java deleted file mode 100644 index d3a231a0..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/AuthenticationToken.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -/** - * The Class AuthenticationToken defines the userName and password to be used for authenticating a web resource - */ -public class AuthenticationToken { - private String userName; - private String password; - - /** - * Gets the user name. - * - * @return the user name - */ - public String getUserName() { - return userName; - } - - /** - * Sets the user name. - * - * @param userName - * the new user name - */ - public void setUserName(String userName) { - this.userName = userName; - } - - /** - * Gets the password. - * - * @return the password - */ - public String getPassword() { - return password; - } - - /** - * Sets the password. - * - * @param password - * the new password - */ - public void setPassword(String password) { - this.password = password; - } - - - - -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/BuildHelper.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/BuildHelper.java deleted file mode 100644 index 6d9daa47..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/BuildHelper.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova; - -/* - * This is a utility class that allows us to get the BuildConfig variable, which is required - * for the use of different providers. This is not guaranteed to work, and it's better for this - * to be set in the build step in config.xml - * - */ - -import android.app.Activity; -import android.content.Context; - -import java.lang.reflect.Field; - - -public class BuildHelper { - - - private static String TAG="BuildHelper"; - - /* - * This needs to be implemented if you wish to use the Camera Plugin or other plugins - * that read the Build Configuration. - * - * Thanks to Phil@Medtronic and Graham Borland for finding the answer and posting it to - * StackOverflow. This is annoying as hell! However, this method does not work with - * ProGuard, and you should use the config.xml to define the application_id - * - */ - - public static Object getBuildConfigValue(Context ctx, String key) - { - try - { - Class clazz = Class.forName(ctx.getPackageName() + ".BuildConfig"); - Field field = clazz.getField(key); - return field.get(null); - } catch (ClassNotFoundException e) { - LOG.d(TAG, "Unable to get the BuildConfig, is this built with ANT?"); - e.printStackTrace(); - } catch (NoSuchFieldException e) { - LOG.d(TAG, key + " is not a valid field. Check your build.gradle"); - } catch (IllegalAccessException e) { - LOG.d(TAG, "Illegal Access Exception: Let's print a stack trace."); - e.printStackTrace(); - } - - return null; - } - -} \ No newline at end of file diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CallbackContext.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CallbackContext.java deleted file mode 100644 index 43363869..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CallbackContext.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -import org.json.JSONArray; - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.PluginResult; -import org.json.JSONObject; - -public class CallbackContext { - private static final String LOG_TAG = "CordovaPlugin"; - - private String callbackId; - private CordovaWebView webView; - protected boolean finished; - private int changingThreads; - - public CallbackContext(String callbackId, CordovaWebView webView) { - this.callbackId = callbackId; - this.webView = webView; - } - - public boolean isFinished() { - return finished; - } - - public boolean isChangingThreads() { - return changingThreads > 0; - } - - public String getCallbackId() { - return callbackId; - } - - public void sendPluginResult(PluginResult pluginResult) { - synchronized (this) { - if (finished) { - LOG.w(LOG_TAG, "Attempted to send a second callback for ID: " + callbackId + "\nResult was: " + pluginResult.getMessage()); - return; - } else { - finished = !pluginResult.getKeepCallback(); - } - } - webView.sendPluginResult(pluginResult, callbackId); - } - - /** - * Helper for success callbacks that just returns the Status.OK by default - * - * @param message The message to add to the success result. - */ - public void success(JSONObject message) { - sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); - } - - /** - * Helper for success callbacks that just returns the Status.OK by default - * - * @param message The message to add to the success result. - */ - public void success(String message) { - sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); - } - - /** - * Helper for success callbacks that just returns the Status.OK by default - * - * @param message The message to add to the success result. - */ - public void success(JSONArray message) { - sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); - } - - /** - * Helper for success callbacks that just returns the Status.OK by default - * - * @param message The message to add to the success result. - */ - public void success(byte[] message) { - sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); - } - - /** - * Helper for success callbacks that just returns the Status.OK by default - * - * @param message The message to add to the success result. - */ - public void success(int message) { - sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); - } - - /** - * Helper for success callbacks that just returns the Status.OK by default - */ - public void success() { - sendPluginResult(new PluginResult(PluginResult.Status.OK)); - } - - /** - * Helper for error callbacks that just returns the Status.ERROR by default - * - * @param message The message to add to the error result. - */ - public void error(JSONObject message) { - sendPluginResult(new PluginResult(PluginResult.Status.ERROR, message)); - } - - /** - * Helper for error callbacks that just returns the Status.ERROR by default - * - * @param message The message to add to the error result. - */ - public void error(String message) { - sendPluginResult(new PluginResult(PluginResult.Status.ERROR, message)); - } - - /** - * Helper for error callbacks that just returns the Status.ERROR by default - * - * @param message The message to add to the error result. - */ - public void error(int message) { - sendPluginResult(new PluginResult(PluginResult.Status.ERROR, message)); - } -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CallbackMap.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CallbackMap.java deleted file mode 100644 index 050daa01..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CallbackMap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -import android.util.Pair; -import android.util.SparseArray; - -/** - * Provides a collection that maps unique request codes to CordovaPlugins and Integers. - * Used to ensure that when plugins make requests for runtime permissions, those requests do not - * collide with requests from other plugins that use the same request code value. - */ -public class CallbackMap { - private int currentCallbackId = 0; - private SparseArray> callbacks; - - public CallbackMap() { - this.callbacks = new SparseArray>(); - } - - /** - * Stores a CordovaPlugin and request code and returns a new unique request code to use - * in a permission request. - * - * @param receiver The plugin that is making the request - * @param requestCode The original request code used by the plugin - * @return A unique request code that can be used to retrieve this callback - * with getAndRemoveCallback() - */ - public synchronized int registerCallback(CordovaPlugin receiver, int requestCode) { - int mappedId = this.currentCallbackId++; - callbacks.put(mappedId, new Pair(receiver, requestCode)); - return mappedId; - } - - /** - * Retrieves and removes a callback stored in the map using the mapped request code - * obtained from registerCallback() - * - * @param mappedId The request code obtained from registerCallback() - * @return The CordovaPlugin and orignal request code that correspond to the - * given mappedCode - */ - public synchronized Pair getAndRemoveCallback(int mappedId) { - Pair callback = callbacks.get(mappedId); - callbacks.remove(mappedId); - return callback; - } -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/Config.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/Config.java deleted file mode 100644 index 07397959..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/Config.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova; - -import java.util.List; - -import android.app.Activity; - -@Deprecated // Use Whitelist, CordovaPrefences, etc. directly. -public class Config { - private static final String TAG = "Config"; - - static ConfigXmlParser parser; - - private Config() { - } - - public static void init(Activity action) { - parser = new ConfigXmlParser(); - parser.parse(action); - //TODO: Add feature to bring this back. Some preferences should be overridden by intents, but not all - parser.getPreferences().setPreferencesBundle(action.getIntent().getExtras()); - } - - // Intended to be used for testing only; creates an empty configuration. - public static void init() { - if (parser == null) { - parser = new ConfigXmlParser(); - } - } - - public static String getStartUrl() { - if (parser == null) { - return "file:///android_asset/www/index.html"; - } - return parser.getLaunchUrl(); - } - - public static String getErrorUrl() { - return parser.getPreferences().getString("errorurl", null); - } - - public static List getPluginEntries() { - return parser.getPluginEntries(); - } - - public static CordovaPreferences getPreferences() { - return parser.getPreferences(); - } - - public static boolean isInitialized() { - return parser != null; - } -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/ConfigXmlParser.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/ConfigXmlParser.java deleted file mode 100644 index 01a97f2d..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/ConfigXmlParser.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Locale; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlPullParserException; - -import android.content.Context; - -public class ConfigXmlParser { - private static String TAG = "ConfigXmlParser"; - - private String launchUrl = "file:///android_asset/www/index.html"; - private CordovaPreferences prefs = new CordovaPreferences(); - private ArrayList pluginEntries = new ArrayList(20); - - public CordovaPreferences getPreferences() { - return prefs; - } - - public ArrayList getPluginEntries() { - return pluginEntries; - } - - public String getLaunchUrl() { - return launchUrl; - } - - public void parse(Context action) { - // First checking the class namespace for config.xml - int id = action.getResources().getIdentifier("config", "xml", action.getClass().getPackage().getName()); - if (id == 0) { - // If we couldn't find config.xml there, we'll look in the namespace from AndroidManifest.xml - id = action.getResources().getIdentifier("config", "xml", action.getPackageName()); - if (id == 0) { - LOG.e(TAG, "res/xml/config.xml is missing!"); - return; - } - } - parse(action.getResources().getXml(id)); - } - - boolean insideFeature = false; - String service = "", pluginClass = "", paramType = ""; - boolean onload = false; - - public void parse(XmlPullParser xml) { - int eventType = -1; - - while (eventType != XmlPullParser.END_DOCUMENT) { - if (eventType == XmlPullParser.START_TAG) { - handleStartTag(xml); - } - else if (eventType == XmlPullParser.END_TAG) - { - handleEndTag(xml); - } - try { - eventType = xml.next(); - } catch (XmlPullParserException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - public void handleStartTag(XmlPullParser xml) { - String strNode = xml.getName(); - if (strNode.equals("feature")) { - //Check for supported feature sets aka. plugins (Accelerometer, Geolocation, etc) - //Set the bit for reading params - insideFeature = true; - service = xml.getAttributeValue(null, "name"); - } - else if (insideFeature && strNode.equals("param")) { - paramType = xml.getAttributeValue(null, "name"); - if (paramType.equals("service")) // check if it is using the older service param - service = xml.getAttributeValue(null, "value"); - else if (paramType.equals("package") || paramType.equals("android-package")) - pluginClass = xml.getAttributeValue(null,"value"); - else if (paramType.equals("onload")) - onload = "true".equals(xml.getAttributeValue(null, "value")); - } - else if (strNode.equals("preference")) { - String name = xml.getAttributeValue(null, "name").toLowerCase(Locale.ENGLISH); - String value = xml.getAttributeValue(null, "value"); - prefs.set(name, value); - } - else if (strNode.equals("content")) { - String src = xml.getAttributeValue(null, "src"); - if (src != null) { - setStartUrl(src); - } - } - } - - public void handleEndTag(XmlPullParser xml) { - String strNode = xml.getName(); - if (strNode.equals("feature")) { - pluginEntries.add(new PluginEntry(service, pluginClass, onload)); - - service = ""; - pluginClass = ""; - insideFeature = false; - onload = false; - } - } - - private void setStartUrl(String src) { - Pattern schemeRegex = Pattern.compile("^[a-z-]+://"); - Matcher matcher = schemeRegex.matcher(src); - if (matcher.find()) { - launchUrl = src; - } else { - if (src.charAt(0) == '/') { - src = src.substring(1); - } - launchUrl = "file:///android_asset/www/" + src; - } - } -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java deleted file mode 100755 index dbbb48f6..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java +++ /dev/null @@ -1,519 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -import java.util.ArrayList; -import java.util.Locale; - -import org.json.JSONException; -import org.json.JSONObject; - -import android.app.Activity; -import android.app.AlertDialog; -import android.annotation.SuppressLint; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.res.Configuration; -import android.graphics.Color; -import android.media.AudioManager; -import android.os.Build; -import android.os.Bundle; -import android.view.Menu; -import android.view.MenuItem; -import android.view.View; -import android.view.ViewGroup; -import android.view.Window; -import android.view.WindowManager; -import android.webkit.WebViewClient; -import android.widget.FrameLayout; - -/** - * This class is the main Android activity that represents the Cordova - * application. It should be extended by the user to load the specific - * html file that contains the application. - * - * As an example: - * - *
- *     package org.apache.cordova.examples;
- *
- *     import android.os.Bundle;
- *     import org.apache.cordova.*;
- *
- *     public class Example extends CordovaActivity {
- *       @Override
- *       public void onCreate(Bundle savedInstanceState) {
- *         super.onCreate(savedInstanceState);
- *         super.init();
- *         // Load your application
- *         loadUrl(launchUrl);
- *       }
- *     }
- * 
- * - * Cordova xml configuration: Cordova uses a configuration file at - * res/xml/config.xml to specify its settings. See "The config.xml File" - * guide in cordova-docs at http://cordova.apache.org/docs for the documentation - * for the configuration. The use of the set*Property() methods is - * deprecated in favor of the config.xml file. - * - */ -public class CordovaActivity extends Activity { - public static String TAG = "CordovaActivity"; - - // The webview for our app - protected CordovaWebView appView; - - private static int ACTIVITY_STARTING = 0; - private static int ACTIVITY_RUNNING = 1; - private static int ACTIVITY_EXITING = 2; - - // Keep app running when pause is received. (default = true) - // If true, then the JavaScript and native code continue to run in the background - // when another application (activity) is started. - protected boolean keepRunning = true; - - // Flag to keep immersive mode if set to fullscreen - protected boolean immersiveMode; - - // Read from config.xml: - protected CordovaPreferences preferences; - protected String launchUrl; - protected ArrayList pluginEntries; - protected CordovaInterfaceImpl cordovaInterface; - - /** - * Called when the activity is first created. - */ - @Override - public void onCreate(Bundle savedInstanceState) { - // need to activate preferences before super.onCreate to avoid "requestFeature() must be called before adding content" exception - loadConfig(); - - String logLevel = preferences.getString("loglevel", "ERROR"); - LOG.setLogLevel(logLevel); - - LOG.i(TAG, "Apache Cordova native platform version " + CordovaWebView.CORDOVA_VERSION + " is starting"); - LOG.d(TAG, "CordovaActivity.onCreate()"); - - if (!preferences.getBoolean("ShowTitle", false)) { - getWindow().requestFeature(Window.FEATURE_NO_TITLE); - } - - if (preferences.getBoolean("SetFullscreen", false)) { - LOG.d(TAG, "The SetFullscreen configuration is deprecated in favor of Fullscreen, and will be removed in a future version."); - preferences.set("Fullscreen", true); - } - if (preferences.getBoolean("Fullscreen", false)) { - // NOTE: use the FullscreenNotImmersive configuration key to set the activity in a REAL full screen - // (as was the case in previous cordova versions) - if (!preferences.getBoolean("FullscreenNotImmersive", false)) { - immersiveMode = true; - } else { - getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, - WindowManager.LayoutParams.FLAG_FULLSCREEN); - } - } else { - getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, - WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); - } - - super.onCreate(savedInstanceState); - - cordovaInterface = makeCordovaInterface(); - if (savedInstanceState != null) { - cordovaInterface.restoreInstanceState(savedInstanceState); - } - } - - protected void init() { - appView = makeWebView(); - createViews(); - if (!appView.isInitialized()) { - appView.init(cordovaInterface, pluginEntries, preferences); - } - cordovaInterface.onCordovaInit(appView.getPluginManager()); - - // Wire the hardware volume controls to control media if desired. - String volumePref = preferences.getString("DefaultVolumeStream", ""); - if ("media".equals(volumePref.toLowerCase(Locale.ENGLISH))) { - setVolumeControlStream(AudioManager.STREAM_MUSIC); - } - } - - @SuppressWarnings("deprecation") - protected void loadConfig() { - ConfigXmlParser parser = new ConfigXmlParser(); - parser.parse(this); - preferences = parser.getPreferences(); - preferences.setPreferencesBundle(getIntent().getExtras()); - launchUrl = parser.getLaunchUrl(); - pluginEntries = parser.getPluginEntries(); - Config.parser = parser; - } - - //Suppressing warnings in AndroidStudio - @SuppressWarnings({"deprecation", "ResourceType"}) - protected void createViews() { - //Why are we setting a constant as the ID? This should be investigated - appView.getView().setId(100); - appView.getView().setLayoutParams(new FrameLayout.LayoutParams( - ViewGroup.LayoutParams.MATCH_PARENT, - ViewGroup.LayoutParams.MATCH_PARENT)); - - setContentView(appView.getView()); - - if (preferences.contains("BackgroundColor")) { - try { - int backgroundColor = preferences.getInteger("BackgroundColor", Color.BLACK); - // Background of activity: - appView.getView().setBackgroundColor(backgroundColor); - } - catch (NumberFormatException e){ - e.printStackTrace(); - } - } - - appView.getView().requestFocusFromTouch(); - } - - /** - * Construct the default web view object. - *

- * Override this to customize the webview that is used. - */ - protected CordovaWebView makeWebView() { - return new CordovaWebViewImpl(makeWebViewEngine()); - } - - protected CordovaWebViewEngine makeWebViewEngine() { - return CordovaWebViewImpl.createEngine(this, preferences); - } - - protected CordovaInterfaceImpl makeCordovaInterface() { - return new CordovaInterfaceImpl(this) { - @Override - public Object onMessage(String id, Object data) { - // Plumb this to CordovaActivity.onMessage for backwards compatibility - return CordovaActivity.this.onMessage(id, data); - } - }; - } - - /** - * Load the url into the webview. - */ - public void loadUrl(String url) { - if (appView == null) { - init(); - } - - // If keepRunning - this.keepRunning = preferences.getBoolean("KeepRunning", true); - - appView.loadUrlIntoView(url, true); - } - - /** - * Called when the system is about to start resuming a previous activity. - */ - @Override - protected void onPause() { - super.onPause(); - LOG.d(TAG, "Paused the activity."); - - if (this.appView != null) { - // CB-9382 If there is an activity that started for result and main activity is waiting for callback - // result, we shoudn't stop WebView Javascript timers, as activity for result might be using them - boolean keepRunning = this.keepRunning || this.cordovaInterface.activityResultCallback != null; - this.appView.handlePause(keepRunning); - } - } - - /** - * Called when the activity receives a new intent - */ - @Override - protected void onNewIntent(Intent intent) { - super.onNewIntent(intent); - //Forward to plugins - if (this.appView != null) - this.appView.onNewIntent(intent); - } - - /** - * Called when the activity will start interacting with the user. - */ - @Override - protected void onResume() { - super.onResume(); - LOG.d(TAG, "Resumed the activity."); - - if (this.appView == null) { - return; - } - // Force window to have focus, so application always - // receive user input. Workaround for some devices (Samsung Galaxy Note 3 at least) - this.getWindow().getDecorView().requestFocus(); - - this.appView.handleResume(this.keepRunning); - } - - /** - * Called when the activity is no longer visible to the user. - */ - @Override - protected void onStop() { - super.onStop(); - LOG.d(TAG, "Stopped the activity."); - - if (this.appView == null) { - return; - } - this.appView.handleStop(); - } - - /** - * Called when the activity is becoming visible to the user. - */ - @Override - protected void onStart() { - super.onStart(); - LOG.d(TAG, "Started the activity."); - - if (this.appView == null) { - return; - } - this.appView.handleStart(); - } - - /** - * The final call you receive before your activity is destroyed. - */ - @Override - public void onDestroy() { - LOG.d(TAG, "CordovaActivity.onDestroy()"); - super.onDestroy(); - - if (this.appView != null) { - appView.handleDestroy(); - } - } - - /** - * Called when view focus is changed - */ - @SuppressLint("InlinedApi") - @Override - public void onWindowFocusChanged(boolean hasFocus) { - super.onWindowFocusChanged(hasFocus); - if (hasFocus && immersiveMode) { - final int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_STABLE - | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION - | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN - | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION - | View.SYSTEM_UI_FLAG_FULLSCREEN - | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; - - getWindow().getDecorView().setSystemUiVisibility(uiOptions); - } - } - - @SuppressLint("NewApi") - @Override - public void startActivityForResult(Intent intent, int requestCode, Bundle options) { - // Capture requestCode here so that it is captured in the setActivityResultCallback() case. - cordovaInterface.setActivityResultRequestCode(requestCode); - super.startActivityForResult(intent, requestCode, options); - } - - /** - * Called when an activity you launched exits, giving you the requestCode you started it with, - * the resultCode it returned, and any additional data from it. - * - * @param requestCode The request code originally supplied to startActivityForResult(), - * allowing you to identify who this result came from. - * @param resultCode The integer result code returned by the child activity through its setResult(). - * @param intent An Intent, which can return result data to the caller (various data can be attached to Intent "extras"). - */ - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent intent) { - LOG.d(TAG, "Incoming Result. Request code = " + requestCode); - super.onActivityResult(requestCode, resultCode, intent); - cordovaInterface.onActivityResult(requestCode, resultCode, intent); - } - - /** - * Report an error to the host application. These errors are unrecoverable (i.e. the main resource is unavailable). - * The errorCode parameter corresponds to one of the ERROR_* constants. - * - * @param errorCode The error code corresponding to an ERROR_* value. - * @param description A String describing the error. - * @param failingUrl The url that failed to load. - */ - public void onReceivedError(final int errorCode, final String description, final String failingUrl) { - final CordovaActivity me = this; - - // If errorUrl specified, then load it - final String errorUrl = preferences.getString("errorUrl", null); - if ((errorUrl != null) && (!failingUrl.equals(errorUrl)) && (appView != null)) { - // Load URL on UI thread - me.runOnUiThread(new Runnable() { - public void run() { - me.appView.showWebPage(errorUrl, false, true, null); - } - }); - } - // If not, then display error dialog - else { - final boolean exit = !(errorCode == WebViewClient.ERROR_HOST_LOOKUP); - me.runOnUiThread(new Runnable() { - public void run() { - if (exit) { - me.appView.getView().setVisibility(View.GONE); - me.displayError("Application Error", description + " (" + failingUrl + ")", "OK", exit); - } - } - }); - } - } - - /** - * Display an error dialog and optionally exit application. - */ - public void displayError(final String title, final String message, final String button, final boolean exit) { - final CordovaActivity me = this; - me.runOnUiThread(new Runnable() { - public void run() { - try { - AlertDialog.Builder dlg = new AlertDialog.Builder(me); - dlg.setMessage(message); - dlg.setTitle(title); - dlg.setCancelable(false); - dlg.setPositiveButton(button, - new AlertDialog.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - if (exit) { - finish(); - } - } - }); - dlg.create(); - dlg.show(); - } catch (Exception e) { - finish(); - } - } - }); - } - - /* - * Hook in Cordova for menu plugins - */ - @Override - public boolean onCreateOptionsMenu(Menu menu) { - if (appView != null) { - appView.getPluginManager().postMessage("onCreateOptionsMenu", menu); - } - return super.onCreateOptionsMenu(menu); - } - - @Override - public boolean onPrepareOptionsMenu(Menu menu) { - if (appView != null) { - appView.getPluginManager().postMessage("onPrepareOptionsMenu", menu); - } - return true; - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - if (appView != null) { - appView.getPluginManager().postMessage("onOptionsItemSelected", item); - } - return true; - } - - /** - * Called when a message is sent to plugin. - * - * @param id The message id - * @param data The message data - * @return Object or null - */ - public Object onMessage(String id, Object data) { - if ("onReceivedError".equals(id)) { - JSONObject d = (JSONObject) data; - try { - this.onReceivedError(d.getInt("errorCode"), d.getString("description"), d.getString("url")); - } catch (JSONException e) { - e.printStackTrace(); - } - } else if ("exit".equals(id)) { - finish(); - } - return null; - } - - protected void onSaveInstanceState(Bundle outState) { - cordovaInterface.onSaveInstanceState(outState); - super.onSaveInstanceState(outState); - } - - /** - * Called by the system when the device configuration changes while your activity is running. - * - * @param newConfig The new device configuration - */ - @Override - public void onConfigurationChanged(Configuration newConfig) { - super.onConfigurationChanged(newConfig); - if (this.appView == null) { - return; - } - PluginManager pm = this.appView.getPluginManager(); - if (pm != null) { - pm.onConfigurationChanged(newConfig); - } - } - - /** - * Called by the system when the user grants permissions - * - * @param requestCode - * @param permissions - * @param grantResults - */ - @Override - public void onRequestPermissionsResult(int requestCode, String permissions[], - int[] grantResults) { - try - { - cordovaInterface.onRequestPermissionResult(requestCode, permissions, grantResults); - } - catch (JSONException e) - { - LOG.d(TAG, "JSONException: Parameters fed into the method are not valid"); - e.printStackTrace(); - } - - } - -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaArgs.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaArgs.java deleted file mode 100644 index d40d26eb..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaArgs.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import android.util.Base64; - -public class CordovaArgs { - private JSONArray baseArgs; - - public CordovaArgs(JSONArray args) { - this.baseArgs = args; - } - - - // Pass through the basics to the base args. - public Object get(int index) throws JSONException { - return baseArgs.get(index); - } - - public boolean getBoolean(int index) throws JSONException { - return baseArgs.getBoolean(index); - } - - public double getDouble(int index) throws JSONException { - return baseArgs.getDouble(index); - } - - public int getInt(int index) throws JSONException { - return baseArgs.getInt(index); - } - - public JSONArray getJSONArray(int index) throws JSONException { - return baseArgs.getJSONArray(index); - } - - public JSONObject getJSONObject(int index) throws JSONException { - return baseArgs.getJSONObject(index); - } - - public long getLong(int index) throws JSONException { - return baseArgs.getLong(index); - } - - public String getString(int index) throws JSONException { - return baseArgs.getString(index); - } - - - public Object opt(int index) { - return baseArgs.opt(index); - } - - public boolean optBoolean(int index) { - return baseArgs.optBoolean(index); - } - - public double optDouble(int index) { - return baseArgs.optDouble(index); - } - - public int optInt(int index) { - return baseArgs.optInt(index); - } - - public JSONArray optJSONArray(int index) { - return baseArgs.optJSONArray(index); - } - - public JSONObject optJSONObject(int index) { - return baseArgs.optJSONObject(index); - } - - public long optLong(int index) { - return baseArgs.optLong(index); - } - - public String optString(int index) { - return baseArgs.optString(index); - } - - public boolean isNull(int index) { - return baseArgs.isNull(index); - } - - - // The interesting custom helpers. - public byte[] getArrayBuffer(int index) throws JSONException { - String encoded = baseArgs.getString(index); - return Base64.decode(encoded, Base64.DEFAULT); - } -} - - diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaBridge.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaBridge.java deleted file mode 100644 index 28c407f3..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaBridge.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -import android.annotation.SuppressLint; - -import java.security.SecureRandom; - -import org.json.JSONArray; -import org.json.JSONException; - -/** - * Contains APIs that the JS can call. All functions in here should also have - * an equivalent entry in CordovaChromeClient.java, and be added to - * cordova-js/lib/android/plugin/android/promptbasednativeapi.js - */ -public class CordovaBridge { - private static final String LOG_TAG = "CordovaBridge"; - private PluginManager pluginManager; - private NativeToJsMessageQueue jsMessageQueue; - private volatile int expectedBridgeSecret = -1; // written by UI thread, read by JS thread. - - public CordovaBridge(PluginManager pluginManager, NativeToJsMessageQueue jsMessageQueue) { - this.pluginManager = pluginManager; - this.jsMessageQueue = jsMessageQueue; - } - - public String jsExec(int bridgeSecret, String service, String action, String callbackId, String arguments) throws JSONException, IllegalAccessException { - if (!verifySecret("exec()", bridgeSecret)) { - return null; - } - // If the arguments weren't received, send a message back to JS. It will switch bridge modes and try again. See CB-2666. - // We send a message meant specifically for this case. It starts with "@" so no other message can be encoded into the same string. - if (arguments == null) { - return "@Null arguments."; - } - - jsMessageQueue.setPaused(true); - try { - // Tell the resourceApi what thread the JS is running on. - CordovaResourceApi.jsThread = Thread.currentThread(); - - pluginManager.exec(service, action, callbackId, arguments); - String ret = null; - if (!NativeToJsMessageQueue.DISABLE_EXEC_CHAINING) { - ret = jsMessageQueue.popAndEncode(false); - } - return ret; - } catch (Throwable e) { - e.printStackTrace(); - return ""; - } finally { - jsMessageQueue.setPaused(false); - } - } - - public void jsSetNativeToJsBridgeMode(int bridgeSecret, int value) throws IllegalAccessException { - if (!verifySecret("setNativeToJsBridgeMode()", bridgeSecret)) { - return; - } - jsMessageQueue.setBridgeMode(value); - } - - public String jsRetrieveJsMessages(int bridgeSecret, boolean fromOnlineEvent) throws IllegalAccessException { - if (!verifySecret("retrieveJsMessages()", bridgeSecret)) { - return null; - } - return jsMessageQueue.popAndEncode(fromOnlineEvent); - } - - private boolean verifySecret(String action, int bridgeSecret) throws IllegalAccessException { - if (!jsMessageQueue.isBridgeEnabled()) { - if (bridgeSecret == -1) { - LOG.d(LOG_TAG, action + " call made before bridge was enabled."); - } else { - LOG.d(LOG_TAG, "Ignoring " + action + " from previous page load."); - } - return false; - } - // Bridge secret wrong and bridge not due to it being from the previous page. - if (expectedBridgeSecret < 0 || bridgeSecret != expectedBridgeSecret) { - LOG.e(LOG_TAG, "Bridge access attempt with wrong secret token, possibly from malicious code. Disabling exec() bridge!"); - clearBridgeSecret(); - throw new IllegalAccessException(); - } - return true; - } - - /** Called on page transitions */ - void clearBridgeSecret() { - expectedBridgeSecret = -1; - } - - public boolean isSecretEstablished() { - return expectedBridgeSecret != -1; - } - - /** Called by cordova.js to initialize the bridge. */ - //On old Androids SecureRandom isn't really secure, this is the least of your problems if - //you're running Android 4.3 and below in 2017 - @SuppressLint("TrulyRandom") - int generateBridgeSecret() { - SecureRandom randGen = new SecureRandom(); - expectedBridgeSecret = randGen.nextInt(Integer.MAX_VALUE); - return expectedBridgeSecret; - } - - public void reset() { - jsMessageQueue.reset(); - clearBridgeSecret(); - } - - public String promptOnJsPrompt(String origin, String message, String defaultValue) { - if (defaultValue != null && defaultValue.length() > 3 && defaultValue.startsWith("gap:")) { - JSONArray array; - try { - array = new JSONArray(defaultValue.substring(4)); - int bridgeSecret = array.getInt(0); - String service = array.getString(1); - String action = array.getString(2); - String callbackId = array.getString(3); - String r = jsExec(bridgeSecret, service, action, callbackId, message); - return r == null ? "" : r; - } catch (JSONException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - return ""; - } - // Sets the native->JS bridge mode. - else if (defaultValue != null && defaultValue.startsWith("gap_bridge_mode:")) { - try { - int bridgeSecret = Integer.parseInt(defaultValue.substring(16)); - jsSetNativeToJsBridgeMode(bridgeSecret, Integer.parseInt(message)); - } catch (NumberFormatException e){ - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - return ""; - } - // Polling for JavaScript messages - else if (defaultValue != null && defaultValue.startsWith("gap_poll:")) { - int bridgeSecret = Integer.parseInt(defaultValue.substring(9)); - try { - String r = jsRetrieveJsMessages(bridgeSecret, "1".equals(message)); - return r == null ? "" : r; - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - return ""; - } - else if (defaultValue != null && defaultValue.startsWith("gap_init:")) { - // Protect against random iframes being able to talk through the bridge. - // Trust only pages which the app would have been allowed to navigate to anyway. - if (pluginManager.shouldAllowBridgeAccess(origin)) { - // Enable the bridge - int bridgeMode = Integer.parseInt(defaultValue.substring(9)); - jsMessageQueue.setBridgeMode(bridgeMode); - // Tell JS the bridge secret. - int secret = generateBridgeSecret(); - return ""+secret; - } else { - LOG.e(LOG_TAG, "gap_init called from restricted origin: " + origin); - } - return ""; - } - return null; - } -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java deleted file mode 100644 index ccda0272..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -import java.security.Principal; -import java.security.PrivateKey; -import java.security.cert.X509Certificate; - -import android.annotation.SuppressLint; -import android.webkit.ClientCertRequest; - -/** - * Implementation of the ICordovaClientCertRequest for Android WebView. - * - */ -public class CordovaClientCertRequest implements ICordovaClientCertRequest { - - private final ClientCertRequest request; - - public CordovaClientCertRequest(ClientCertRequest request) { - this.request = request; - } - - /** - * Cancel this request - */ - @SuppressLint("NewApi") - public void cancel() - { - request.cancel(); - } - - /* - * Returns the host name of the server requesting the certificate. - */ - @SuppressLint("NewApi") - public String getHost() - { - return request.getHost(); - } - - /* - * Returns the acceptable types of asymmetric keys (can be null). - */ - @SuppressLint("NewApi") - public String[] getKeyTypes() - { - return request.getKeyTypes(); - } - - /* - * Returns the port number of the server requesting the certificate. - */ - @SuppressLint("NewApi") - public int getPort() - { - return request.getPort(); - } - - /* - * Returns the acceptable certificate issuers for the certificate matching the private key (can be null). - */ - @SuppressLint("NewApi") - public Principal[] getPrincipals() - { - return request.getPrincipals(); - } - - /* - * Ignore the request for now. Do not remember user's choice. - */ - @SuppressLint("NewApi") - public void ignore() - { - request.ignore(); - } - - /* - * Proceed with the specified private key and client certificate chain. Remember the user's positive choice and use it for future requests. - * - * @param privateKey The privateKey - * @param chain The certificate chain - */ - @SuppressLint("NewApi") - public void proceed(PrivateKey privateKey, X509Certificate[] chain) - { - request.proceed(privateKey, chain); - } -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaDialogsHelper.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaDialogsHelper.java deleted file mode 100644 index a219c992..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaDialogsHelper.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -import android.app.AlertDialog; -import android.content.Context; -import android.content.DialogInterface; -import android.view.KeyEvent; -import android.widget.EditText; - -/** - * Helper class for WebViews to implement prompt(), alert(), confirm() dialogs. - */ -public class CordovaDialogsHelper { - private final Context context; - private AlertDialog lastHandledDialog; - - public CordovaDialogsHelper(Context context) { - this.context = context; - } - - public void showAlert(String message, final Result result) { - AlertDialog.Builder dlg = new AlertDialog.Builder(context); - dlg.setMessage(message); - dlg.setTitle("Alert"); - //Don't let alerts break the back button - dlg.setCancelable(true); - dlg.setPositiveButton(android.R.string.ok, - new AlertDialog.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - result.gotResult(true, null); - } - }); - dlg.setOnCancelListener( - new DialogInterface.OnCancelListener() { - public void onCancel(DialogInterface dialog) { - result.gotResult(false, null); - } - }); - dlg.setOnKeyListener(new DialogInterface.OnKeyListener() { - //DO NOTHING - public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_BACK) - { - result.gotResult(true, null); - return false; - } - else - return true; - } - }); - lastHandledDialog = dlg.show(); - } - - public void showConfirm(String message, final Result result) { - AlertDialog.Builder dlg = new AlertDialog.Builder(context); - dlg.setMessage(message); - dlg.setTitle("Confirm"); - dlg.setCancelable(true); - dlg.setPositiveButton(android.R.string.ok, - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - result.gotResult(true, null); - } - }); - dlg.setNegativeButton(android.R.string.cancel, - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - result.gotResult(false, null); - } - }); - dlg.setOnCancelListener( - new DialogInterface.OnCancelListener() { - public void onCancel(DialogInterface dialog) { - result.gotResult(false, null); - } - }); - dlg.setOnKeyListener(new DialogInterface.OnKeyListener() { - //DO NOTHING - public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_BACK) - { - result.gotResult(false, null); - return false; - } - else - return true; - } - }); - lastHandledDialog = dlg.show(); - } - - /** - * Tell the client to display a prompt dialog to the user. - * If the client returns true, WebView will assume that the client will - * handle the prompt dialog and call the appropriate JsPromptResult method. - * - * Since we are hacking prompts for our own purposes, we should not be using them for - * this purpose, perhaps we should hack console.log to do this instead! - */ - public void showPrompt(String message, String defaultValue, final Result result) { - // Returning false would also show a dialog, but the default one shows the origin (ugly). - AlertDialog.Builder dlg = new AlertDialog.Builder(context); - dlg.setMessage(message); - final EditText input = new EditText(context); - if (defaultValue != null) { - input.setText(defaultValue); - } - dlg.setView(input); - dlg.setCancelable(false); - dlg.setPositiveButton(android.R.string.ok, - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - String userText = input.getText().toString(); - result.gotResult(true, userText); - } - }); - dlg.setNegativeButton(android.R.string.cancel, - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - result.gotResult(false, null); - } - }); - lastHandledDialog = dlg.show(); - } - - public void destroyLastDialog(){ - if (lastHandledDialog != null){ - lastHandledDialog.cancel(); - } - } - - public interface Result { - public void gotResult(boolean success, String value); - } -} \ No newline at end of file diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaHttpAuthHandler.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaHttpAuthHandler.java deleted file mode 100644 index 724381e2..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaHttpAuthHandler.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -import android.webkit.HttpAuthHandler; - -/** - * Specifies interface for HTTP auth handler object which is used to handle auth requests and - * specifying user credentials. - */ -public class CordovaHttpAuthHandler implements ICordovaHttpAuthHandler { - - private final HttpAuthHandler handler; - - public CordovaHttpAuthHandler(HttpAuthHandler handler) { - this.handler = handler; - } - - /** - * Instructs the WebView to cancel the authentication request. - */ - public void cancel () { - this.handler.cancel(); - } - - /** - * Instructs the WebView to proceed with the authentication with the given credentials. - * - * @param username - * @param password - */ - public void proceed (String username, String password) { - this.handler.proceed(username, password); - } -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterface.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterface.java deleted file mode 100755 index ff906834..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterface.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -import android.app.Activity; -import android.content.Context; -import android.content.Intent; - -import org.apache.cordova.CordovaPlugin; - -import java.util.concurrent.ExecutorService; - -/** - * The Activity interface that is implemented by CordovaActivity. - * It is used to isolate plugin development, and remove dependency on entire Cordova library. - */ -public interface CordovaInterface { - - /** - * Launch an activity for which you would like a result when it finished. When this activity exits, - * your onActivityResult() method will be called. - * - * @param command The command object - * @param intent The intent to start - * @param requestCode The request code that is passed to callback to identify the activity - */ - abstract public void startActivityForResult(CordovaPlugin command, Intent intent, int requestCode); - - /** - * Set the plugin to be called when a sub-activity exits. - * - * @param plugin The plugin on which onActivityResult is to be called - */ - abstract public void setActivityResultCallback(CordovaPlugin plugin); - - /** - * Get the Android activity. - * - * If a custom engine lives outside of the Activity's lifecycle the return value may be null. - * - * @return the Activity - */ - public abstract Activity getActivity(); - - /** - * Get the Android context. - * - * @return the Context - */ - public Context getContext(); - - /** - * Called when a message is sent to plugin. - * - * @param id The message id - * @param data The message data - * @return Object or null - */ - public Object onMessage(String id, Object data); - - /** - * Returns a shared thread pool that can be used for background tasks. - */ - public ExecutorService getThreadPool(); - - /** - * Sends a permission request to the activity for one permission. - */ - public void requestPermission(CordovaPlugin plugin, int requestCode, String permission); - - /** - * Sends a permission request to the activity for a group of permissions - */ - public void requestPermissions(CordovaPlugin plugin, int requestCode, String [] permissions); - - /** - * Check for a permission. Returns true if the permission is granted, false otherwise. - */ - public boolean hasPermission(String permission); - -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java deleted file mode 100644 index 9a6e9245..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova; - -import android.annotation.SuppressLint; -import android.app.Activity; -import android.content.Context; -import android.content.Intent; -import android.content.pm.PackageManager; -import android.os.Build; -import android.os.Bundle; -import android.util.Pair; - -import org.json.JSONException; -import org.json.JSONObject; - -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -/** - * Default implementation of CordovaInterface. - */ -public class CordovaInterfaceImpl implements CordovaInterface { - private static final String TAG = "CordovaInterfaceImpl"; - protected Activity activity; - protected ExecutorService threadPool; - protected PluginManager pluginManager; - - protected ActivityResultHolder savedResult; - protected CallbackMap permissionResultCallbacks; - protected CordovaPlugin activityResultCallback; - protected String initCallbackService; - protected int activityResultRequestCode; - protected boolean activityWasDestroyed = false; - protected Bundle savedPluginState; - - public CordovaInterfaceImpl(Activity activity) { - this(activity, Executors.newCachedThreadPool()); - } - - public CordovaInterfaceImpl(Activity activity, ExecutorService threadPool) { - this.activity = activity; - this.threadPool = threadPool; - this.permissionResultCallbacks = new CallbackMap(); - } - - @Override - public void startActivityForResult(CordovaPlugin command, Intent intent, int requestCode) { - setActivityResultCallback(command); - try { - activity.startActivityForResult(intent, requestCode); - } catch (RuntimeException e) { // E.g.: ActivityNotFoundException - activityResultCallback = null; - throw e; - } - } - - @Override - public void setActivityResultCallback(CordovaPlugin plugin) { - // Cancel any previously pending activity. - if (activityResultCallback != null) { - activityResultCallback.onActivityResult(activityResultRequestCode, Activity.RESULT_CANCELED, null); - } - activityResultCallback = plugin; - } - - @Override - public Activity getActivity() { - return activity; - } - - @Override - public Context getContext() { - return activity; - } - - @Override - public Object onMessage(String id, Object data) { - if ("exit".equals(id)) { - activity.finish(); - } - return null; - } - - @Override - public ExecutorService getThreadPool() { - return threadPool; - } - - /** - * Dispatches any pending onActivityResult callbacks and sends the resume event if the - * Activity was destroyed by the OS. - */ - public void onCordovaInit(PluginManager pluginManager) { - this.pluginManager = pluginManager; - if (savedResult != null) { - onActivityResult(savedResult.requestCode, savedResult.resultCode, savedResult.intent); - } else if(activityWasDestroyed) { - // If there was no Activity result, we still need to send out the resume event if the - // Activity was destroyed by the OS - activityWasDestroyed = false; - if(pluginManager != null) - { - CoreAndroid appPlugin = (CoreAndroid) pluginManager.getPlugin(CoreAndroid.PLUGIN_NAME); - if(appPlugin != null) { - JSONObject obj = new JSONObject(); - try { - obj.put("action", "resume"); - } catch (JSONException e) { - LOG.e(TAG, "Failed to create event message", e); - } - appPlugin.sendResumeEvent(new PluginResult(PluginResult.Status.OK, obj)); - } - } - - } - } - - /** - * Routes the result to the awaiting plugin. Returns false if no plugin was waiting. - */ - public boolean onActivityResult(int requestCode, int resultCode, Intent intent) { - CordovaPlugin callback = activityResultCallback; - if(callback == null && initCallbackService != null) { - // The application was restarted, but had defined an initial callback - // before being shut down. - savedResult = new ActivityResultHolder(requestCode, resultCode, intent); - if (pluginManager != null) { - callback = pluginManager.getPlugin(initCallbackService); - if(callback != null) { - callback.onRestoreStateForActivityResult(savedPluginState.getBundle(callback.getServiceName()), - new ResumeCallback(callback.getServiceName(), pluginManager)); - } - } - } - activityResultCallback = null; - - if (callback != null) { - LOG.d(TAG, "Sending activity result to plugin"); - initCallbackService = null; - savedResult = null; - callback.onActivityResult(requestCode, resultCode, intent); - return true; - } - LOG.w(TAG, "Got an activity result, but no plugin was registered to receive it" + (savedResult != null ? " yet!" : ".")); - return false; - } - - /** - * Call this from your startActivityForResult() overload. This is required to catch the case - * where plugins use Activity.startActivityForResult() + CordovaInterface.setActivityResultCallback() - * rather than CordovaInterface.startActivityForResult(). - */ - public void setActivityResultRequestCode(int requestCode) { - activityResultRequestCode = requestCode; - } - - /** - * Saves parameters for startActivityForResult(). - */ - public void onSaveInstanceState(Bundle outState) { - if (activityResultCallback != null) { - String serviceName = activityResultCallback.getServiceName(); - outState.putString("callbackService", serviceName); - } - if(pluginManager != null){ - outState.putBundle("plugin", pluginManager.onSaveInstanceState()); - } - - } - - /** - * Call this from onCreate() so that any saved startActivityForResult parameters will be restored. - */ - public void restoreInstanceState(Bundle savedInstanceState) { - initCallbackService = savedInstanceState.getString("callbackService"); - savedPluginState = savedInstanceState.getBundle("plugin"); - activityWasDestroyed = true; - } - - private static class ActivityResultHolder { - private int requestCode; - private int resultCode; - private Intent intent; - - public ActivityResultHolder(int requestCode, int resultCode, Intent intent) { - this.requestCode = requestCode; - this.resultCode = resultCode; - this.intent = intent; - } - } - - /** - * Called by the system when the user grants permissions - * - * @param requestCode - * @param permissions - * @param grantResults - */ - public void onRequestPermissionResult(int requestCode, String[] permissions, - int[] grantResults) throws JSONException { - Pair callback = permissionResultCallbacks.getAndRemoveCallback(requestCode); - if(callback != null) { - callback.first.onRequestPermissionResult(callback.second, permissions, grantResults); - } - } - - public void requestPermission(CordovaPlugin plugin, int requestCode, String permission) { - String[] permissions = new String [1]; - permissions[0] = permission; - requestPermissions(plugin, requestCode, permissions); - } - - @SuppressLint("NewApi") - public void requestPermissions(CordovaPlugin plugin, int requestCode, String [] permissions) { - int mappedRequestCode = permissionResultCallbacks.registerCallback(plugin, requestCode); - getActivity().requestPermissions(permissions, mappedRequestCode); - } - - public boolean hasPermission(String permission) - { - if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) - { - int result = activity.checkSelfPermission(permission); - return PackageManager.PERMISSION_GRANTED == result; - } - else - { - return true; - } - } -} diff --git a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaPlugin.java b/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaPlugin.java deleted file mode 100644 index 41af1db7..00000000 --- a/sampleApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaPlugin.java +++ /dev/null @@ -1,422 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova; - -import org.apache.cordova.CordovaArgs; -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.CordovaInterface; -import org.apache.cordova.CallbackContext; -import org.json.JSONArray; -import org.json.JSONException; - -import android.content.Intent; -import android.content.pm.PackageManager; -import android.content.res.Configuration; -import android.net.Uri; -import android.os.Build; -import android.os.Bundle; - -import java.io.FileNotFoundException; -import java.io.IOException; - -/** - * Plugins must extend this class and override one of the execute methods. - */ -public class CordovaPlugin { - public CordovaWebView webView; - public CordovaInterface cordova; - protected CordovaPreferences preferences; - private String serviceName; - - /** - * Call this after constructing to initialize the plugin. - * Final because we want to be able to change args without breaking plugins. - */ - public final void privateInitialize(String serviceName, CordovaInterface cordova, CordovaWebView webView, CordovaPreferences preferences) { - assert this.cordova == null; - this.serviceName = serviceName; - this.cordova = cordova; - this.webView = webView; - this.preferences = preferences; - initialize(cordova, webView); - pluginInitialize(); - } - - /** - * Called after plugin construction and fields have been initialized. - * Prefer to use pluginInitialize instead since there is no value in - * having parameters on the initialize() function. - */ - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - } - - /** - * Called after plugin construction and fields have been initialized. - */ - protected void pluginInitialize() { - } - - /** - * Returns the plugin's service name (what you'd use when calling pluginManger.getPlugin()) - */ - public String getServiceName() { - return serviceName; - } - - /** - * Executes the request. - * - * This method is called from the WebView thread. To do a non-trivial amount of work, use: - * cordova.getThreadPool().execute(runnable); - * - * To run on the UI thread, use: - * cordova.getActivity().runOnUiThread(runnable); - * - * @param action The action to execute. - * @param rawArgs The exec() arguments in JSON form. - * @param callbackContext The callback context used when calling back into JavaScript. - * @return Whether the action was valid. - */ - public boolean execute(String action, String rawArgs, CallbackContext callbackContext) throws JSONException { - JSONArray args = new JSONArray(rawArgs); - return execute(action, args, callbackContext); - } - - /** - * Executes the request. - * - * This method is called from the WebView thread. To do a non-trivial amount of work, use: - * cordova.getThreadPool().execute(runnable); - * - * To run on the UI thread, use: - * cordova.getActivity().runOnUiThread(runnable); - * - * @param action The action to execute. - * @param args The exec() arguments. - * @param callbackContext The callback context used when calling back into JavaScript. - * @return Whether the action was valid. - */ - public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { - CordovaArgs cordovaArgs = new CordovaArgs(args); - return execute(action, cordovaArgs, callbackContext); - } - - /** - * Executes the request. - * - * This method is called from the WebView thread. To do a non-trivial amount of work, use: - * cordova.getThreadPool().execute(runnable); - * - * To run on the UI thread, use: - * cordova.getActivity().runOnUiThread(runnable); - * - * @param action The action to execute. - * @param args The exec() arguments, wrapped with some Cordova helpers. - * @param callbackContext The callback context used when calling back into JavaScript. - * @return Whether the action was valid. - */ - public boolean execute(String action, CordovaArgs args, CallbackContext callbackContext) throws JSONException { - return false; - } - - /** - * Called when the system is about to start resuming a previous activity. - * - * @param multitasking Flag indicating if multitasking is turned on for app - */ - public void onPause(boolean multitasking) { - } - - /** - * Called when the activity will start interacting with the user. - * - * @param multitasking Flag indicating if multitasking is turned on for app - */ - public void onResume(boolean multitasking) { - } - - /** - * Called when the activity is becoming visible to the user. - */ - public void onStart() { - } - - /** - * Called when the activity is no longer visible to the user. - */ - public void onStop() { - } - - /** - * Called when the activity receives a new intent. - */ - public void onNewIntent(Intent intent) { - } - - /** - * The final call you receive before your activity is destroyed. - */ - public void onDestroy() { - } - - /** - * Called when the Activity is being destroyed (e.g. if a plugin calls out to an external - * Activity and the OS kills the CordovaActivity in the background). The plugin should save its - * state in this method only if it is awaiting the result of an external Activity and needs - * to preserve some information so as to handle that result; onRestoreStateForActivityResult() - * will only be called if the plugin is the recipient of an Activity result - * - * @return Bundle containing the state of the plugin or null if state does not need to be saved - */ - public Bundle onSaveInstanceState() { - return null; - } - - /** - * Called when a plugin is the recipient of an Activity result after the CordovaActivity has - * been destroyed. The Bundle will be the same as the one the plugin returned in - * onSaveInstanceState() - * - * @param state Bundle containing the state of the plugin - * @param callbackContext Replacement Context to return the plugin result to - */ - public void onRestoreStateForActivityResult(Bundle state, CallbackContext callbackContext) {} - - /** - * Called when a message is sent to plugin. - * - * @param id The message id - * @param data The message data - * @return Object to stop propagation or null - */ - public Object onMessage(String id, Object data) { - return null; - } - - /** - * Called when an activity you launched exits, giving you the requestCode you started it with, - * the resultCode it returned, and any additional data from it. - * - * @param requestCode The request code originally supplied to startActivityForResult(), - * allowing you to identify who this result came from. - * @param resultCode The integer result code returned by the child activity through its setResult(). - * @param intent An Intent, which can return result data to the caller (various data can be - * attached to Intent "extras"). - */ - public void onActivityResult(int requestCode, int resultCode, Intent intent) { - } - - /** - * Hook for blocking the loading of external resources. - * - * This will be called when the WebView's shouldInterceptRequest wants to - * know whether to open a connection to an external resource. Return false - * to block the request: if any plugin returns false, Cordova will block - * the request. If all plugins return null, the default policy will be - * enforced. If at least one plugin returns true, and no plugins return - * false, then the request will proceed. - * - * Note that this only affects resource requests which are routed through - * WebViewClient.shouldInterceptRequest, such as XMLHttpRequest requests and - * img tag loads. WebSockets and media requests (such as