├── .circleci └── config.yml ├── .github └── pull_request_template.md ├── .gitignore ├── .npmignore ├── CHANGELOG.md ├── README.md ├── example ├── .gitignore ├── config.xml ├── package-lock.json ├── package.json ├── tests │ ├── .gitignore │ ├── package.json │ ├── plugin.xml │ ├── scripts │ │ └── xcode-project.js │ └── src │ │ ├── android │ │ ├── androidTest │ │ │ └── InvokeInstabugUITest.java │ │ ├── test │ │ │ └── IBGPluginTests.java │ │ └── tests.gradle │ │ └── ios │ │ ├── InstabugExample.xcodeproj │ │ └── project.pbxproj │ │ ├── InstabugExample.xcworkspace │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── InstabugExample.xcscheme │ │ ├── InstabugExampleTests │ │ └── InstabugExampleTests.m │ │ └── InstabugExampleUITests │ │ └── InvokeInstabugUITest.m ├── www │ ├── css │ │ └── index.css │ ├── img │ │ └── logo.png │ ├── index.html │ └── js │ │ └── index.js └── yarn.lock ├── package.json ├── plugin.xml ├── src ├── android │ ├── IBGPlugin.java │ └── util │ │ ├── ArgsRegistry.java │ │ └── Util.java ├── ios │ ├── IBGPlugin.h │ ├── IBGPlugin.m │ └── util │ │ ├── ArgsRegistry.h │ │ └── ArgsRegistry.m └── modules │ ├── ArgsRegistry.ts │ ├── BugReporting.ts │ ├── FeatureRequests.ts │ ├── IBGCordova.ts │ ├── Instabug.ts │ ├── Replies.ts │ ├── Surveys.ts │ └── index.ts ├── tsconfig.json └── yarn.lock /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | orbs: 4 | android: circleci/android@2.0 5 | 6 | jobs: 7 | 8 | test_android: 9 | working_directory: ~/project 10 | executor: 11 | name: android/android-machine 12 | resource-class: xlarge 13 | tag: '2024.01.1' 14 | steps: 15 | - checkout: 16 | path: ~/project 17 | - run: 18 | name: Install Cordova CLI 19 | command: npm install -g cordova 20 | - run: 21 | name: Install Node Packages 22 | command: yarn 23 | - run: 24 | name: Compile TS Project 25 | command: yarn build 26 | - run: 27 | name: Install Android Platform 28 | working_directory: example 29 | command: cordova platform add android || true 30 | - run: 31 | name: Install Plugins 32 | working_directory: example 33 | command: cordova plugins add --link ../ tests 34 | - run: 35 | name: Install Build Tools v32.0.0 36 | working_directory: example 37 | command: sdkmanager "build-tools;32.0.0" 38 | - android/start-emulator-and-run-tests: 39 | run-tests-working-directory: example/platforms/android 40 | system-image: system-images;android-30;google_apis;x86 41 | additional-avd-args: -d "Nexus 5" 42 | post-emulator-launch-assemble-command: cd example && cordova build android 43 | test-command: ./gradlew app:connectedAndroidTest 44 | - android/run-tests: 45 | working-directory: example/platforms/android 46 | test-command: ./gradlew test 47 | 48 | test_ios: 49 | working_directory: ~/project 50 | macos: 51 | xcode: 13.4.1 52 | steps: 53 | - checkout: 54 | path: ~/project 55 | - run: 56 | name: Install Cordova CLI 57 | command: npm install -g cordova 58 | - run: 59 | name: Install Node Packages 60 | command: yarn 61 | - run: 62 | name: Compile TS Project 63 | command: yarn build 64 | - run: 65 | name: Install iOS Platform 66 | working_directory: example 67 | command: cordova platform add ios || true 68 | - run: 69 | name: Install Plugins 70 | working_directory: example 71 | command: cordova plugins add --link ../ tests 72 | - run: 73 | name: Build iOS App 74 | working_directory: example 75 | command: cordova build ios 76 | - run: 77 | name: Run Tests 78 | working_directory: example/platforms/ios 79 | command: | 80 | xcodebuild -allowProvisioningUpdates \ 81 | -workspace InstabugExample.xcworkspace \ 82 | -scheme InstabugExample \ 83 | -sdk iphonesimulator \ 84 | -destination 'name=iPhone 12 Pro Max' \ 85 | test | xcpretty 86 | 87 | publish: 88 | macos: 89 | xcode: 13.4.1 90 | working_directory: "~" 91 | steps: 92 | - checkout: 93 | path: ~/project 94 | - run: git clone https://InstabugCI:$RELEASE_GITHUB_TOKEN@github.com/Instabug/Escape.git 95 | - run: cd Escape && swift build -c release 96 | - run: cd Escape/.build/release && cp -f Escape /usr/local/bin/escape 97 | - run: cd project && yarn 98 | - run: cd project && Escape cordova publish 99 | 100 | workflows: 101 | version: 2 102 | build-test-and-approval-deploy: 103 | jobs: 104 | - test_android 105 | - test_ios 106 | - hold: 107 | type: approval 108 | requires: 109 | - test_android 110 | - test_ios 111 | filters: 112 | branches: 113 | only: master 114 | - publish: 115 | requires: 116 | - hold 117 | filters: 118 | branches: 119 | only: master 120 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description of the change 2 | > Description goes here 3 | ## Type of change 4 | - [ ] Bug fix (non-breaking change that fixes an issue) 5 | - [ ] New feature (non-breaking change that adds functionality) 6 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) 7 | ## Related issues 8 | > Issue links go here 9 | ## Checklists 10 | ### Development 11 | - [ ] Lint rules pass locally 12 | - [ ] The code changed/added as part of this pull request has been covered with tests 13 | ### Code review 14 | - [ ] This pull request has a descriptive title and information useful to a reviewer 15 | - [ ] Issue from task tracker has a link to this pull request 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | *.DS_Store 5 | *.log 6 | *.iml 7 | *.settings 8 | .idea/ 9 | 10 | local.properties 11 | node_modules/ 12 | www/ 13 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | logs 2 | *.log 3 | npm-debug.log* 4 | 5 | .circleci/ 6 | .github/ 7 | 8 | node_modules/ 9 | example/ 10 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | ## 12.1.0 (2025-03-03) 3 | * Bumps Instabug iOS SDK to `v12.1.0` 4 | * Bumps Instabug Android SDK to `v12.1.0` 5 | 6 | ### Changed 7 | 8 | - Add the new repro steps configuration API `Instabug.setReproStepsConfig` 9 | - Remove deprecated APIs `Instabug.setDebugEnabled` in favour of `debugLogsLevel` property of `Instabug.init`. 10 | - Adds the new `Instabug.init` API to start the SDK as follows: 11 | ```js 12 | Instabug.init({ 13 | token: '', 14 | invocationEvents: [BugReporting.invocationEvents.button], 15 | debugLogsLevel: ArgsRegistry.logLeve.verbose, 16 | }); 17 | ``` 18 | ## 11.7.0 (2023-02-02) 19 | 20 | * Bumps Instabug Android SDK to `v11.8.0` 21 | * Bumps Instabug iOS SDK to `v11.7.0` 22 | * Adds new APIs: 23 | 1. `BugReporting.setDisclaimerText` 24 | 2. `BugReporting.setCommentMinimumCharacterCount` 25 | * Adds support for more locales: 26 | 1. Czech 27 | 2. Finnish 28 | 3. Hungarian 29 | 4. Indonesian (iOS) 30 | 5. Norwegian 31 | 6. PortuguesePortugal 32 | 7. Romanian 33 | 8. Slovak 34 | * Adds new string keys: 35 | 1. insufficientContentMessage 36 | 2. insufficientContentTitle (iOS) 37 | 3. screenRecording 38 | * Adds missing mapping for the below string keys on Android: 39 | 1. audio 40 | 2. image 41 | 3. messagesNotificationAndOthers 42 | 4. okButtonTitle 43 | 44 | ## 11.3.0 (2022-10-05) 45 | 46 | * Bumps Instabug Android SDK to `v11.5.1` 47 | * Bumps Instabug iOS SDK to `v11.3.0` 48 | 49 | ## 11.2.0 (2022-09-25) 50 | 51 | * Bumps Instabug Android SDK to `v11.4.1` 52 | * Bumps Instabug iOS SDK to `v11.2.0` 53 | * Adds TypeScript support 54 | 55 | ## v11.0.1 (2022-08-24) 56 | 57 | * Fixes ArgsRegistry import on iOS 58 | * Fixes a typo in `Instabug.setPrimaryColor` causing the API not to work 59 | 60 | ## v11.0.0 (2022-07-07) 61 | 62 | * Bumps Instabug native SDKs to `v11` 63 | * Adds the ability to initialize the Android SDK from JavaScript. Check the [migration guide][migration-guide-v11] for further info 64 | * Improves Instabug modules import usage. Check the [migration guide][migration-guide-v11] for further info 65 | * Migrates Instabug iOS SDK to be installed through CocoaPods 66 | * Adds new APIs: 67 | 1. `Instabug.setString` to allow for SDK text customizations 68 | 2. `Instabug.setWelcomeMessageMode` 69 | 3. `Instabug.setColorTheme` 70 | 4. `Instabug.setSessionProfilerEnabled` 71 | 5. `BugReporting.setShakingThresholdForiPhone` 72 | 6. `BugReporting.setShakingThresholdForiPad` 73 | 7. `BugReporting.setFloatingButtonEdge` 74 | * Replaces `Instabug.setShakingThreshold` with `BugReporting.setShakingThresholdForAndroid` 75 | * Moves `Instabug.setVideoRecordingFloatingButtonPosition` to the `BugReporting` module 76 | * Fixes an issue with uploading attachments in URL form on iOS 77 | * Fixes an issue with `BugReporting.setEnabledAttachmentTypes` not working on Android 78 | * Removes the deprecated APIs. Check the [migration guide][migration-guide-v11] for further info 79 | * Removes the Android multidex dependency 80 | * Removes the APIs: 81 | 1. `Instabug.setAutoScreenRecordingMaxDuration` 82 | 2. `Surveys.setThresholdForReshowingSurveyAfterDismiss` 83 | * Removes `BugReporting.invocationModes` enum 84 | 85 | [migration-guide-v11]: https://docs.instabug.com/docs/cordova-migration-guide 86 | 87 | ## v9.1.7 (2021-05-11) 88 | 89 | * Bumps iOS SDK to `v9.1.7` 90 | * Bumps Android SDK to `v9.1.8` 91 | * Adds support for Azerbaijani and Danish locales 92 | * Removes the use of `android:requestLegacyExternalStorage` attribute on Android 93 | 94 | ## v9.1.6 (2020-07-20) 95 | 96 | * Bumps native SDKs to `v9.1.6` 97 | * Fixes an issue with crashing UI calls running on background thread 98 | * Fixes an issue where `setLocale` does not work on Android 99 | 100 | ## v9.1.0 (2020-03-19) 101 | 102 | * Bumps native SDKs to `v9.1` 103 | 104 | ## v9.0.0 (2020-03-10) 105 | 106 | * Bumps native SDKs to `v9` 107 | 108 | ## v8.6.5 (2019-09-06) 109 | 110 | * Fixes various Android issues 111 | 112 | ## v8.6.4 (2019-09-06) 113 | 114 | * Fixes missing imports on Android 115 | * Fixes `floatingButtonEdge` & `floatingButtonOffset` on Android 116 | * Adds script to automatically add our maven repo to the project level `build.gradle` 117 | 118 | ## v8.6.3 (2019-09-05) 119 | 120 | * Adds initializing Android SDK from JS side using `cordova.plugins.instabug.activate` 121 | * Updates native SDKs to v8.6.2 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Deprecation of Cordova Support 2 | Support for Cordova will officially end on June 30, 2025. As Cordova's adoption has steadily declined and modern alternatives like Flutter and React Native have become the preferred choices for cross-platform development, we are deprecating our support to focus on platforms that align with current developer needs. 3 | 4 | # Extended Support 5 | We understand this transition may impact some of our users and are committed to assisting you. If you require extended support for Xamarin, Cordova, or Unity beyond the deprecation date, please reach out to our team. 6 | 7 | ## Documentation 8 | For more details about the supported APIs and how to use them, you can refer to our [docs](https://docs.instabug.com/docs/cordova-overview "**docs**"). 9 | 10 | ## Contact Us 11 | 12 | If you have any questions or feedback, don’t hesitate to get in touch. You can reach out to us at any time through [support@instabug.com](mailto:support@instabug.com). 13 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | .DS_Store 20 | 21 | # Generated by package manager 22 | node_modules/ 23 | 24 | # Generated by Cordova 25 | /plugins/ 26 | /platforms/ 27 | -------------------------------------------------------------------------------- /example/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | InstabugExample 4 | Sample Apache Cordova App 5 | 6 | Apache Cordova Team 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.instabug.example", 3 | "displayName": "InstabugExample", 4 | "version": "1.0.0", 5 | "description": "A sample Apache Cordova application that responds to the deviceready event.", 6 | "main": "index.js", 7 | "scripts": { 8 | "build": "cordova prepare; cordova plugins add --link ../ tests" 9 | }, 10 | "keywords": [ 11 | "ecosystem:cordova" 12 | ], 13 | "author": "Apache Cordova Team", 14 | "license": "Apache-2.0", 15 | "devDependencies": { 16 | "cordova-android": "^11.0.0", 17 | "cordova-ios": "^6.2.0", 18 | "instabug-cordova": "file:..", 19 | "tests-example": "file:tests" 20 | }, 21 | "cordova": { 22 | "platforms": [ 23 | "ios", 24 | "android" 25 | ], 26 | "plugins": { 27 | "instabug-cordova": {}, 28 | "tests-example": {} 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /example/tests/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Generated by package manager 4 | node_modules/ 5 | 6 | # Generated by Cordova 7 | /plugins/ 8 | /platforms/ 9 | -------------------------------------------------------------------------------- /example/tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tests-example", 3 | "displayName": "Example Tests", 4 | "version": "1.0.0", 5 | "description": "Contains tests for example projects.", 6 | "main": "index.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [ 11 | "ecosystem:cordova" 12 | ], 13 | "author": "Apache Cordova Team", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /example/tests/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | instabug-tests 9 | Injects unit and UI tests for android and iOS platforms in the example app. 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/tests/scripts/xcode-project.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require('path'); 3 | 4 | // Overwrites both the project file (.pbxproj) 5 | // and the workspace scheme file (.xcscheme) 6 | // by the files found in src/ios. 7 | // 8 | // The new files should contain two targets as follows: 9 | // 1. InstabugExampleTests : unit tests bundle target 10 | // 2. InstabugExampleUITests : ui tests bundle target 11 | 12 | module.exports = (ctx) => { 13 | const srcRoot = path.join(ctx.opts.plugin.dir, "src/ios"); 14 | const iosRoot = path.join(ctx.opts.projectRoot, "platforms/ios"); 15 | 16 | const projectFile = "InstabugExample.xcodeproj/project.pbxproj"; 17 | 18 | fs.copyFile( 19 | path.join(srcRoot, projectFile), 20 | path.join(iosRoot, projectFile), 21 | (err) => { 22 | if (err) throw err; 23 | console.log(`${projectFile} copied successfully!`); 24 | } 25 | ); 26 | 27 | const schemeFile = "InstabugExample.xcworkspace/xcshareddata/xcschemes/InstabugExample.xcscheme"; 28 | 29 | fs.copyFile( 30 | path.join(srcRoot, schemeFile), 31 | path.join(iosRoot, schemeFile), 32 | (err) => { 33 | if (err) throw err; 34 | console.log(`${schemeFile} copied successfully!`); 35 | } 36 | ); 37 | }; 38 | -------------------------------------------------------------------------------- /example/tests/src/android/androidTest/InvokeInstabugUITest.java: -------------------------------------------------------------------------------- 1 | package com.instabug.example; 2 | 3 | import static androidx.test.espresso.Espresso.onView; 4 | import static androidx.test.espresso.action.ViewActions.click; 5 | import static androidx.test.espresso.action.ViewActions.replaceText; 6 | import static androidx.test.espresso.matcher.ViewMatchers.withParent; 7 | import static androidx.test.espresso.matcher.ViewMatchers.withResourceName; 8 | import static androidx.test.espresso.matcher.ViewMatchers.withText; 9 | 10 | import static org.hamcrest.Matchers.allOf; 11 | 12 | import androidx.test.ext.junit.rules.ActivityScenarioRule; 13 | import androidx.test.ext.junit.runners.AndroidJUnit4; 14 | 15 | import org.junit.Rule; 16 | import org.junit.Test; 17 | import org.junit.runner.RunWith; 18 | 19 | @RunWith(AndroidJUnit4.class) 20 | public class InvokeInstabugUITest { 21 | 22 | @Rule 23 | public ActivityScenarioRule mActivityRule = 24 | new ActivityScenarioRule<>(MainActivity.class); 25 | 26 | @Test 27 | public void ensureInstabugInvocation() throws InterruptedException { 28 | Thread.sleep(5000); 29 | 30 | onView(withResourceName("instabug_floating_button")).perform(click()); 31 | onView(withText("Report a bug")).perform(click()); 32 | 33 | onView( 34 | allOf( 35 | withResourceName("ib_edit_text"), 36 | withParent(withResourceName("instabug_edit_text_email")) 37 | ) 38 | ).perform(replaceText("inst@bug.com")); 39 | 40 | onView(withResourceName("instabug_bugreporting_send")).perform(click()); 41 | onView(withResourceName("instabug_success_dialog_container")).perform(click()); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /example/tests/src/android/test/IBGPluginTests.java: -------------------------------------------------------------------------------- 1 | package com.instabug.example; 2 | 3 | import static org.mockito.Mockito.mock; 4 | import static org.mockito.Mockito.mockStatic; 5 | import static org.mockito.Mockito.spy; 6 | import static org.mockito.Mockito.verify; 7 | 8 | import com.instabug.cordova.plugin.IBGPlugin; 9 | import com.instabug.library.Instabug; 10 | import org.junit.After; 11 | import org.junit.Before; 12 | import org.junit.Test; 13 | import org.mockito.MockedStatic; 14 | 15 | import org.apache.cordova.CallbackContext; 16 | 17 | public class IBGPluginTests { 18 | private MockedStatic mockInstabug; 19 | private IBGPlugin mockPlugin; 20 | private CallbackContext mockContext; 21 | 22 | @Before 23 | public void setup() { 24 | mockInstabug = mockStatic(Instabug.class); 25 | mockPlugin = spy(new IBGPlugin()); 26 | mockContext = mock(CallbackContext.class); 27 | } 28 | 29 | @After 30 | public void teardown() { 31 | mockInstabug.close(); 32 | } 33 | 34 | @Test 35 | public void testShow() { 36 | mockPlugin.show(mockContext); 37 | verify(mockContext).success(); 38 | } 39 | } -------------------------------------------------------------------------------- /example/tests/src/android/tests.gradle: -------------------------------------------------------------------------------- 1 | // Dependencies for Unit and UI tests 2 | dependencies { 3 | androidTestImplementation 'androidx.test.ext:junit:1.1.3' 4 | androidTestImplementation 'androidx.test:rules:1.4.0' 5 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' 6 | 7 | testImplementation 'junit:junit:4.13.2' 8 | testImplementation 'org.mockito:mockito-core:4.3.1' 9 | testImplementation 'org.mockito:mockito-inline:4.3.1' 10 | testImplementation 'org.json:json:20180813' 11 | } 12 | android { 13 | defaultConfig { 14 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 15 | } 16 | } -------------------------------------------------------------------------------- /example/tests/src/ios/InstabugExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0207DA581B56EA530066E2B4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0207DA571B56EA530066E2B4 /* Images.xcassets */; }; 11 | 0E31CB20285A12920090BCF6 /* InvokeInstabugUITest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E31CB1F285A12920090BCF6 /* InvokeInstabugUITest.m */; }; 12 | 0E31CB30285A12A50090BCF6 /* InstabugExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E31CB2F285A12A50090BCF6 /* InstabugExampleTests.m */; }; 13 | 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; 14 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 15 | 301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; settings = {ATTRIBUTES = (Required, ); }; }; 16 | 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; }; 17 | 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; }; 18 | 5E56E9D77C2A469E968F11CB /* ArgsRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = 1718742CB8BD4C72AC4D8AFB /* ArgsRegistry.m */; }; 19 | 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */; }; 20 | 8163E8A2B4324A7EAB9F01BB /* IBGPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E7C69F401A64034A22084C5 /* IBGPlugin.m */; }; 21 | A89BFCA79E392FD771BA8CA1 /* Pods_InstabugExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4FD05904E49982B6BC61107A /* Pods_InstabugExample.framework */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | 0E31CB23285A12920090BCF6 /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = 1D6058900D05DD3D006BFB54; 30 | remoteInfo = InstabugExample; 31 | }; 32 | 0E31CB31285A12A50090BCF6 /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = 1D6058900D05DD3D006BFB54; 37 | remoteInfo = InstabugExample; 38 | }; 39 | 301BF534109A57CC0062928A /* PBXContainerItemProxy */ = { 40 | isa = PBXContainerItemProxy; 41 | containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; 42 | proxyType = 2; 43 | remoteGlobalIDString = D2AAC07E0554694100DB518D; 44 | remoteInfo = CordovaLib; 45 | }; 46 | 301BF550109A68C00062928A /* PBXContainerItemProxy */ = { 47 | isa = PBXContainerItemProxy; 48 | containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; 49 | proxyType = 1; 50 | remoteGlobalIDString = D2AAC07D0554694100DB518D; 51 | remoteInfo = CordovaLib; 52 | }; 53 | 907D8123214C687600058A10 /* PBXContainerItemProxy */ = { 54 | isa = PBXContainerItemProxy; 55 | containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; 56 | proxyType = 2; 57 | remoteGlobalIDString = C0C01EB21E3911D50056E6CB; 58 | remoteInfo = Cordova; 59 | }; 60 | /* End PBXContainerItemProxy section */ 61 | 62 | /* Begin PBXFileReference section */ 63 | 0207DA571B56EA530066E2B4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = InstabugExample/Images.xcassets; sourceTree = SOURCE_ROOT; }; 64 | 0E31CB1D285A12920090BCF6 /* InstabugExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InstabugExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | 0E31CB1F285A12920090BCF6 /* InvokeInstabugUITest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InvokeInstabugUITest.m; sourceTree = ""; }; 66 | 0E31CB2D285A12A50090BCF6 /* InstabugExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InstabugExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | 0E31CB2F285A12A50090BCF6 /* InstabugExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstabugExampleTests.m; sourceTree = ""; }; 68 | 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 = ""; }; 69 | 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 70 | 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 71 | 1D6058910D05DD3D006BFB54 /* InstabugExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InstabugExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 72 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 73 | 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = ""; }; 74 | 301BF56E109A69640062928A /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = SOURCE_ROOT; }; 75 | 302D95EE14D2391D003F00A1 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; 76 | 302D95EF14D2391D003F00A1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; 77 | 302D95F014D2391D003F00A1 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = ""; }; 78 | 3047A50F1AB8059700498E2A /* build-debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-debug.xcconfig"; path = "cordova/build-debug.xcconfig"; sourceTree = SOURCE_ROOT; }; 79 | 3047A5101AB8059700498E2A /* build-release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-release.xcconfig"; path = "cordova/build-release.xcconfig"; sourceTree = SOURCE_ROOT; }; 80 | 3047A5111AB8059700498E2A /* build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = build.xcconfig; path = cordova/build.xcconfig; sourceTree = SOURCE_ROOT; }; 81 | 32CA4F630368D1EE00C91783 /* InstabugExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "InstabugExample-Prefix.pch"; sourceTree = ""; }; 82 | 4FD05904E49982B6BC61107A /* Pods_InstabugExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_InstabugExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | 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 = ""; }; 84 | 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = CDVLaunchScreen.storyboard; path = InstabugExample/CDVLaunchScreen.storyboard; sourceTree = SOURCE_ROOT; }; 85 | 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; }; 86 | 8E7C69F401A64034A22084C5 /* IBGPlugin.m */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.objc; name = IBGPlugin.m; path = ../../../../../src/ios/IBGPlugin.m; sourceTree = ""; }; 87 | 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 = ""; }; 88 | EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = ""; }; 89 | EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = ""; }; 90 | ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = ""; }; 91 | 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 = ""; }; 92 | F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = InstabugExample/config.xml; sourceTree = ""; }; 93 | FD0720A4FF3A41AC8B3F2ED5 /* IBGPlugin.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = IBGPlugin.h; path = ../../../../../src/ios/IBGPlugin.h; sourceTree = ""; }; 94 | /* End PBXFileReference section */ 95 | 96 | /* Begin PBXFrameworksBuildPhase section */ 97 | 0E31CB1A285A12920090BCF6 /* Frameworks */ = { 98 | isa = PBXFrameworksBuildPhase; 99 | buildActionMask = 2147483647; 100 | files = ( 101 | ); 102 | runOnlyForDeploymentPostprocessing = 0; 103 | }; 104 | 0E31CB2A285A12A50090BCF6 /* Frameworks */ = { 105 | isa = PBXFrameworksBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | ); 109 | runOnlyForDeploymentPostprocessing = 0; 110 | }; 111 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 112 | isa = PBXFrameworksBuildPhase; 113 | buildActionMask = 2147483647; 114 | files = ( 115 | 301BF552109A68D80062928A /* libCordova.a in Frameworks */, 116 | A89BFCA79E392FD771BA8CA1 /* Pods_InstabugExample.framework in Frameworks */, 117 | ); 118 | runOnlyForDeploymentPostprocessing = 0; 119 | }; 120 | /* End PBXFrameworksBuildPhase section */ 121 | 122 | /* Begin PBXGroup section */ 123 | 080E96DDFE201D6D7F000001 /* Classes */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 302D95EE14D2391D003F00A1 /* MainViewController.h */, 127 | 302D95EF14D2391D003F00A1 /* MainViewController.m */, 128 | 302D95F014D2391D003F00A1 /* MainViewController.xib */, 129 | 1D3623240D0F684500981E51 /* AppDelegate.h */, 130 | 1D3623250D0F684500981E51 /* AppDelegate.m */, 131 | ); 132 | name = Classes; 133 | path = InstabugExample/Classes; 134 | sourceTree = SOURCE_ROOT; 135 | }; 136 | 0E31CB1E285A12920090BCF6 /* InstabugExampleUITests */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 0E31CB1F285A12920090BCF6 /* InvokeInstabugUITest.m */, 140 | ); 141 | path = InstabugExampleUITests; 142 | sourceTree = ""; 143 | }; 144 | 0E31CB2E285A12A50090BCF6 /* InstabugExampleTests */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 0E31CB2F285A12A50090BCF6 /* InstabugExampleTests.m */, 148 | ); 149 | path = InstabugExampleTests; 150 | sourceTree = ""; 151 | }; 152 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 1D6058910D05DD3D006BFB54 /* InstabugExample.app */, 156 | 0E31CB1D285A12920090BCF6 /* InstabugExampleUITests.xctest */, 157 | 0E31CB2D285A12A50090BCF6 /* InstabugExampleTests.xctest */, 158 | ); 159 | name = Products; 160 | sourceTree = ""; 161 | }; 162 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | EB87FDF41871DAF40020F90C /* config.xml */, 166 | EB87FDF31871DA8E0020F90C /* www */, 167 | EB87FDF11871DA420020F90C /* Staging */, 168 | 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */, 169 | 080E96DDFE201D6D7F000001 /* Classes */, 170 | 307C750510C5A3420062BCA9 /* Plugins */, 171 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 172 | 29B97317FDCFA39411CA2CEA /* Resources */, 173 | 0E31CB1E285A12920090BCF6 /* InstabugExampleUITests */, 174 | 0E31CB2E285A12A50090BCF6 /* InstabugExampleTests */, 175 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 176 | 19C28FACFE9D520D11CA2CBB /* Products */, 177 | B76558EE59B0DAC9B313741D /* Pods */, 178 | ); 179 | name = CustomTemplate; 180 | sourceTree = ""; 181 | }; 182 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | 32CA4F630368D1EE00C91783 /* InstabugExample-Prefix.pch */, 186 | 29B97316FDCFA39411CA2CEA /* main.m */, 187 | ED33DF2A687741AEAF9F8254 /* Bridging-Header.h */, 188 | ); 189 | name = "Other Sources"; 190 | path = InstabugExample; 191 | sourceTree = ""; 192 | }; 193 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | 0207DA571B56EA530066E2B4 /* Images.xcassets */, 197 | 3047A50E1AB8057F00498E2A /* config */, 198 | 8D1107310486CEB800E47090 /* InstabugExample-Info.plist */, 199 | 6AFF5BF81D6E424B00AB3073 /* CDVLaunchScreen.storyboard */, 200 | ); 201 | name = Resources; 202 | path = InstabugExample/Resources; 203 | sourceTree = ""; 204 | }; 205 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 206 | isa = PBXGroup; 207 | children = ( 208 | 4FD05904E49982B6BC61107A /* Pods_InstabugExample.framework */, 209 | ); 210 | name = Frameworks; 211 | sourceTree = ""; 212 | }; 213 | 301BF52E109A57CC0062928A /* Products */ = { 214 | isa = PBXGroup; 215 | children = ( 216 | 301BF535109A57CC0062928A /* libCordova.a */, 217 | 907D8124214C687600058A10 /* Cordova.framework */, 218 | ); 219 | name = Products; 220 | sourceTree = ""; 221 | }; 222 | 3047A50E1AB8057F00498E2A /* config */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | 3047A50F1AB8059700498E2A /* build-debug.xcconfig */, 226 | 3047A5101AB8059700498E2A /* build-release.xcconfig */, 227 | 3047A5111AB8059700498E2A /* build.xcconfig */, 228 | ); 229 | name = config; 230 | sourceTree = ""; 231 | }; 232 | 307C750510C5A3420062BCA9 /* Plugins */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 8E7C69F401A64034A22084C5 /* IBGPlugin.m */, 236 | 1718742CB8BD4C72AC4D8AFB /* ArgsRegistry.m */, 237 | FD0720A4FF3A41AC8B3F2ED5 /* IBGPlugin.h */, 238 | 6A632DF3F21A402FBC537F53 /* ArgsRegistry.h */, 239 | ); 240 | name = Plugins; 241 | path = InstabugExample/Plugins; 242 | sourceTree = SOURCE_ROOT; 243 | }; 244 | B76558EE59B0DAC9B313741D /* Pods */ = { 245 | isa = PBXGroup; 246 | children = ( 247 | EDF9F5601B46201F82297D24 /* Pods-InstabugExample.debug.xcconfig */, 248 | BDE959C269D6DC7381B8FA15 /* Pods-InstabugExample.release.xcconfig */, 249 | ); 250 | path = Pods; 251 | sourceTree = ""; 252 | }; 253 | EB87FDF11871DA420020F90C /* Staging */ = { 254 | isa = PBXGroup; 255 | children = ( 256 | F840E1F0165FE0F500CFE078 /* config.xml */, 257 | 301BF56E109A69640062928A /* www */, 258 | ); 259 | name = Staging; 260 | sourceTree = ""; 261 | }; 262 | /* End PBXGroup section */ 263 | 264 | /* Begin PBXNativeTarget section */ 265 | 0E31CB1C285A12920090BCF6 /* InstabugExampleUITests */ = { 266 | isa = PBXNativeTarget; 267 | buildConfigurationList = 0E31CB28285A12920090BCF6 /* Build configuration list for PBXNativeTarget "InstabugExampleUITests" */; 268 | buildPhases = ( 269 | 0E31CB19285A12920090BCF6 /* Sources */, 270 | 0E31CB1A285A12920090BCF6 /* Frameworks */, 271 | 0E31CB1B285A12920090BCF6 /* Resources */, 272 | ); 273 | buildRules = ( 274 | ); 275 | dependencies = ( 276 | 0E31CB24285A12920090BCF6 /* PBXTargetDependency */, 277 | ); 278 | name = InstabugExampleUITests; 279 | productName = InstabugExampleUITests; 280 | productReference = 0E31CB1D285A12920090BCF6 /* InstabugExampleUITests.xctest */; 281 | productType = "com.apple.product-type.bundle.ui-testing"; 282 | }; 283 | 0E31CB2C285A12A50090BCF6 /* InstabugExampleTests */ = { 284 | isa = PBXNativeTarget; 285 | buildConfigurationList = 0E31CB33285A12A50090BCF6 /* Build configuration list for PBXNativeTarget "InstabugExampleTests" */; 286 | buildPhases = ( 287 | 0E31CB29285A12A50090BCF6 /* Sources */, 288 | 0E31CB2A285A12A50090BCF6 /* Frameworks */, 289 | 0E31CB2B285A12A50090BCF6 /* Resources */, 290 | ); 291 | buildRules = ( 292 | ); 293 | dependencies = ( 294 | 0E31CB32285A12A50090BCF6 /* PBXTargetDependency */, 295 | ); 296 | name = InstabugExampleTests; 297 | productName = InstabugExampleTests; 298 | productReference = 0E31CB2D285A12A50090BCF6 /* InstabugExampleTests.xctest */; 299 | productType = "com.apple.product-type.bundle.unit-test"; 300 | }; 301 | 1D6058900D05DD3D006BFB54 /* InstabugExample */ = { 302 | isa = PBXNativeTarget; 303 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "InstabugExample" */; 304 | buildPhases = ( 305 | BC7C68A1A8714B8585B103AF /* [CP] Check Pods Manifest.lock */, 306 | 304B58A110DAC018002A0835 /* Copy www directory */, 307 | 1D60588D0D05DD3D006BFB54 /* Resources */, 308 | 1D60588E0D05DD3D006BFB54 /* Sources */, 309 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 310 | A50B1BF1D93A04BFDC9741F5 /* [CP] Embed Pods Frameworks */, 311 | ); 312 | buildRules = ( 313 | ); 314 | dependencies = ( 315 | 301BF551109A68C00062928A /* PBXTargetDependency */, 316 | ); 317 | name = InstabugExample; 318 | productName = InstabugExample; 319 | productReference = 1D6058910D05DD3D006BFB54 /* InstabugExample.app */; 320 | productType = "com.apple.product-type.application"; 321 | }; 322 | /* End PBXNativeTarget section */ 323 | 324 | /* Begin PBXProject section */ 325 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 326 | isa = PBXProject; 327 | attributes = { 328 | LastUpgradeCheck = 1130; 329 | TargetAttributes = { 330 | 0E31CB1C285A12920090BCF6 = { 331 | CreatedOnToolsVersion = 13.3; 332 | TestTargetID = 1D6058900D05DD3D006BFB54; 333 | }; 334 | 0E31CB2C285A12A50090BCF6 = { 335 | CreatedOnToolsVersion = 13.3; 336 | TestTargetID = 1D6058900D05DD3D006BFB54; 337 | }; 338 | 1D6058900D05DD3D006BFB54 = { 339 | ProvisioningStyle = Automatic; 340 | }; 341 | }; 342 | }; 343 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "InstabugExample" */; 344 | compatibilityVersion = "Xcode 11.0"; 345 | developmentRegion = en; 346 | hasScannedForEncodings = 1; 347 | knownRegions = ( 348 | en, 349 | Base, 350 | ); 351 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 352 | productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */; 353 | projectDirPath = ""; 354 | projectReferences = ( 355 | { 356 | ProductGroup = 301BF52E109A57CC0062928A /* Products */; 357 | ProjectRef = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; 358 | }, 359 | ); 360 | projectRoot = ""; 361 | targets = ( 362 | 1D6058900D05DD3D006BFB54 /* InstabugExample */, 363 | 0E31CB1C285A12920090BCF6 /* InstabugExampleUITests */, 364 | 0E31CB2C285A12A50090BCF6 /* InstabugExampleTests */, 365 | ); 366 | }; 367 | /* End PBXProject section */ 368 | 369 | /* Begin PBXReferenceProxy section */ 370 | 301BF535109A57CC0062928A /* libCordova.a */ = { 371 | isa = PBXReferenceProxy; 372 | fileType = archive.ar; 373 | path = libCordova.a; 374 | remoteRef = 301BF534109A57CC0062928A /* PBXContainerItemProxy */; 375 | sourceTree = BUILT_PRODUCTS_DIR; 376 | }; 377 | 907D8124214C687600058A10 /* Cordova.framework */ = { 378 | isa = PBXReferenceProxy; 379 | fileType = wrapper.framework; 380 | path = Cordova.framework; 381 | remoteRef = 907D8123214C687600058A10 /* PBXContainerItemProxy */; 382 | sourceTree = BUILT_PRODUCTS_DIR; 383 | }; 384 | /* End PBXReferenceProxy section */ 385 | 386 | /* Begin PBXResourcesBuildPhase section */ 387 | 0E31CB1B285A12920090BCF6 /* Resources */ = { 388 | isa = PBXResourcesBuildPhase; 389 | buildActionMask = 2147483647; 390 | files = ( 391 | ); 392 | runOnlyForDeploymentPostprocessing = 0; 393 | }; 394 | 0E31CB2B285A12A50090BCF6 /* Resources */ = { 395 | isa = PBXResourcesBuildPhase; 396 | buildActionMask = 2147483647; 397 | files = ( 398 | ); 399 | runOnlyForDeploymentPostprocessing = 0; 400 | }; 401 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 402 | isa = PBXResourcesBuildPhase; 403 | buildActionMask = 2147483647; 404 | files = ( 405 | 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */, 406 | 0207DA581B56EA530066E2B4 /* Images.xcassets in Resources */, 407 | 6AFF5BF91D6E424B00AB3073 /* CDVLaunchScreen.storyboard in Resources */, 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | /* End PBXResourcesBuildPhase section */ 412 | 413 | /* Begin PBXShellScriptBuildPhase section */ 414 | 304B58A110DAC018002A0835 /* Copy www directory */ = { 415 | isa = PBXShellScriptBuildPhase; 416 | buildActionMask = 2147483647; 417 | files = ( 418 | ); 419 | inputPaths = ( 420 | ); 421 | name = "Copy www directory"; 422 | outputPaths = ( 423 | ); 424 | runOnlyForDeploymentPostprocessing = 0; 425 | shellPath = /bin/sh; 426 | shellScript = "\"$SRCROOT/InstabugExample/Scripts/copy-www-build-step.sh\""; 427 | showEnvVarsInLog = 0; 428 | }; 429 | A50B1BF1D93A04BFDC9741F5 /* [CP] Embed Pods Frameworks */ = { 430 | isa = PBXShellScriptBuildPhase; 431 | buildActionMask = 2147483647; 432 | files = ( 433 | ); 434 | inputFileListPaths = ( 435 | "${PODS_ROOT}/Target Support Files/Pods-InstabugExample/Pods-InstabugExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", 436 | ); 437 | name = "[CP] Embed Pods Frameworks"; 438 | outputFileListPaths = ( 439 | "${PODS_ROOT}/Target Support Files/Pods-InstabugExample/Pods-InstabugExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", 440 | ); 441 | runOnlyForDeploymentPostprocessing = 0; 442 | shellPath = /bin/sh; 443 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InstabugExample/Pods-InstabugExample-frameworks.sh\"\n"; 444 | showEnvVarsInLog = 0; 445 | }; 446 | BC7C68A1A8714B8585B103AF /* [CP] Check Pods Manifest.lock */ = { 447 | isa = PBXShellScriptBuildPhase; 448 | buildActionMask = 2147483647; 449 | files = ( 450 | ); 451 | inputFileListPaths = ( 452 | ); 453 | inputPaths = ( 454 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 455 | "${PODS_ROOT}/Manifest.lock", 456 | ); 457 | name = "[CP] Check Pods Manifest.lock"; 458 | outputFileListPaths = ( 459 | ); 460 | outputPaths = ( 461 | "$(DERIVED_FILE_DIR)/Pods-InstabugExample-checkManifestLockResult.txt", 462 | ); 463 | runOnlyForDeploymentPostprocessing = 0; 464 | shellPath = /bin/sh; 465 | 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"; 466 | showEnvVarsInLog = 0; 467 | }; 468 | /* End PBXShellScriptBuildPhase section */ 469 | 470 | /* Begin PBXSourcesBuildPhase section */ 471 | 0E31CB19285A12920090BCF6 /* Sources */ = { 472 | isa = PBXSourcesBuildPhase; 473 | buildActionMask = 2147483647; 474 | files = ( 475 | 0E31CB20285A12920090BCF6 /* InvokeInstabugUITest.m in Sources */, 476 | ); 477 | runOnlyForDeploymentPostprocessing = 0; 478 | }; 479 | 0E31CB29285A12A50090BCF6 /* Sources */ = { 480 | isa = PBXSourcesBuildPhase; 481 | buildActionMask = 2147483647; 482 | files = ( 483 | 0E31CB30285A12A50090BCF6 /* InstabugExampleTests.m in Sources */, 484 | ); 485 | runOnlyForDeploymentPostprocessing = 0; 486 | }; 487 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 488 | isa = PBXSourcesBuildPhase; 489 | buildActionMask = 2147483647; 490 | files = ( 491 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 492 | 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, 493 | 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, 494 | 8163E8A2B4324A7EAB9F01BB /* IBGPlugin.m in Sources */, 495 | 5E56E9D77C2A469E968F11CB /* ArgsRegistry.m in Sources */, 496 | ); 497 | runOnlyForDeploymentPostprocessing = 0; 498 | }; 499 | /* End PBXSourcesBuildPhase section */ 500 | 501 | /* Begin PBXTargetDependency section */ 502 | 0E31CB24285A12920090BCF6 /* PBXTargetDependency */ = { 503 | isa = PBXTargetDependency; 504 | target = 1D6058900D05DD3D006BFB54 /* InstabugExample */; 505 | targetProxy = 0E31CB23285A12920090BCF6 /* PBXContainerItemProxy */; 506 | }; 507 | 0E31CB32285A12A50090BCF6 /* PBXTargetDependency */ = { 508 | isa = PBXTargetDependency; 509 | target = 1D6058900D05DD3D006BFB54 /* InstabugExample */; 510 | targetProxy = 0E31CB31285A12A50090BCF6 /* PBXContainerItemProxy */; 511 | }; 512 | 301BF551109A68C00062928A /* PBXTargetDependency */ = { 513 | isa = PBXTargetDependency; 514 | name = CordovaLib; 515 | targetProxy = 301BF550109A68C00062928A /* PBXContainerItemProxy */; 516 | }; 517 | /* End PBXTargetDependency section */ 518 | 519 | /* Begin XCBuildConfiguration section */ 520 | 0E31CB25285A12920090BCF6 /* Debug */ = { 521 | isa = XCBuildConfiguration; 522 | buildSettings = { 523 | ALWAYS_SEARCH_USER_PATHS = NO; 524 | CLANG_ANALYZER_NONNULL = YES; 525 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 526 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 527 | CLANG_ENABLE_OBJC_WEAK = YES; 528 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 529 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 530 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 531 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 532 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 533 | CODE_SIGN_STYLE = Automatic; 534 | COPY_PHASE_STRIP = NO; 535 | CURRENT_PROJECT_VERSION = 1; 536 | DEBUG_INFORMATION_FORMAT = dwarf; 537 | GCC_C_LANGUAGE_STANDARD = gnu11; 538 | GCC_DYNAMIC_NO_PIC = NO; 539 | GCC_OPTIMIZATION_LEVEL = 0; 540 | GCC_PREPROCESSOR_DEFINITIONS = ( 541 | "DEBUG=1", 542 | "$(inherited)", 543 | ); 544 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 545 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 546 | GENERATE_INFOPLIST_FILE = YES; 547 | IPHONEOS_DEPLOYMENT_TARGET = 15.4; 548 | MARKETING_VERSION = 1.0; 549 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 550 | MTL_FAST_MATH = YES; 551 | PRODUCT_BUNDLE_IDENTIFIER = tests.InstabugExampleUITests; 552 | PRODUCT_NAME = "$(TARGET_NAME)"; 553 | SWIFT_EMIT_LOC_STRINGS = NO; 554 | TARGETED_DEVICE_FAMILY = "1,2"; 555 | TEST_TARGET_NAME = InstabugExample; 556 | }; 557 | name = Debug; 558 | }; 559 | 0E31CB26285A12920090BCF6 /* Release */ = { 560 | isa = XCBuildConfiguration; 561 | buildSettings = { 562 | ALWAYS_SEARCH_USER_PATHS = NO; 563 | CLANG_ANALYZER_NONNULL = YES; 564 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 565 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 566 | CLANG_ENABLE_OBJC_WEAK = YES; 567 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 568 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 569 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 570 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 571 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 572 | CODE_SIGN_STYLE = Automatic; 573 | COPY_PHASE_STRIP = NO; 574 | CURRENT_PROJECT_VERSION = 1; 575 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 576 | ENABLE_NS_ASSERTIONS = NO; 577 | GCC_C_LANGUAGE_STANDARD = gnu11; 578 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 579 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 580 | GENERATE_INFOPLIST_FILE = YES; 581 | IPHONEOS_DEPLOYMENT_TARGET = 15.4; 582 | MARKETING_VERSION = 1.0; 583 | MTL_ENABLE_DEBUG_INFO = NO; 584 | MTL_FAST_MATH = YES; 585 | PRODUCT_BUNDLE_IDENTIFIER = tests.InstabugExampleUITests; 586 | PRODUCT_NAME = "$(TARGET_NAME)"; 587 | SWIFT_EMIT_LOC_STRINGS = NO; 588 | TARGETED_DEVICE_FAMILY = "1,2"; 589 | TEST_TARGET_NAME = InstabugExample; 590 | VALIDATE_PRODUCT = YES; 591 | }; 592 | name = Release; 593 | }; 594 | 0E31CB34285A12A50090BCF6 /* Debug */ = { 595 | isa = XCBuildConfiguration; 596 | buildSettings = { 597 | ALWAYS_SEARCH_USER_PATHS = NO; 598 | BUNDLE_LOADER = "$(TEST_HOST)"; 599 | CLANG_ANALYZER_NONNULL = YES; 600 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 601 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 602 | CLANG_ENABLE_OBJC_WEAK = YES; 603 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 604 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 605 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 606 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 607 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 608 | CODE_SIGN_STYLE = Automatic; 609 | COPY_PHASE_STRIP = NO; 610 | CURRENT_PROJECT_VERSION = 1; 611 | DEBUG_INFORMATION_FORMAT = dwarf; 612 | GCC_C_LANGUAGE_STANDARD = gnu11; 613 | GCC_DYNAMIC_NO_PIC = NO; 614 | GCC_OPTIMIZATION_LEVEL = 0; 615 | GCC_PREPROCESSOR_DEFINITIONS = ( 616 | "DEBUG=1", 617 | "$(inherited)", 618 | ); 619 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 620 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 621 | GENERATE_INFOPLIST_FILE = YES; 622 | IPHONEOS_DEPLOYMENT_TARGET = 15.4; 623 | MARKETING_VERSION = 1.0; 624 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 625 | MTL_FAST_MATH = YES; 626 | PRODUCT_BUNDLE_IDENTIFIER = tests.InstabugExampleTests; 627 | PRODUCT_NAME = "$(TARGET_NAME)"; 628 | SWIFT_EMIT_LOC_STRINGS = NO; 629 | TARGETED_DEVICE_FAMILY = "1,2"; 630 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InstabugExample.app/InstabugExample"; 631 | }; 632 | name = Debug; 633 | }; 634 | 0E31CB35285A12A50090BCF6 /* Release */ = { 635 | isa = XCBuildConfiguration; 636 | buildSettings = { 637 | ALWAYS_SEARCH_USER_PATHS = NO; 638 | BUNDLE_LOADER = "$(TEST_HOST)"; 639 | CLANG_ANALYZER_NONNULL = YES; 640 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 641 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 642 | CLANG_ENABLE_OBJC_WEAK = YES; 643 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 644 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 645 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 646 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 647 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 648 | CODE_SIGN_STYLE = Automatic; 649 | COPY_PHASE_STRIP = NO; 650 | CURRENT_PROJECT_VERSION = 1; 651 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 652 | ENABLE_NS_ASSERTIONS = NO; 653 | GCC_C_LANGUAGE_STANDARD = gnu11; 654 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 655 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 656 | GENERATE_INFOPLIST_FILE = YES; 657 | IPHONEOS_DEPLOYMENT_TARGET = 15.4; 658 | MARKETING_VERSION = 1.0; 659 | MTL_ENABLE_DEBUG_INFO = NO; 660 | MTL_FAST_MATH = YES; 661 | PRODUCT_BUNDLE_IDENTIFIER = tests.InstabugExampleTests; 662 | PRODUCT_NAME = "$(TARGET_NAME)"; 663 | SWIFT_EMIT_LOC_STRINGS = NO; 664 | TARGETED_DEVICE_FAMILY = "1,2"; 665 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InstabugExample.app/InstabugExample"; 666 | VALIDATE_PRODUCT = YES; 667 | }; 668 | name = Release; 669 | }; 670 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 671 | isa = XCBuildConfiguration; 672 | baseConfigurationReference = 3047A50F1AB8059700498E2A /* build-debug.xcconfig */; 673 | buildSettings = { 674 | ALWAYS_SEARCH_USER_PATHS = NO; 675 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 676 | CLANG_ENABLE_MODULES = YES; 677 | CLANG_ENABLE_OBJC_ARC = YES; 678 | COPY_PHASE_STRIP = NO; 679 | GCC_DYNAMIC_NO_PIC = NO; 680 | GCC_OPTIMIZATION_LEVEL = 0; 681 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 682 | GCC_PREFIX_HEADER = "InstabugExample/InstabugExample-Prefix.pch"; 683 | GCC_THUMB_SUPPORT = NO; 684 | GCC_VERSION = ""; 685 | INFOPLIST_FILE = "InstabugExample/InstabugExample-Info.plist"; 686 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 687 | LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; 688 | PRODUCT_BUNDLE_IDENTIFIER = com.instabug.example; 689 | PRODUCT_NAME = "$(TARGET_NAME)"; 690 | TARGETED_DEVICE_FAMILY = "1,2"; 691 | VALIDATE_WORKSPACE = NO; 692 | }; 693 | name = Debug; 694 | }; 695 | 1D6058950D05DD3E006BFB54 /* Release */ = { 696 | isa = XCBuildConfiguration; 697 | baseConfigurationReference = 3047A5101AB8059700498E2A /* build-release.xcconfig */; 698 | buildSettings = { 699 | ALWAYS_SEARCH_USER_PATHS = NO; 700 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 701 | CLANG_ENABLE_MODULES = YES; 702 | CLANG_ENABLE_OBJC_ARC = YES; 703 | COPY_PHASE_STRIP = YES; 704 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 705 | GCC_PREFIX_HEADER = "InstabugExample/InstabugExample-Prefix.pch"; 706 | GCC_THUMB_SUPPORT = NO; 707 | GCC_VERSION = ""; 708 | INFOPLIST_FILE = "InstabugExample/InstabugExample-Info.plist"; 709 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 710 | LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; 711 | PRODUCT_BUNDLE_IDENTIFIER = com.instabug.example; 712 | PRODUCT_NAME = "$(TARGET_NAME)"; 713 | TARGETED_DEVICE_FAMILY = "1,2"; 714 | VALIDATE_WORKSPACE = NO; 715 | }; 716 | name = Release; 717 | }; 718 | C01FCF4F08A954540054247B /* Debug */ = { 719 | isa = XCBuildConfiguration; 720 | baseConfigurationReference = 3047A5111AB8059700498E2A /* build.xcconfig */; 721 | buildSettings = { 722 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 723 | CLANG_ENABLE_MODULES = YES; 724 | CLANG_ENABLE_OBJC_ARC = YES; 725 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 726 | CLANG_WARN_BOOL_CONVERSION = YES; 727 | CLANG_WARN_COMMA = YES; 728 | CLANG_WARN_CONSTANT_CONVERSION = YES; 729 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 730 | CLANG_WARN_EMPTY_BODY = YES; 731 | CLANG_WARN_ENUM_CONVERSION = YES; 732 | CLANG_WARN_INFINITE_RECURSION = YES; 733 | CLANG_WARN_INT_CONVERSION = YES; 734 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 735 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 736 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 737 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 738 | CLANG_WARN_STRICT_PROTOTYPES = YES; 739 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 740 | CLANG_WARN_UNREACHABLE_CODE = YES; 741 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 742 | ENABLE_STRICT_OBJC_MSGSEND = YES; 743 | ENABLE_TESTABILITY = YES; 744 | GCC_C_LANGUAGE_STANDARD = c99; 745 | GCC_NO_COMMON_BLOCKS = YES; 746 | GCC_THUMB_SUPPORT = NO; 747 | GCC_VERSION = ""; 748 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 749 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 750 | GCC_WARN_UNDECLARED_SELECTOR = YES; 751 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 752 | GCC_WARN_UNUSED_FUNCTION = YES; 753 | GCC_WARN_UNUSED_VARIABLE = YES; 754 | ONLY_ACTIVE_ARCH = YES; 755 | SDKROOT = iphoneos; 756 | SKIP_INSTALL = NO; 757 | WK_WEB_VIEW_ONLY = 1; 758 | }; 759 | name = Debug; 760 | }; 761 | C01FCF5008A954540054247B /* Release */ = { 762 | isa = XCBuildConfiguration; 763 | baseConfigurationReference = 3047A5111AB8059700498E2A /* build.xcconfig */; 764 | buildSettings = { 765 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 766 | CLANG_ENABLE_MODULES = YES; 767 | CLANG_ENABLE_OBJC_ARC = YES; 768 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 769 | CLANG_WARN_BOOL_CONVERSION = YES; 770 | CLANG_WARN_COMMA = YES; 771 | CLANG_WARN_CONSTANT_CONVERSION = YES; 772 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 773 | CLANG_WARN_EMPTY_BODY = YES; 774 | CLANG_WARN_ENUM_CONVERSION = YES; 775 | CLANG_WARN_INFINITE_RECURSION = YES; 776 | CLANG_WARN_INT_CONVERSION = YES; 777 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 778 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 779 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 780 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 781 | CLANG_WARN_STRICT_PROTOTYPES = YES; 782 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 783 | CLANG_WARN_UNREACHABLE_CODE = YES; 784 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 785 | ENABLE_STRICT_OBJC_MSGSEND = YES; 786 | GCC_C_LANGUAGE_STANDARD = c99; 787 | GCC_NO_COMMON_BLOCKS = YES; 788 | GCC_THUMB_SUPPORT = NO; 789 | GCC_VERSION = ""; 790 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 791 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 792 | GCC_WARN_UNDECLARED_SELECTOR = YES; 793 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 794 | GCC_WARN_UNUSED_FUNCTION = YES; 795 | GCC_WARN_UNUSED_VARIABLE = YES; 796 | SDKROOT = iphoneos; 797 | SKIP_INSTALL = NO; 798 | WK_WEB_VIEW_ONLY = 1; 799 | }; 800 | name = Release; 801 | }; 802 | /* End XCBuildConfiguration section */ 803 | 804 | /* Begin XCConfigurationList section */ 805 | 0E31CB28285A12920090BCF6 /* Build configuration list for PBXNativeTarget "InstabugExampleUITests" */ = { 806 | isa = XCConfigurationList; 807 | buildConfigurations = ( 808 | 0E31CB25285A12920090BCF6 /* Debug */, 809 | 0E31CB26285A12920090BCF6 /* Release */, 810 | ); 811 | defaultConfigurationIsVisible = 0; 812 | defaultConfigurationName = Release; 813 | }; 814 | 0E31CB33285A12A50090BCF6 /* Build configuration list for PBXNativeTarget "InstabugExampleTests" */ = { 815 | isa = XCConfigurationList; 816 | buildConfigurations = ( 817 | 0E31CB34285A12A50090BCF6 /* Debug */, 818 | 0E31CB35285A12A50090BCF6 /* Release */, 819 | ); 820 | defaultConfigurationIsVisible = 0; 821 | defaultConfigurationName = Release; 822 | }; 823 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "InstabugExample" */ = { 824 | isa = XCConfigurationList; 825 | buildConfigurations = ( 826 | 1D6058940D05DD3E006BFB54 /* Debug */, 827 | 1D6058950D05DD3E006BFB54 /* Release */, 828 | ); 829 | defaultConfigurationIsVisible = 0; 830 | defaultConfigurationName = Release; 831 | }; 832 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "InstabugExample" */ = { 833 | isa = XCConfigurationList; 834 | buildConfigurations = ( 835 | C01FCF4F08A954540054247B /* Debug */, 836 | C01FCF5008A954540054247B /* Release */, 837 | ); 838 | defaultConfigurationIsVisible = 0; 839 | defaultConfigurationName = Release; 840 | }; 841 | /* End XCConfigurationList section */ 842 | }; 843 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 844 | } 845 | -------------------------------------------------------------------------------- /example/tests/src/ios/InstabugExample.xcworkspace/xcshareddata/xcschemes/InstabugExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 52 | 58 | 59 | 60 | 61 | 62 | 72 | 74 | 80 | 81 | 82 | 83 | 89 | 91 | 97 | 98 | 99 | 100 | 102 | 103 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /example/tests/src/ios/InstabugExampleTests/InstabugExampleTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface InstabugExampleTests : XCTestCase 4 | 5 | @end 6 | 7 | @implementation InstabugExampleTests 8 | 9 | - (void)setUp { 10 | // Put setup code here. This method is called before the invocation of each test method in the class. 11 | } 12 | 13 | - (void)tearDown { 14 | // Put teardown code here. This method is called after the invocation of each test method in the class. 15 | } 16 | 17 | - (void)testExample { 18 | // This is an example of a functional test case. 19 | // Use XCTAssert and related functions to verify your tests produce the correct results. 20 | } 21 | 22 | - (void)testPerformanceExample { 23 | // This is an example of a performance test case. 24 | [self measureBlock:^{ 25 | // Put the code you want to measure the time of here. 26 | }]; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /example/tests/src/ios/InstabugExampleUITests/InvokeInstabugUITest.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface InstabugSampleUITests : XCTestCase 4 | 5 | @end 6 | 7 | @implementation InstabugSampleUITests 8 | 9 | - (void)setUp { 10 | self.continueAfterFailure = NO; 11 | [[[XCUIApplication alloc] init] launch]; 12 | } 13 | 14 | - (void)testInstabugSendBugReport { 15 | XCUIApplication *app = [[XCUIApplication alloc] init]; 16 | [app.buttons[@"IBGFloatingButtonAccessibilityIdentifier"] tap]; 17 | 18 | XCUIElement *reportBugButton = app.tables.staticTexts[@"Report a bug"]; 19 | [self waitForElementToAppear:reportBugButton withTimeout:5]; 20 | [reportBugButton tap]; 21 | 22 | XCUIElement *textField = app.scrollViews.textFields[@"IBGBugInputViewEmailFieldAccessibilityIdentifier"]; 23 | 24 | [textField tap]; 25 | if (![textField.value isEqual: @"Enter your email"]) { 26 | [textField pressForDuration:1.2]; 27 | [app.menuItems[@"Select All"] tap]; 28 | } 29 | [textField typeText:@"inst@bug.com"]; 30 | [app.navigationBars[@"Report a bug"]/*@START_MENU_TOKEN@*/.buttons[@"IBGBugVCNextButtonAccessibilityIdentifier"]/*[[".buttons[@\"Send\"]",".buttons[@\"IBGBugVCNextButtonAccessibilityIdentifier\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/ tap]; 31 | 32 | XCUIElement *element = app.staticTexts[@"Thank you"]; 33 | [self waitForElementToAppear:element withTimeout:5]; 34 | } 35 | 36 | 37 | - (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout 38 | { 39 | NSUInteger line = __LINE__; 40 | NSString *file = [NSString stringWithUTF8String:__FILE__]; 41 | NSPredicate *existsPredicate = [NSPredicate predicateWithFormat:@"exists == true"]; 42 | 43 | [self expectationForPredicate:existsPredicate evaluatedWithObject:element handler:nil]; 44 | 45 | [self waitForExpectationsWithTimeout:timeout handler:^(NSError * _Nullable error) { 46 | if (error != nil) { 47 | NSString *message = [NSString stringWithFormat:@"Failed to find %@ after %f seconds",element,timeout]; 48 | [self recordFailureWithDescription:message inFile:file atLine:line expected:YES]; 49 | } 50 | }]; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /example/www/css/index.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | * { 20 | -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */ 21 | } 22 | 23 | body { 24 | -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ 25 | -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ 26 | -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ 27 | background-color:#E4E4E4; 28 | background-image:linear-gradient(to bottom, #A7A7A7 0%, #E4E4E4 51%); 29 | font-family: system-ui, -apple-system, -apple-system-font, 'Segoe UI', 'Roboto', sans-serif; 30 | font-size:12px; 31 | height:100vh; 32 | margin:0px; 33 | padding:0px; 34 | /* Padding to avoid the "unsafe" areas behind notches in the screen */ 35 | 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); 36 | text-transform:uppercase; 37 | width:100%; 38 | } 39 | 40 | /* Portrait layout (default) */ 41 | .app { 42 | background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */ 43 | position:absolute; /* position in the center of the screen */ 44 | left:50%; 45 | top:50%; 46 | height:50px; /* text area height */ 47 | width:225px; /* text area width */ 48 | text-align:center; 49 | padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */ 50 | margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */ 51 | /* offset horizontal: half of text area width */ 52 | } 53 | 54 | /* Landscape layout (with min-width) */ 55 | @media screen and (min-aspect-ratio: 1/1) and (min-width:400px) { 56 | .app { 57 | background-position:left center; 58 | padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */ 59 | margin:-90px 0px 0px -198px; /* offset vertical: half of image height */ 60 | /* offset horizontal: half of image width and text area width */ 61 | } 62 | } 63 | 64 | h1 { 65 | font-size:24px; 66 | font-weight:normal; 67 | margin:0px; 68 | overflow:visible; 69 | padding:0px; 70 | text-align:center; 71 | } 72 | 73 | .event { 74 | border-radius:4px; 75 | color:#FFFFFF; 76 | font-size:12px; 77 | margin:0px 30px; 78 | padding:2px 0px; 79 | } 80 | 81 | .event.listening { 82 | background-color:#333333; 83 | display:block; 84 | } 85 | 86 | .event.received { 87 | background-color:#4B946A; 88 | display:none; 89 | } 90 | 91 | #deviceready.ready .event.listening { display: none; } 92 | #deviceready.ready .event.received { display: block; } 93 | 94 | @keyframes fade { 95 | from { opacity: 1.0; } 96 | 50% { opacity: 0.4; } 97 | to { opacity: 1.0; } 98 | } 99 | 100 | .blink { 101 | animation:fade 3000ms infinite; 102 | -webkit-animation:fade 3000ms infinite; 103 | } 104 | 105 | 106 | @media screen and (prefers-color-scheme: dark) { 107 | body { 108 | background-image:linear-gradient(to bottom, #585858 0%, #1B1B1B 51%); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /example/www/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Instabug/Instabug-Cordova/50ad8bc05fcab61bb9d03e4bd9f35d2a3f3cc6b9/example/www/img/logo.png -------------------------------------------------------------------------------- /example/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | Hello World 38 | 39 | 40 |
41 |

Apache Cordova

42 | 46 |
47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/www/js/index.js: -------------------------------------------------------------------------------- 1 | 2 | document.addEventListener("deviceready", onDeviceReady, false); 3 | 4 | function onDeviceReady() { 5 | /** @type {import('instabug-cordova/www/Instabug')} */ 6 | var Instabug = cordova.require("instabug-cordova.Instabug"); 7 | /** @type {import('instabug-cordova/www/BugReporting')} */ 8 | var BugReporting = cordova.require("instabug-cordova.BugReporting"); 9 | var ArgsRegistry = cordova.require("instabug-cordova.ArgsRegistry") 10 | console.log("Running cordova-" + cordova.platformId + "@" + cordova.version); 11 | document.getElementById("deviceready").classList.add("ready"); 12 | Instabug.init({ 13 | token: 'cb518c145decef204b0735cb7efa6016', 14 | invocationEvents: [BugReporting.invocationEvents.button], 15 | debugLogsLevel: ArgsRegistry.logLeve.verbose, 16 | }); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /example/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@netflix/nerror@^1.1.3": 6 | version "1.1.3" 7 | resolved "https://registry.npmjs.org/@netflix/nerror/-/nerror-1.1.3.tgz" 8 | integrity sha512-b+MGNyP9/LXkapreJzNUzcvuzZslj/RGgdVVJ16P2wSlYatfLycPObImqVJSmNAdyeShvNeM/pl3sVZsObFueg== 9 | dependencies: 10 | assert-plus "^1.0.0" 11 | extsprintf "^1.4.0" 12 | lodash "^4.17.15" 13 | 14 | "@nodelib/fs.scandir@2.1.5": 15 | version "2.1.5" 16 | resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" 17 | integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== 18 | dependencies: 19 | "@nodelib/fs.stat" "2.0.5" 20 | run-parallel "^1.1.9" 21 | 22 | "@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": 23 | version "2.0.5" 24 | resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" 25 | integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== 26 | 27 | "@nodelib/fs.walk@^1.2.3": 28 | version "1.2.8" 29 | resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" 30 | integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== 31 | dependencies: 32 | "@nodelib/fs.scandir" "2.1.5" 33 | fastq "^1.6.0" 34 | 35 | abbrev@1: 36 | version "1.1.1" 37 | resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" 38 | integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== 39 | 40 | android-versions@^1.7.0: 41 | version "1.8.1" 42 | dependencies: 43 | semver "^5.7.1" 44 | 45 | ansi@^0.3.1: 46 | version "0.3.1" 47 | resolved "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz" 48 | integrity sha512-iFY7JCgHbepc0b82yLaw4IMortylNb6wG4kL+4R0C3iv6i+RHGHux/yUX5BTiRvSX/shMnngjR1YyNMnXEFh5A== 49 | 50 | assert-plus@^1.0.0: 51 | version "1.0.0" 52 | resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" 53 | integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== 54 | 55 | at-least-node@^1.0.0: 56 | version "1.0.0" 57 | resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz" 58 | integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== 59 | 60 | balanced-match@^1.0.0: 61 | version "1.0.2" 62 | resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" 63 | integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== 64 | 65 | base64-js@^1.5.1: 66 | version "1.5.1" 67 | resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" 68 | integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== 69 | 70 | big-integer@^1.6.44, big-integer@1.6.x: 71 | version "1.6.51" 72 | 73 | bplist-creator@0.1.0: 74 | version "0.1.0" 75 | resolved "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.1.0.tgz" 76 | integrity sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg== 77 | dependencies: 78 | stream-buffers "2.2.x" 79 | 80 | bplist-parser@^0.0.6: 81 | version "0.0.6" 82 | resolved "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz" 83 | integrity sha512-fGeghPEH4Eytvf+Mi446aKcDqvkA/+eh6r7QGiZWMQG6TzqrnsToLP379XFfqRSZ41+676hhGIm++maNST1Apw== 84 | 85 | bplist-parser@^0.2.0: 86 | version "0.2.0" 87 | resolved "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz" 88 | integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== 89 | dependencies: 90 | big-integer "^1.6.44" 91 | 92 | bplist-parser@0.3.1: 93 | version "0.3.1" 94 | resolved "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.1.tgz" 95 | integrity sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA== 96 | dependencies: 97 | big-integer "1.6.x" 98 | 99 | brace-expansion@^1.1.7: 100 | version "1.1.11" 101 | resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" 102 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 103 | dependencies: 104 | balanced-match "^1.0.0" 105 | concat-map "0.0.1" 106 | 107 | braces@^3.0.2: 108 | version "3.0.2" 109 | dependencies: 110 | fill-range "^7.0.1" 111 | 112 | concat-map@0.0.1: 113 | version "0.0.1" 114 | resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" 115 | integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== 116 | 117 | cordova-android@^11.0.0: 118 | version "11.0.0" 119 | resolved "https://registry.npmjs.org/cordova-android/-/cordova-android-11.0.0.tgz" 120 | integrity sha512-ZhvSF5BYY8gmrAu1PtMPdHFsRoom/emT4OtTcecmh3Zj22900y4Golg5whhBPcYcTPC7BU6PG/EmG9BBHcX9tQ== 121 | dependencies: 122 | android-versions "^1.7.0" 123 | cordova-common "^4.0.2" 124 | execa "^5.1.1" 125 | fast-glob "^3.2.11" 126 | fs-extra "^10.1.0" 127 | is-path-inside "^3.0.3" 128 | nopt "^5.0.0" 129 | properties-parser "^0.3.1" 130 | semver "^7.3.7" 131 | untildify "^4.0.0" 132 | which "^2.0.2" 133 | 134 | cordova-common@^4.0.2: 135 | version "4.1.0" 136 | resolved "https://registry.npmjs.org/cordova-common/-/cordova-common-4.1.0.tgz" 137 | integrity sha512-sYfOSfpYGQOmUDlsARUbpT/EvVKT/E+GI3zwTXt+C6DjZ7xs6ZQVHs3umHKSidjf9yVM2LLmvGFpGrGX7aGxug== 138 | dependencies: 139 | "@netflix/nerror" "^1.1.3" 140 | ansi "^0.3.1" 141 | bplist-parser "^0.2.0" 142 | cross-spawn "^7.0.1" 143 | elementtree "^0.1.7" 144 | endent "^1.4.1" 145 | fast-glob "^3.2.2" 146 | fs-extra "^9.0.0" 147 | glob "^7.1.6" 148 | plist "^3.0.1" 149 | q "^1.5.1" 150 | read-chunk "^3.2.0" 151 | strip-bom "^4.0.0" 152 | underscore "^1.9.2" 153 | 154 | cordova-ios@^6.2.0: 155 | version "6.2.0" 156 | dependencies: 157 | cordova-common "^4.0.2" 158 | fs-extra "^9.1.0" 159 | ios-sim "^8.0.2" 160 | nopt "^5.0.0" 161 | plist "^3.0.1" 162 | semver "^7.3.4" 163 | unorm "^1.6.0" 164 | which "^2.0.2" 165 | xcode "^3.0.1" 166 | xml-escape "^1.1.0" 167 | 168 | cross-spawn@^7.0.1, cross-spawn@^7.0.3: 169 | version "7.0.3" 170 | dependencies: 171 | path-key "^3.1.0" 172 | shebang-command "^2.0.0" 173 | which "^2.0.1" 174 | 175 | dedent@^0.7.0: 176 | version "0.7.0" 177 | resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz" 178 | integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== 179 | 180 | elementtree@^0.1.7: 181 | version "0.1.7" 182 | resolved "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz" 183 | integrity sha512-wkgGT6kugeQk/P6VZ/f4T+4HB41BVgNBq5CDIZVbQ02nvTVqAiVTbskxxu3eA/X96lMlfYOwnLQpN2v5E1zDEg== 184 | dependencies: 185 | sax "1.1.4" 186 | 187 | endent@^1.4.1: 188 | version "1.4.1" 189 | resolved "https://registry.npmjs.org/endent/-/endent-1.4.1.tgz" 190 | integrity sha512-buHTb5c8AC9NshtP6dgmNLYkiT+olskbq1z6cEGvfGCF3Qphbu/1zz5Xu+yjTDln8RbxNhPoUyJ5H8MSrp1olQ== 191 | dependencies: 192 | dedent "^0.7.0" 193 | fast-json-parse "^1.0.3" 194 | objectorarray "^1.0.4" 195 | 196 | execa@^5.1.1: 197 | version "5.1.1" 198 | resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" 199 | integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== 200 | dependencies: 201 | cross-spawn "^7.0.3" 202 | get-stream "^6.0.0" 203 | human-signals "^2.1.0" 204 | is-stream "^2.0.0" 205 | merge-stream "^2.0.0" 206 | npm-run-path "^4.0.1" 207 | onetime "^5.1.2" 208 | signal-exit "^3.0.3" 209 | strip-final-newline "^2.0.0" 210 | 211 | extsprintf@^1.4.0: 212 | version "1.4.1" 213 | resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz" 214 | integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== 215 | 216 | fast-glob@^3.2.11, fast-glob@^3.2.2: 217 | version "3.2.12" 218 | dependencies: 219 | "@nodelib/fs.stat" "^2.0.2" 220 | "@nodelib/fs.walk" "^1.2.3" 221 | glob-parent "^5.1.2" 222 | merge2 "^1.3.0" 223 | micromatch "^4.0.4" 224 | 225 | fast-json-parse@^1.0.3: 226 | version "1.0.3" 227 | resolved "https://registry.npmjs.org/fast-json-parse/-/fast-json-parse-1.0.3.tgz" 228 | integrity sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw== 229 | 230 | fastq@^1.6.0: 231 | version "1.15.0" 232 | dependencies: 233 | reusify "^1.0.4" 234 | 235 | fill-range@^7.0.1: 236 | version "7.0.1" 237 | dependencies: 238 | to-regex-range "^5.0.1" 239 | 240 | fs-extra@^10.1.0: 241 | version "10.1.0" 242 | resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz" 243 | integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== 244 | dependencies: 245 | graceful-fs "^4.2.0" 246 | jsonfile "^6.0.1" 247 | universalify "^2.0.0" 248 | 249 | fs-extra@^9.0.0, fs-extra@^9.1.0: 250 | version "9.1.0" 251 | resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz" 252 | integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== 253 | dependencies: 254 | at-least-node "^1.0.0" 255 | graceful-fs "^4.2.0" 256 | jsonfile "^6.0.1" 257 | universalify "^2.0.0" 258 | 259 | fs.realpath@^1.0.0: 260 | version "1.0.0" 261 | resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" 262 | integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== 263 | 264 | function-bind@^1.1.1: 265 | version "1.1.1" 266 | 267 | get-stream@^6.0.0: 268 | version "6.0.1" 269 | resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" 270 | integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== 271 | 272 | glob-parent@^5.1.2: 273 | version "5.1.2" 274 | resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" 275 | integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== 276 | dependencies: 277 | is-glob "^4.0.1" 278 | 279 | glob@^7.0.0, glob@^7.1.6: 280 | version "7.2.3" 281 | resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" 282 | integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== 283 | dependencies: 284 | fs.realpath "^1.0.0" 285 | inflight "^1.0.4" 286 | inherits "2" 287 | minimatch "^3.1.1" 288 | once "^1.3.0" 289 | path-is-absolute "^1.0.0" 290 | 291 | graceful-fs@^4.1.6, graceful-fs@^4.2.0: 292 | version "4.2.10" 293 | 294 | has@^1.0.3: 295 | version "1.0.3" 296 | dependencies: 297 | function-bind "^1.1.1" 298 | 299 | human-signals@^2.1.0: 300 | version "2.1.0" 301 | resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" 302 | integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== 303 | 304 | inflight@^1.0.4: 305 | version "1.0.6" 306 | resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" 307 | integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== 308 | dependencies: 309 | once "^1.3.0" 310 | wrappy "1" 311 | 312 | inherits@2: 313 | version "2.0.4" 314 | resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" 315 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 316 | 317 | "instabug-cordova@file:..": 318 | version "12.1.0" 319 | resolved "file:.." 320 | 321 | interpret@^1.0.0: 322 | version "1.4.0" 323 | resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz" 324 | integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== 325 | 326 | ios-sim@^8.0.2: 327 | version "8.0.2" 328 | resolved "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz" 329 | integrity sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA== 330 | dependencies: 331 | bplist-parser "^0.0.6" 332 | nopt "1.0.9" 333 | plist "^3.0.1" 334 | simctl "^2" 335 | 336 | is-core-module@^2.9.0: 337 | version "2.11.0" 338 | dependencies: 339 | has "^1.0.3" 340 | 341 | is-extglob@^2.1.1: 342 | version "2.1.1" 343 | resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" 344 | integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== 345 | 346 | is-glob@^4.0.1: 347 | version "4.0.3" 348 | resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" 349 | integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== 350 | dependencies: 351 | is-extglob "^2.1.1" 352 | 353 | is-number@^7.0.0: 354 | version "7.0.0" 355 | resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" 356 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== 357 | 358 | is-path-inside@^3.0.3: 359 | version "3.0.3" 360 | resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" 361 | integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== 362 | 363 | is-stream@^2.0.0: 364 | version "2.0.1" 365 | resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" 366 | integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== 367 | 368 | isexe@^2.0.0: 369 | version "2.0.0" 370 | resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" 371 | integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== 372 | 373 | jsonfile@^6.0.1: 374 | version "6.1.0" 375 | resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" 376 | integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== 377 | dependencies: 378 | universalify "^2.0.0" 379 | optionalDependencies: 380 | graceful-fs "^4.1.6" 381 | 382 | lodash@^4.17.15: 383 | version "4.17.21" 384 | resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" 385 | integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== 386 | 387 | lru-cache@^6.0.0: 388 | version "6.0.0" 389 | dependencies: 390 | yallist "^4.0.0" 391 | 392 | merge-stream@^2.0.0: 393 | version "2.0.0" 394 | resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" 395 | integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== 396 | 397 | merge2@^1.3.0: 398 | version "1.4.1" 399 | resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" 400 | integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== 401 | 402 | micromatch@^4.0.4: 403 | version "4.0.5" 404 | dependencies: 405 | braces "^3.0.2" 406 | picomatch "^2.3.1" 407 | 408 | mimic-fn@^2.1.0: 409 | version "2.1.0" 410 | resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" 411 | integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== 412 | 413 | minimatch@^3.1.1: 414 | version "3.1.2" 415 | resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" 416 | integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== 417 | dependencies: 418 | brace-expansion "^1.1.7" 419 | 420 | nopt@^5.0.0: 421 | version "5.0.0" 422 | resolved "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz" 423 | integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== 424 | dependencies: 425 | abbrev "1" 426 | 427 | nopt@1.0.9: 428 | version "1.0.9" 429 | resolved "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz" 430 | integrity sha512-CmUZ3rzN0/4kRHum5pGRiGkhmBMzgtEDxrZVHqRJDSv8qK6s+wzaig/xeyB22Due5aZQeTiEZg/nrmMH2tapDQ== 431 | dependencies: 432 | abbrev "1" 433 | 434 | npm-run-path@^4.0.1: 435 | version "4.0.1" 436 | resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" 437 | integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== 438 | dependencies: 439 | path-key "^3.0.0" 440 | 441 | objectorarray@^1.0.4: 442 | version "1.0.5" 443 | resolved "https://registry.npmjs.org/objectorarray/-/objectorarray-1.0.5.tgz" 444 | integrity sha512-eJJDYkhJFFbBBAxeh8xW+weHlkI28n2ZdQV/J/DNfWfSKlGEf2xcfAbZTv3riEXHAhL9SVOTs2pRmXiSTf78xg== 445 | 446 | once@^1.3.0: 447 | version "1.4.0" 448 | resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" 449 | integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== 450 | dependencies: 451 | wrappy "1" 452 | 453 | onetime@^5.1.2: 454 | version "5.1.2" 455 | resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" 456 | integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== 457 | dependencies: 458 | mimic-fn "^2.1.0" 459 | 460 | p-finally@^1.0.0: 461 | version "1.0.0" 462 | resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" 463 | integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== 464 | 465 | p-try@^2.1.0: 466 | version "2.2.0" 467 | resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" 468 | integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== 469 | 470 | path-is-absolute@^1.0.0: 471 | version "1.0.1" 472 | resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" 473 | integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== 474 | 475 | path-key@^3.0.0, path-key@^3.1.0: 476 | version "3.1.1" 477 | resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" 478 | integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== 479 | 480 | path-parse@^1.0.7: 481 | version "1.0.7" 482 | resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" 483 | integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== 484 | 485 | picomatch@^2.3.1: 486 | version "2.3.1" 487 | resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" 488 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== 489 | 490 | pify@^4.0.1: 491 | version "4.0.1" 492 | resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" 493 | integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== 494 | 495 | plist@^3.0.1, plist@^3.0.5: 496 | version "3.0.6" 497 | dependencies: 498 | base64-js "^1.5.1" 499 | xmlbuilder "^15.1.1" 500 | 501 | properties-parser@^0.3.1: 502 | version "0.3.1" 503 | resolved "https://registry.npmjs.org/properties-parser/-/properties-parser-0.3.1.tgz" 504 | integrity sha512-AkSQxQAviJ89x4FIxOyHGfO3uund0gvYo7lfD0E+Gp7gFQKrTNgtoYQklu8EhrfHVZUzTwKGZx2r/KDSfnljcA== 505 | dependencies: 506 | string.prototype.codepointat "^0.2.0" 507 | 508 | q@^1.5.1: 509 | version "1.5.1" 510 | resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz" 511 | integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== 512 | 513 | queue-microtask@^1.2.2: 514 | version "1.2.3" 515 | resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" 516 | integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== 517 | 518 | read-chunk@^3.2.0: 519 | version "3.2.0" 520 | resolved "https://registry.npmjs.org/read-chunk/-/read-chunk-3.2.0.tgz" 521 | integrity sha512-CEjy9LCzhmD7nUpJ1oVOE6s/hBkejlcJEgLQHVnQznOSilOPb+kpKktlLfFDK3/WP43+F80xkUTM2VOkYoSYvQ== 522 | dependencies: 523 | pify "^4.0.1" 524 | with-open-file "^0.1.6" 525 | 526 | rechoir@^0.6.2: 527 | version "0.6.2" 528 | resolved "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz" 529 | integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== 530 | dependencies: 531 | resolve "^1.1.6" 532 | 533 | resolve@^1.1.6: 534 | version "1.22.1" 535 | dependencies: 536 | is-core-module "^2.9.0" 537 | path-parse "^1.0.7" 538 | supports-preserve-symlinks-flag "^1.0.0" 539 | 540 | reusify@^1.0.4: 541 | version "1.0.4" 542 | resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" 543 | integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== 544 | 545 | run-parallel@^1.1.9: 546 | version "1.2.0" 547 | resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" 548 | integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== 549 | dependencies: 550 | queue-microtask "^1.2.2" 551 | 552 | sax@1.1.4: 553 | version "1.1.4" 554 | resolved "https://registry.npmjs.org/sax/-/sax-1.1.4.tgz" 555 | integrity sha512-5f3k2PbGGp+YtKJjOItpg3P99IMD84E4HOvcfleTb5joCHNXYLsR9yWFPOYGgaeMPDubQILTCMdsFb2OMeOjtg== 556 | 557 | semver@^5.7.1: 558 | version "5.7.1" 559 | 560 | semver@^7.3.4, semver@^7.3.7: 561 | version "7.3.8" 562 | dependencies: 563 | lru-cache "^6.0.0" 564 | 565 | shebang-command@^2.0.0: 566 | version "2.0.0" 567 | resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" 568 | integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== 569 | dependencies: 570 | shebang-regex "^3.0.0" 571 | 572 | shebang-regex@^3.0.0: 573 | version "3.0.0" 574 | resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" 575 | integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== 576 | 577 | shelljs@^0.8.5: 578 | version "0.8.5" 579 | resolved "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz" 580 | integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== 581 | dependencies: 582 | glob "^7.0.0" 583 | interpret "^1.0.0" 584 | rechoir "^0.6.2" 585 | 586 | signal-exit@^3.0.3: 587 | version "3.0.7" 588 | resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" 589 | integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== 590 | 591 | simctl@^2: 592 | version "2.0.3" 593 | resolved "https://registry.npmjs.org/simctl/-/simctl-2.0.3.tgz" 594 | integrity sha512-kKCak0yszxHae5eVWcmrjV3ouUGac3sjlhjdLWpyPu4eiQcWoHsCrqS34kkgzHN8Ystqkh/LFjzrldk/g3BYJg== 595 | dependencies: 596 | shelljs "^0.8.5" 597 | tail "^0.4.0" 598 | 599 | simple-plist@^1.1.0: 600 | version "1.3.1" 601 | resolved "https://registry.npmjs.org/simple-plist/-/simple-plist-1.3.1.tgz" 602 | integrity sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw== 603 | dependencies: 604 | bplist-creator "0.1.0" 605 | bplist-parser "0.3.1" 606 | plist "^3.0.5" 607 | 608 | stream-buffers@2.2.x: 609 | version "2.2.0" 610 | resolved "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz" 611 | integrity sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg== 612 | 613 | string.prototype.codepointat@^0.2.0: 614 | version "0.2.1" 615 | resolved "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz" 616 | integrity sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg== 617 | 618 | strip-bom@^4.0.0: 619 | version "4.0.0" 620 | resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" 621 | integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== 622 | 623 | strip-final-newline@^2.0.0: 624 | version "2.0.0" 625 | resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" 626 | integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== 627 | 628 | supports-preserve-symlinks-flag@^1.0.0: 629 | version "1.0.0" 630 | resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" 631 | integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== 632 | 633 | tail@^0.4.0: 634 | version "0.4.0" 635 | resolved "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz" 636 | integrity sha512-i5rOhX0PwkFSbjID14mmuoqrLUIqpJeBwg0esugSbb+6Y+dzgN/O3YZXzzPL7dnQJGbQLs8cwM8Zsak5kFJGcA== 637 | 638 | "tests-example@file:tests": 639 | version "1.0.0" 640 | resolved "file:tests" 641 | 642 | to-regex-range@^5.0.1: 643 | version "5.0.1" 644 | resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" 645 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== 646 | dependencies: 647 | is-number "^7.0.0" 648 | 649 | underscore@^1.9.2: 650 | version "1.13.6" 651 | 652 | universalify@^2.0.0: 653 | version "2.0.0" 654 | 655 | unorm@^1.6.0: 656 | version "1.6.0" 657 | resolved "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz" 658 | integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== 659 | 660 | untildify@^4.0.0: 661 | version "4.0.0" 662 | resolved "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz" 663 | integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== 664 | 665 | uuid@^7.0.3: 666 | version "7.0.3" 667 | resolved "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz" 668 | integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== 669 | 670 | which@^2.0.1, which@^2.0.2: 671 | version "2.0.2" 672 | resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" 673 | integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== 674 | dependencies: 675 | isexe "^2.0.0" 676 | 677 | with-open-file@^0.1.6: 678 | version "0.1.7" 679 | resolved "https://registry.npmjs.org/with-open-file/-/with-open-file-0.1.7.tgz" 680 | integrity sha512-ecJS2/oHtESJ1t3ZfMI3B7KIDKyfN0O16miWxdn30zdh66Yd3LsRFebXZXq6GU4xfxLf6nVxp9kIqElb5fqczA== 681 | dependencies: 682 | p-finally "^1.0.0" 683 | p-try "^2.1.0" 684 | pify "^4.0.1" 685 | 686 | wrappy@1: 687 | version "1.0.2" 688 | resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" 689 | integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== 690 | 691 | xcode@^3.0.1: 692 | version "3.0.1" 693 | resolved "https://registry.npmjs.org/xcode/-/xcode-3.0.1.tgz" 694 | integrity sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA== 695 | dependencies: 696 | simple-plist "^1.1.0" 697 | uuid "^7.0.3" 698 | 699 | xml-escape@^1.1.0: 700 | version "1.1.0" 701 | resolved "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz" 702 | integrity sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg== 703 | 704 | xmlbuilder@^15.1.1: 705 | version "15.1.1" 706 | resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz" 707 | integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg== 708 | 709 | yallist@^4.0.0: 710 | version "4.0.0" 711 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "instabug-cordova", 3 | "description": "Cordova plugin for integrating the Instabug SDK.", 4 | "version": "12.1.0", 5 | "author": "Instabug (https://instabug.com)", 6 | "repository": "github:Instabug/Instabug-Cordova", 7 | "homepage": "https://www.instabug.com/platforms/cordova", 8 | "bugs": "https://github.com/Instabug/Instabug-Cordova/issues", 9 | "license": "Apache 2.0 License", 10 | "main": "www/index.js", 11 | "types": "www/index.d.ts", 12 | "keywords": [ 13 | "ecosystem:cordova", 14 | "cordova", 15 | "cordova-android", 16 | "cordova-ios", 17 | "instabug", 18 | "debugging", 19 | "errors", 20 | "exceptions", 21 | "logging" 22 | ], 23 | "scripts": { 24 | "build": "tsc", 25 | "prepack": "yarn build" 26 | }, 27 | "devDependencies": { 28 | "@types/cordova": "^0.0.34", 29 | "typescript": "^4.8.2" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | instabug-cordova 9 | Cordova plugin for integrating the Instabug SDK. 10 | Instabug 11 | https://github.com/Instabug/Instabug-Cordova 12 | https://github.com/Instabug/Instabug-Cordova/issues 13 | Apache 2.0 License 14 | ecosystem:cordova,cordova,cordova-android,cordova-ios,instabug,debugging,errors,exceptions,logging 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /src/android/util/ArgsRegistry.java: -------------------------------------------------------------------------------- 1 | package com.instabug.cordova.plugin.util; 2 | 3 | import androidx.annotation.NonNull; 4 | 5 | import com.instabug.library.InstabugColorTheme; 6 | import com.instabug.library.InstabugCustomTextPlaceHolder.Key; 7 | import com.instabug.library.invocation.util.InstabugFloatingButtonEdge; 8 | import com.instabug.library.invocation.util.InstabugVideoRecordingButtonPosition; 9 | import com.instabug.library.ui.onboarding.WelcomeMessage; 10 | import com.instabug.library.internal.module.InstabugLocale; 11 | import com.instabug.library.ReproMode; 12 | 13 | import java.util.ArrayList; 14 | import java.util.HashMap; 15 | 16 | public class ArgsRegistry { 17 | 18 | public static class ArgsMap extends HashMap { 19 | @NonNull 20 | @Override 21 | public T getOrDefault(Object key, T defaultValue) { 22 | final T value = get(key); 23 | return value != null ? value : defaultValue; 24 | } 25 | 26 | public ArrayList getAll(ArrayList keys) { 27 | final ArrayList values = new ArrayList<>(); 28 | for (String key : keys) { 29 | values.add(get(key)); 30 | } 31 | return values; 32 | } 33 | } 34 | 35 | public static ArgsMap recordButtonPositions = new ArgsMap() {{ 36 | put("topLeft", InstabugVideoRecordingButtonPosition.TOP_LEFT); 37 | put("topRight", InstabugVideoRecordingButtonPosition.TOP_RIGHT); 38 | put("bottomLeft", InstabugVideoRecordingButtonPosition.BOTTOM_LEFT); 39 | put("bottomRight", InstabugVideoRecordingButtonPosition.BOTTOM_RIGHT); 40 | }}; 41 | 42 | public static ArgsMap welcomeMessageModes = new ArgsMap() {{ 43 | put("welcomeMessageModeLive", WelcomeMessage.State.LIVE); 44 | put("welcomeMessageModeBeta", WelcomeMessage.State.BETA); 45 | put("welcomeMessageModeDisabled", WelcomeMessage.State.DISABLED); 46 | }}; 47 | 48 | public static final ArgsMap colorThemes = new ArgsMap() {{ 49 | put("light", InstabugColorTheme.InstabugColorThemeLight); 50 | put("dark", InstabugColorTheme.InstabugColorThemeDark); 51 | }}; 52 | 53 | public static final ArgsMap floatingButtonEdges = new ArgsMap() {{ 54 | put("left", InstabugFloatingButtonEdge.LEFT); 55 | put("right", InstabugFloatingButtonEdge.RIGHT); 56 | }}; 57 | 58 | public static final ArgsMap placeholders = new ArgsMap() {{ 59 | put("shakeHint", Key.SHAKE_HINT); 60 | put("swipeHint", Key.SWIPE_HINT); 61 | put("invalidEmailMessage", Key.INVALID_EMAIL_MESSAGE); 62 | put("invalidCommentMessage", Key.INVALID_COMMENT_MESSAGE); 63 | put("emailFieldHint", Key.EMAIL_FIELD_HINT); 64 | put("commentFieldHintForBugReport", Key.COMMENT_FIELD_HINT_FOR_BUG_REPORT); 65 | put("commentFieldHintForFeedback", Key.COMMENT_FIELD_HINT_FOR_FEEDBACK); 66 | put("commentFieldHintForQuestion", Key.COMMENT_FIELD_HINT_FOR_QUESTION); 67 | put("invocationHeader", Key.INVOCATION_HEADER); 68 | put("reportQuestion", Key.REPORT_QUESTION); 69 | put("reportBug", Key.REPORT_BUG); 70 | put("reportFeedback", Key.REPORT_FEEDBACK); 71 | put("conversationsHeaderTitle", Key.CONVERSATIONS_LIST_TITLE); 72 | put("okButtonTitle", Key.BUG_ATTACHMENT_DIALOG_OK_BUTTON); 73 | put("addVoiceMessage", Key.ADD_VOICE_MESSAGE); 74 | put("addImageFromGallery", Key.ADD_IMAGE_FROM_GALLERY); 75 | put("addExtraScreenshot", Key.ADD_EXTRA_SCREENSHOT); 76 | put("addVideoMessage", Key.ADD_VIDEO); 77 | put("audioRecordingPermissionDeniedMessage", Key.AUDIO_RECORDING_PERMISSION_DENIED); 78 | put("recordingMessageToHoldText", Key.VOICE_MESSAGE_PRESS_AND_HOLD_TO_RECORD); 79 | put("recordingMessageToReleaseText", Key.VOICE_MESSAGE_RELEASE_TO_ATTACH); 80 | put("thankYouText", Key.SUCCESS_DIALOG_HEADER); 81 | put("audio", Key.CHATS_TYPE_AUDIO); 82 | put("image", Key.CHATS_TYPE_IMAGE); 83 | put("screenRecording", Key.CHATS_TYPE_VIDEO); 84 | put("messagesNotificationAndOthers", Key.CHATS_MULTIPLE_MESSAGE_NOTIFICATION); 85 | put("videoPressRecord", Key.VIDEO_RECORDING_FAB_BUBBLE_HINT); 86 | put("conversationTextFieldHint", Key.CONVERSATION_TEXT_FIELD_HINT); 87 | put("thankYouAlertText", Key.REPORT_SUCCESSFULLY_SENT); 88 | 89 | put("welcomeMessageBetaWelcomeStepTitle", Key.BETA_WELCOME_MESSAGE_WELCOME_STEP_TITLE); 90 | put("welcomeMessageBetaWelcomeStepContent", Key.BETA_WELCOME_MESSAGE_WELCOME_STEP_CONTENT); 91 | put("welcomeMessageBetaHowToReportStepTitle", Key.BETA_WELCOME_MESSAGE_HOW_TO_REPORT_STEP_TITLE); 92 | put("welcomeMessageBetaHowToReportStepContent", Key.BETA_WELCOME_MESSAGE_HOW_TO_REPORT_STEP_CONTENT); 93 | put("welcomeMessageBetaFinishStepTitle", Key.BETA_WELCOME_MESSAGE_FINISH_STEP_TITLE); 94 | put("welcomeMessageBetaFinishStepContent", Key.BETA_WELCOME_MESSAGE_FINISH_STEP_CONTENT); 95 | put("welcomeMessageLiveWelcomeStepTitle", Key.LIVE_WELCOME_MESSAGE_TITLE); 96 | put("welcomeMessageLiveWelcomeStepContent", Key.LIVE_WELCOME_MESSAGE_CONTENT); 97 | 98 | put("surveysStoreRatingThanksTitle", Key.SURVEYS_STORE_RATING_THANKS_SUBTITLE); 99 | put("surveysStoreRatingThanksSubtitle", Key.SURVEYS_STORE_RATING_THANKS_SUBTITLE); 100 | 101 | put("reportBugDescription", Key.REPORT_BUG_DESCRIPTION); 102 | put("reportFeedbackDescription", Key.REPORT_FEEDBACK_DESCRIPTION); 103 | put("reportQuestionDescription", Key.REPORT_QUESTION_DESCRIPTION); 104 | put("requestFeatureDescription", Key.REQUEST_FEATURE_DESCRIPTION); 105 | 106 | put("discardAlertTitle", Key.REPORT_DISCARD_DIALOG_TITLE); 107 | put("discardAlertMessage", Key.REPORT_DISCARD_DIALOG_BODY); 108 | put("discardAlertCancel", Key.REPORT_DISCARD_DIALOG_NEGATIVE_ACTION); 109 | put("discardAlertAction", Key.REPORT_DISCARD_DIALOG_POSITIVE_ACTION); 110 | put("addAttachmentButtonTitleStringName", Key.REPORT_ADD_ATTACHMENT_HEADER); 111 | 112 | put("reportReproStepsDisclaimerBody", Key.REPORT_REPRO_STEPS_DISCLAIMER_BODY); 113 | put("reportReproStepsDisclaimerLink", Key.REPORT_REPRO_STEPS_DISCLAIMER_LINK); 114 | put("reproStepsProgressDialogBody", Key.REPRO_STEPS_PROGRESS_DIALOG_BODY); 115 | put("reproStepsListHeader", Key.REPRO_STEPS_LIST_HEADER); 116 | put("reproStepsListDescription", Key.REPRO_STEPS_LIST_DESCRIPTION); 117 | put("reproStepsListEmptyStateDescription", Key.REPRO_STEPS_LIST_EMPTY_STATE_DESCRIPTION); 118 | put("reproStepsListItemTitle", Key.REPRO_STEPS_LIST_ITEM_NUMBERING_TITLE); 119 | 120 | put("insufficientContentMessage", Key.COMMENT_FIELD_INSUFFICIENT_CONTENT); 121 | }}; 122 | 123 | public static final ArgsMap reproModes = new ArgsMap() {{ 124 | put("reproStepsEnabledWithNoScreenshots", ReproMode.EnableWithNoScreenshots); 125 | put("reproStepsEnabled", ReproMode.EnableWithScreenshots); 126 | put("reproStepsDisabled", ReproMode.Disable); 127 | }}; 128 | 129 | public static final ArgsMap locales = new ArgsMap() {{ 130 | put("arabic", InstabugLocale.ARABIC); 131 | put("azerbaijani", InstabugLocale.AZERBAIJANI); 132 | put("chineseSimplified", InstabugLocale.SIMPLIFIED_CHINESE); 133 | put("chineseTraditional", InstabugLocale.TRADITIONAL_CHINESE); 134 | put("czech", InstabugLocale.CZECH); 135 | put("danish", InstabugLocale.DANISH); 136 | put("dutch", InstabugLocale.NETHERLANDS); 137 | put("english", InstabugLocale.ENGLISH); 138 | put("finnish", InstabugLocale.FINNISH); 139 | put("french", InstabugLocale.FRENCH); 140 | put("german", InstabugLocale.GERMAN); 141 | put("hungarian", InstabugLocale.HUNGARIAN); 142 | put("indonesian", InstabugLocale.INDONESIAN); 143 | put("italian", InstabugLocale.ITALIAN); 144 | put("japanese", InstabugLocale.JAPANESE); 145 | put("korean", InstabugLocale.KOREAN); 146 | put("norwegian", InstabugLocale.NORWEGIAN); 147 | put("polish", InstabugLocale.POLISH); 148 | put("portugueseBrazil", InstabugLocale.PORTUGUESE_BRAZIL); 149 | put("portuguesePortugal", InstabugLocale.PORTUGUESE_PORTUGAL); 150 | put("romanian", InstabugLocale.ROMANIAN); 151 | put("russian", InstabugLocale.RUSSIAN); 152 | put("slovak", InstabugLocale.SLOVAK); 153 | put("spanish", InstabugLocale.SPANISH); 154 | put("swedish", InstabugLocale.SWEDISH); 155 | put("turkish", InstabugLocale.TURKISH); 156 | }}; 157 | } -------------------------------------------------------------------------------- /src/android/util/Util.java: -------------------------------------------------------------------------------- 1 | package com.instabug.cordova.plugin.util; 2 | 3 | 4 | import com.instabug.bug.BugReporting; 5 | 6 | import java.lang.reflect.Method; 7 | 8 | public class Util { 9 | 10 | public static int[] parseReportTypes(String[] stringTypeArray) throws Exception{ 11 | int [] parsedArray = new int[stringTypeArray.length]; 12 | for (int i = 0; i < stringTypeArray.length; i++) { 13 | String type = stringTypeArray[i]; 14 | if (type.equals("bug")) { 15 | parsedArray[i] = (int) BugReporting.ReportType.BUG; 16 | } else if (type.equals("feedback")) { 17 | parsedArray[i] = BugReporting.ReportType.FEEDBACK; 18 | } else { 19 | throw new Exception("Invalid report type " + type); 20 | } 21 | } 22 | 23 | return parsedArray; 24 | } 25 | 26 | public static Method getMethod(Class clazz, String methodName, Class... parameterType) { 27 | final Method[] methods = clazz.getDeclaredMethods(); 28 | 29 | for (Method method : methods) { 30 | if (method.getName().equals(methodName) && method.getParameterTypes().length == 31 | parameterType.length) { 32 | for (int i = 0; i < 2; i++) { 33 | if (method.getParameterTypes()[i] == parameterType[i]) { 34 | if (i == method.getParameterTypes().length - 1) { 35 | method.setAccessible(true); 36 | return method; 37 | } 38 | } else { 39 | break; 40 | } 41 | } 42 | } 43 | } 44 | return null; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/ios/IBGPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ArgsRegistry.h" 3 | 4 | @interface IBGPlugin : CDVPlugin 5 | 6 | - (void)start:(CDVInvokedUrlCommand *)command; 7 | 8 | - (void)setPrimaryColor:(CDVInvokedUrlCommand *)command; 9 | 10 | - (void)setUserData:(CDVInvokedUrlCommand *)command; 11 | 12 | - (void)addFile:(CDVInvokedUrlCommand *)command; 13 | 14 | - (void)addLog:(CDVInvokedUrlCommand *)command; 15 | 16 | - (void)changeInvocationEvent:(CDVInvokedUrlCommand *)command; 17 | 18 | - (void)setLocale:(CDVInvokedUrlCommand *)command; 19 | 20 | - (void)setReportTypes:(CDVInvokedUrlCommand *)command; 21 | 22 | - (void)show:(CDVInvokedUrlCommand *)command; 23 | 24 | - (void)showBugReportingWithReportTypeAndOptions:(CDVInvokedUrlCommand *)command; 25 | 26 | - (void)setBugReportingEnabled:(CDVInvokedUrlCommand *)command; 27 | 28 | - (void)setRepliesEnabled:(CDVInvokedUrlCommand *)command; 29 | 30 | - (void)hasChats:(CDVInvokedUrlCommand *)command; 31 | 32 | - (void)showReplies:(CDVInvokedUrlCommand *)command; 33 | 34 | - (void)identifyUserWithEmail:(CDVInvokedUrlCommand *)command; 35 | 36 | - (void)setUserAttribute:(CDVInvokedUrlCommand *)command; 37 | 38 | - (void)removeUserAttribute:(CDVInvokedUrlCommand *)command; 39 | 40 | - (void)getUserAttribute:(CDVInvokedUrlCommand *)command; 41 | 42 | - (void)getAllUserAttributes:(CDVInvokedUrlCommand *)command; 43 | 44 | - (void)setString:(CDVInvokedUrlCommand *)command; 45 | 46 | - (void)init:(CDVInvokedUrlCommand *)command; 47 | 48 | - (IBGSDKDebugLogsLevel)parseLogLevel:(NSString*)logLevel; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /src/ios/IBGPlugin.m: -------------------------------------------------------------------------------- 1 | #import "IBGPlugin.h" 2 | #import 3 | #import 4 | #import 5 | #import 6 | #import 7 | 8 | /** 9 | * This plugin initializes Instabug. 10 | */ 11 | @implementation IBGPlugin 12 | 13 | /** 14 | * Intializes Instabug. 15 | * 16 | * @param {CDVInvokedUrlCommand*} command 17 | * The command sent from JavaScript 18 | * 19 | * @deprecated This method is deprecated. Use `init:` instead. 20 | */ 21 | - (void) start:(CDVInvokedUrlCommand*)command __deprecated_msg("This method is deprecated. Use `init:` instead.") 22 | { 23 | NSLog(@"Warning: The `start:` method is deprecated and will be removed in a future version. Please use `init:` instead."); 24 | 25 | CDVPluginResult* result; 26 | 27 | NSString* token = [command argumentAtIndex:0]; 28 | NSArray* invEvents = [command argumentAtIndex:1]; 29 | 30 | IBGInvocationEvent invocationEvents = 0; 31 | 32 | for (NSString *invEvent in invEvents) { 33 | IBGInvocationEvent invocationEvent = [self parseInvocationEvent:invEvent]; 34 | invocationEvents |= invocationEvent; 35 | } 36 | 37 | if (invocationEvents == 0) { 38 | // Instabug iOS SDK requires invocation event for initialization 39 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 40 | messageAsString:@"An invocation event must be provided."]; 41 | } else { 42 | // Initialize Instabug 43 | [Instabug startWithToken:token invocationEvents:invocationEvents]; 44 | [self setBaseUrlForDeprecationLogs]; 45 | 46 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 47 | } 48 | 49 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 50 | } 51 | 52 | - (void)init:(CDVInvokedUrlCommand*)command { 53 | if (command.arguments == nil || [command.arguments count] == 0) { 54 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Initialization parameters are required."]; 55 | [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; 56 | return; 57 | } 58 | 59 | @try { 60 | NSDictionary* options = [command.arguments objectAtIndex:0]; 61 | 62 | NSString* token = options[@"token"]; 63 | NSArray* invocationEventsArray = options[@"invocationEvents"]; 64 | NSString* logLevel = options[@"debugLogsLevel"] ?: @"none"; 65 | 66 | if (token == nil || [token isEqualToString:@""]) { 67 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Token is required."]; 68 | [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; 69 | return; 70 | } 71 | 72 | IBGInvocationEvent invocationEvents = 0; 73 | for (NSString* eventName in invocationEventsArray) { 74 | invocationEvents |= [self parseInvocationEvent:eventName]; 75 | } 76 | 77 | IBGSDKDebugLogsLevel parsedLogLevel = [self parseLogLevel:logLevel]; 78 | 79 | [Instabug setSdkDebugLogsLevel:parsedLogLevel]; 80 | [Instabug startWithToken:token invocationEvents:invocationEvents]; 81 | 82 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 83 | [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; 84 | } @catch (NSException *exception) { 85 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[NSString stringWithFormat:@"Error initializing Instabug: %@", exception.reason]]; 86 | [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; 87 | } 88 | } 89 | 90 | - (void) identifyUserWithEmail:(CDVInvokedUrlCommand*)command { 91 | NSString *email = [command argumentAtIndex:0]; 92 | NSString *name = [command argumentAtIndex:1]; 93 | [Instabug identifyUserWithEmail:email name:name]; 94 | [self sendSuccessResult:command]; 95 | } 96 | 97 | /** 98 | * Sets whether users are required to enter an email address or not when doing a certain action `IBGAction`. 99 | * 100 | * @param {CDVInvokedUrlCommand*} command 101 | * The command sent from JavaScript 102 | */ 103 | - (void) setEmailFieldRequiredForFeatureRequests:(CDVInvokedUrlCommand*)command 104 | { 105 | CDVPluginResult* result; 106 | 107 | BOOL isEnabled = [command argumentAtIndex:0]; 108 | NSArray* aTypes = [command argumentAtIndex:1]; 109 | 110 | IBGAction actionTypes = 0; 111 | 112 | for (NSString *aType in aTypes) { 113 | IBGAction actionType = [self parseActionType:aType]; 114 | actionTypes |= actionType; 115 | } 116 | 117 | if (isEnabled && actionTypes != 0) { 118 | [IBGFeatureRequests setEmailFieldRequired:[[command argumentAtIndex:0] boolValue] forAction:actionTypes]; 119 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 120 | } else { 121 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 122 | messageAsString:@"A valid action type must be provided."]; 123 | } 124 | 125 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 126 | } 127 | 128 | /** 129 | * Sets the primary color of the SDK user interface, mostly 130 | * indicating interactivity or call to action. 131 | * 132 | * @param {CDVInvokedUrlCommand*} command 133 | * The command sent from JavaScript 134 | */ 135 | - (void) setPrimaryColor:(CDVInvokedUrlCommand*)command 136 | { 137 | CDVPluginResult* result; 138 | 139 | NSMutableString* color = [command argumentAtIndex:0]; 140 | 141 | if ([color length] > 0) { 142 | BOOL valid = NO; 143 | 144 | if ([color length] == 6) { 145 | valid = YES; 146 | } else if ([color length] == 7 && [color rangeOfString:@"#"].location == 0) { 147 | valid = YES; 148 | // '#' char must be removed before parsing 149 | color = [NSMutableString stringWithString:[color substringFromIndex:1]]; 150 | } 151 | 152 | if (valid) { 153 | UIColor* uiColor = [self colorFromHexString:color]; 154 | Instabug.tintColor = uiColor; 155 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 156 | } else { 157 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 158 | messageAsString:[NSString stringWithFormat: 159 | @"%@ is not a valid hex color.", 160 | [command argumentAtIndex:0]]]; 161 | } 162 | } else { 163 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 164 | messageAsString:@"A hex color must be provided."]; 165 | } 166 | 167 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 168 | } 169 | 170 | /** 171 | * Logs a user event that happens through the lifecycle of the application. 172 | * 173 | * @param {CDVInvokedUrlCommand*} command 174 | * The command sent from JavaScript 175 | */ 176 | - (void) logUserEventWithName:(CDVInvokedUrlCommand*)command 177 | { 178 | CDVPluginResult* result; 179 | 180 | NSString* userEvent = [command argumentAtIndex:0]; 181 | 182 | if ([userEvent length] > 0) { 183 | [Instabug logUserEventWithName:userEvent]; 184 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 185 | } else { 186 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 187 | messageAsString:@"A name must be provided."]; 188 | } 189 | 190 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 191 | } 192 | 193 | /** 194 | * Sets a block of code to be executed just before the SDK's UI is presented. 195 | * 196 | * @param {CDVInvokedUrlCommand*} command 197 | * The command sent from JavaScript 198 | */ 199 | - (void) setPreInvocationHandler:(CDVInvokedUrlCommand*)command 200 | { 201 | IBGBugReporting.willInvokeHandler = ^{ 202 | CDVPluginResult* result; 203 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 204 | [result setKeepCallbackAsBool:true]; 205 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 206 | }; 207 | } 208 | 209 | /** 210 | * Sets a block of code to be executed right after the SDK's UI is dismissed. 211 | * 212 | * @param {CDVInvokedUrlCommand*} command 213 | * The command sent from JavaScript 214 | */ 215 | - (void) setPostInvocationHandler:(CDVInvokedUrlCommand*)command 216 | { 217 | IBGBugReporting.didDismissHandler = ^(IBGDismissType dismissType, IBGReportType reportType){ 218 | CDVPluginResult* result; 219 | NSString *dismissTypeString = [self parseDismissType:dismissType]; 220 | NSString *reportTypeString = [self parseReportType:reportType]; 221 | NSDictionary *dict = @{ @"dismissType" : dismissTypeString, @"reportType" : reportTypeString}; 222 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 223 | messageAsDictionary:dict]; 224 | [result setKeepCallbackAsBool:true]; 225 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 226 | }; 227 | } 228 | 229 | /** 230 | * Sets a block of code to be executed right after the SDK's UI is dismissed. 231 | * 232 | * @param {CDVInvokedUrlCommand*} command 233 | * The command sent from JavaScript 234 | */ 235 | - (void) setPreSendingHandler:(CDVInvokedUrlCommand*)command 236 | { 237 | Instabug.willSendReportHandler = ^(IBGReport* report){ 238 | CDVPluginResult* result; 239 | NSArray *tagsArray = report.tags; 240 | NSArray *instabugLogs= report.instabugLogs; 241 | NSArray *consoleLogs= report.consoleLogs; 242 | NSDictionary *userAttributes= report.userAttributes; 243 | NSArray *fileAttachments= report.fileLocations; 244 | 245 | NSDictionary *dict = @{ @"tagsArray" : tagsArray, @"instabugLogs" : instabugLogs, @"consoleLogs" : consoleLogs, @"userAttributes" : userAttributes, @"fileAttachments" : fileAttachments}; 246 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 247 | messageAsDictionary:dict]; 248 | [result setKeepCallbackAsBool:true]; 249 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 250 | return report; 251 | }; 252 | } 253 | 254 | /** 255 | * Sets a block of code to be executed just before the survey's UI is presented. 256 | * 257 | * @param {CDVInvokedUrlCommand*} command 258 | * The command sent from JavaScript 259 | */ 260 | - (void) willShowSurveyHandler:(CDVInvokedUrlCommand*)command 261 | { 262 | IBGSurveys.willShowSurveyHandler = ^ { 263 | CDVPluginResult* result; 264 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 265 | [result setKeepCallbackAsBool:true]; 266 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 267 | }; 268 | } 269 | 270 | /** 271 | * Sets a block of code to be executed right after the survey's UI is dismissed. 272 | * 273 | * @param {CDVInvokedUrlCommand*} command 274 | * The command sent from JavaScript 275 | */ 276 | - (void) didDismissSurveyHandler:(CDVInvokedUrlCommand*)command 277 | { 278 | IBGSurveys.didDismissSurveyHandler = ^ { 279 | CDVPluginResult* result; 280 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 281 | [result setKeepCallbackAsBool:true]; 282 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 283 | }; 284 | } 285 | 286 | /** 287 | * Shows survey with a specific token. 288 | * Does nothing if there are no available surveys with that specific token. 289 | * Answered and cancelled surveys won't show up again. 290 | * 291 | * @param {CDVInvokedUrlCommand*} command 292 | * The command sent from JavaScript 293 | */ 294 | - (void) showSurveyWithToken:(CDVInvokedUrlCommand*)command 295 | { 296 | CDVPluginResult* result; 297 | 298 | NSString* surveyToken = [command argumentAtIndex:0]; 299 | 300 | if ([surveyToken length] > 0) { 301 | [IBGSurveys showSurveyWithToken:surveyToken]; 302 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 303 | } else { 304 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 305 | messageAsString:@"A survey token must be provided."]; 306 | } 307 | 308 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 309 | } 310 | 311 | /** 312 | * Returns true if the survey with a specific token was answered before. 313 | * Will return false if the token does not exist or if the survey was not answered before. 314 | * 315 | * @param {CDVInvokedUrlCommand*} command 316 | * The command sent from JavaScript 317 | */ 318 | - (void) hasRespondedToSurveyWithToken:(CDVInvokedUrlCommand*)command 319 | { 320 | __block CDVPluginResult* result; 321 | NSString *surveyToken = [command argumentAtIndex:0]; 322 | 323 | if (surveyToken.length > 0) { 324 | [IBGSurveys hasRespondedToSurveyWithToken:surveyToken completionHandler:^(BOOL hasResponded) { 325 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:hasResponded]; 326 | }]; 327 | } else { 328 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 329 | messageAsString:@"A non-empty survey token must be provided."]; 330 | } 331 | 332 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 333 | } 334 | 335 | /** 336 | * Returns true if the survey with a specific token was answered before. 337 | * Will return false if the token does not exist or if the survey was not answered before. 338 | * 339 | * @param {CDVInvokedUrlCommand*} command 340 | * The command sent from JavaScript 341 | */ 342 | - (void) getAvailableSurveys:(CDVInvokedUrlCommand*)command 343 | { 344 | [IBGSurveys availableSurveysWithCompletionHandler:^(NSArray *availableSurveys) { 345 | CDVPluginResult* result; 346 | NSMutableArray* mappedSurveys = [[NSMutableArray alloc] init]; 347 | for (IBGSurvey* survey in availableSurveys) { 348 | [mappedSurveys addObject:@{@"title": survey.title }]; 349 | } 350 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 351 | messageAsArray:mappedSurveys]; 352 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 353 | }]; 354 | } 355 | 356 | /** 357 | * Sets the user data that’s attached with each bug report sent. 358 | * Maximum size of the string is 1000 characters. 359 | * 360 | * @param {CDVInvokedUrlCommand*} command 361 | * The command sent from JavaScript 362 | */ 363 | - (void) setUserData:(CDVInvokedUrlCommand*)command 364 | { 365 | CDVPluginResult* result; 366 | 367 | NSString* data = [command argumentAtIndex:0]; 368 | 369 | if ([data length] > 0) { 370 | [Instabug setUserData:data]; 371 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 372 | } else { 373 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 374 | messageAsString:@"User data must be provided."]; 375 | } 376 | 377 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 378 | } 379 | 380 | /** 381 | * Sets whether attachments in bug reporting and in-app messaging are enabled. 382 | * 383 | * @param {CDVInvokedUrlCommand*} command 384 | * The command sent from JavaScript 385 | */ 386 | - (void) setAttachmentTypesEnabled:(CDVInvokedUrlCommand*)command 387 | { 388 | CDVPluginResult* result; 389 | 390 | id screenshot = [command argumentAtIndex:0]; 391 | id extraScreenshot = [command argumentAtIndex:1]; 392 | id galleryImage = [command argumentAtIndex:2]; 393 | id screenRecording = [command argumentAtIndex:3]; 394 | IBGAttachmentType attachmentTypes = 0; 395 | if (screenshot && extraScreenshot && galleryImage && screenRecording) { 396 | if([screenshot boolValue]) { 397 | attachmentTypes = IBGAttachmentTypeScreenShot; 398 | } 399 | if([extraScreenshot boolValue]) { 400 | attachmentTypes |= IBGAttachmentTypeExtraScreenShot; 401 | } 402 | if([galleryImage boolValue]) { 403 | attachmentTypes |= IBGAttachmentTypeGalleryImage; 404 | } 405 | if([screenRecording boolValue]) { 406 | attachmentTypes |= IBGAttachmentTypeScreenRecording; 407 | } 408 | 409 | IBGBugReporting.enabledAttachmentTypes = attachmentTypes; 410 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 411 | } else { 412 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 413 | messageAsString:@"Attachment types must be provided."]; 414 | } 415 | 416 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 417 | } 418 | 419 | /** 420 | * Sets the default position at which the Instabug screen recording button will be shown. 421 | * Different orientations are already handled. 422 | * 423 | * @param {CDVInvokedUrlCommand*} command 424 | * The command sent from JavaScript 425 | */ 426 | - (void) setVideoRecordingFloatingButtonPosition:(CDVInvokedUrlCommand*)command 427 | { 428 | NSString* postion = [command argumentAtIndex:0]; 429 | IBGPosition parsePosition = (IBGPosition) [ArgsRegistry.recordButtonPositions[postion] intValue]; 430 | 431 | IBGBugReporting.videoRecordingFloatingButtonPosition = parsePosition; 432 | 433 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 434 | callbackId:[command callbackId]]; 435 | } 436 | 437 | /** 438 | * Adds a disclaimer text within the bug reporting form, which can include hyperlinked text. 439 | * @param {CDVInvokedUrlCommand*} command 440 | * The command sent from JavaScript 441 | */ 442 | - (void)setDisclaimerText:(CDVInvokedUrlCommand*)command 443 | { 444 | NSString* text = [command argumentAtIndex:0]; 445 | 446 | [IBGBugReporting setDisclaimerText:text]; 447 | 448 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 449 | callbackId:[command callbackId]]; 450 | } 451 | 452 | /** 453 | * Sets a minimum number of characters as a requirement for the comments field in the different report types. 454 | * @param {CDVInvokedUrlCommand*} command 455 | * The command sent from JavaScript 456 | */ 457 | - (void)setCommentMinimumCharacterCount:(CDVInvokedUrlCommand*)command 458 | { 459 | CDVPluginResult* result; 460 | NSNumber* limit = [command argumentAtIndex:0]; 461 | NSArray* reportTypes = [command argumentAtIndex:1]; 462 | IBGBugReportingReportType parsedTypes = 0; 463 | 464 | if (![reportTypes count]) { 465 | parsedTypes = ([self parseBugReportingReportType:@"bug"] | [self parseBugReportingReportType:@"feedback"] | [self parseBugReportingReportType:@"question"]); 466 | } 467 | else { 468 | for (NSString* type in reportTypes) { 469 | parsedTypes |= [self parseBugReportingReportType:type]; 470 | } 471 | } 472 | 473 | [IBGBugReporting setCommentMinimumCharacterCountForReportTypes:parsedTypes withLimit:limit.intValue]; 474 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 475 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 476 | 477 | } 478 | 479 | 480 | /** 481 | * Attaches a new copy of this file with each bug report sent 482 | * with a maximum size of 1 MB. Calling this method several 483 | * times overrides the file to be attached. The file has to 484 | * be stored locally at the location provided. 485 | * 486 | * @param {CDVInvokedUrlCommand*} command 487 | * The command sent from JavaScript 488 | */ 489 | - (void) addFile:(CDVInvokedUrlCommand*)command 490 | { 491 | CDVPluginResult* result; 492 | id file = [command argumentAtIndex:0]; 493 | NSString* filePath; 494 | 495 | if ([file isKindOfClass:[NSString class]]) { 496 | filePath = file; 497 | } else if ([file isKindOfClass:[NSDictionary class]]) { 498 | // File location may be different across platforms 499 | // and can be specified as such 500 | filePath = [file objectForKey:@"ios"]; 501 | } 502 | 503 | if ([filePath length] > 0) { 504 | NSError* err; 505 | NSURL* url = [NSURL URLWithString:filePath]; 506 | 507 | if ([url checkResourceIsReachableAndReturnError:&err] == YES) { 508 | // If the file doesn't exist at the path specified, 509 | // we won't be able to notify the containing app when 510 | // Instabug API call fails, so we check ourselves. 511 | [Instabug addFileAttachmentWithURL:url]; 512 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 513 | } else { 514 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 515 | messageAsString:[NSString stringWithFormat: 516 | @"File %@ does not exist.", 517 | filePath]]; 518 | } 519 | } else { 520 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 521 | messageAsString:@"A local file URI must be provided."]; 522 | } 523 | 524 | 525 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 526 | } 527 | 528 | /** 529 | * Adds custom logs that will be sent with each report. 530 | * 531 | * @param {CDVInvokedUrlCommand*} command 532 | * The command sent from JavaScript 533 | */ 534 | - (void) addLog:(CDVInvokedUrlCommand*)command 535 | { 536 | CDVPluginResult* result; 537 | NSString* log = [command argumentAtIndex:0]; 538 | 539 | if ([log length] > 0) { 540 | [IBGLog log:log]; 541 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 542 | } else { 543 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 544 | messageAsString:@"A log must be provided."]; 545 | } 546 | 547 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 548 | } 549 | 550 | /** 551 | * Sets the event that invokes the feedback form. 552 | * 553 | * @param {CDVInvokedUrlCommand*} command 554 | * The command sent from JavaScript 555 | */ 556 | - (void) changeInvocationEvent:(CDVInvokedUrlCommand*)command 557 | { 558 | CDVPluginResult* result; 559 | 560 | IBGInvocationEvent iEvent = [self parseInvocationEvent:[command argumentAtIndex:0]]; 561 | 562 | if (iEvent) { 563 | IBGBugReporting.invocationEvents = iEvent; 564 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 565 | } else { 566 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 567 | messageAsString:@"A valid event type must be provided."]; 568 | } 569 | 570 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 571 | } 572 | 573 | /** 574 | * Sets the event that invokes the feedback form. 575 | * 576 | * @param {CDVInvokedUrlCommand*} command 577 | * The command sent from JavaScript 578 | */ 579 | - (void) setInvocationEvents:(CDVInvokedUrlCommand*)command 580 | { 581 | CDVPluginResult* result; 582 | 583 | NSArray* invEvents = [command argumentAtIndex:0]; 584 | IBGInvocationEvent invocationEvents = 0; 585 | 586 | for (NSString *invEvent in invEvents) { 587 | IBGInvocationEvent invocationEvent = [self parseInvocationEvent:invEvent]; 588 | invocationEvents |= invocationEvent; 589 | } 590 | 591 | if (invocationEvents != 0) { 592 | IBGBugReporting.invocationEvents = invocationEvents; 593 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 594 | } else { 595 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 596 | messageAsString:@"A valid event type must be provided."]; 597 | } 598 | 599 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 600 | } 601 | 602 | /** 603 | * Sets the invocation options used when invoke Instabug SDK 604 | * 605 | * @param {CDVInvokedUrlCommand*} command 606 | * The command sent from JavaScript 607 | */ 608 | - (void) setInvocationOptions:(CDVInvokedUrlCommand*)command 609 | { 610 | CDVPluginResult* result; 611 | 612 | NSArray* invOptions = [command argumentAtIndex:0]; 613 | IBGBugReportingOption invocationOptions = 0; 614 | 615 | for (NSString *invOption in invOptions) { 616 | IBGBugReportingOption invocationOption = [self parseInvocationOption:invOption]; 617 | invocationOptions |= invocationOption; 618 | } 619 | 620 | if (invocationOptions != 0) { 621 | IBGBugReporting.bugReportingOptions = invocationOptions; 622 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 623 | } else { 624 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 625 | messageAsString:@"A valid invocation option must be provided."]; 626 | } 627 | 628 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 629 | } 630 | 631 | /** 632 | * Set supported report types bug, feedback or both. 633 | * 634 | * @param {CDVInvokedUrlCommand*} command 635 | * The command sent from JavaScript 636 | */ 637 | - (void) setReportTypes:(CDVInvokedUrlCommand*)command { 638 | CDVPluginResult* result; 639 | NSArray* types = [command argumentAtIndex:0]; 640 | IBGBugReportingReportType parsedTypes = 0; 641 | 642 | for (NSString* type in types) { 643 | IBGBugReportingReportType parsedType = [self parseBugReportingReportType:type]; 644 | if (parsedType == 0) { 645 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 646 | messageAsString:@"A valid report type must be provided."]; 647 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 648 | return; 649 | } 650 | parsedTypes |= parsedType; 651 | } 652 | [IBGBugReporting setPromptOptionsEnabledReportTypes:parsedTypes]; 653 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 654 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 655 | } 656 | 657 | /** 658 | * Show new report either bug or feedback with given options. 659 | * 660 | * @param {CDVInvokedUrlCommand*} command 661 | * The command sent from JavaScript 662 | */ 663 | - (void) showBugReportingWithReportTypeAndOptions:(CDVInvokedUrlCommand*)command { 664 | CDVPluginResult* result; 665 | NSString* type = [command argumentAtIndex:0]; 666 | NSArray* options = [command argumentAtIndex:1]; 667 | 668 | IBGBugReportingReportType parsedType = [self parseBugReportingReportType:type]; 669 | if (parsedType == 0) { 670 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 671 | messageAsString:@"A valid report type must be provided."]; 672 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 673 | return; 674 | } 675 | 676 | IBGBugReportingOption parsedOptions = 0; 677 | 678 | for (NSString* option in options) { 679 | IBGBugReportingOption parsedOption = [self parseInvocationOption:option]; 680 | if (parsedOption == 0) { 681 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 682 | messageAsString:@"A valid bug reporting option must be provided."]; 683 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 684 | return; 685 | } 686 | parsedOptions |= parsedOption; 687 | } 688 | [IBGBugReporting showWithReportType:parsedType options:parsedOptions]; 689 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 690 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 691 | } 692 | 693 | /** 694 | * Show default Instabug prompt. 695 | * 696 | * @param {CDVInvokedUrlCommand*} command 697 | * The command sent from JavaScript 698 | */ 699 | - (void) show:(CDVInvokedUrlCommand*)command { 700 | [Instabug show]; 701 | [self sendSuccessResult:command]; 702 | } 703 | 704 | /** 705 | * Enable or disable anything that has to do with bug reporting. 706 | * 707 | * @param {CDVInvokedUrlCommand*} command 708 | * The command sent from JavaScript 709 | */ 710 | - (void) setBugReportingEnabled:(CDVInvokedUrlCommand*)command { 711 | BOOL isEnabled = [[command argumentAtIndex:0] boolValue]; 712 | IBGBugReporting.enabled = isEnabled; 713 | [self sendSuccessResult:command]; 714 | } 715 | 716 | /** 717 | * Enable or disable anything that has to do with replies. 718 | * 719 | * @param {CDVInvokedUrlCommand*} command 720 | * The command sent from JavaScript 721 | */ 722 | - (void) setRepliesEnabled:(CDVInvokedUrlCommand*)command { 723 | BOOL isEnabled = [[command argumentAtIndex:0] boolValue]; 724 | IBGReplies.enabled = isEnabled; 725 | [self sendSuccessResult:command]; 726 | } 727 | 728 | /** 729 | * See if user has chats. 730 | * 731 | * @param {CDVInvokedUrlCommand*} command 732 | * The command sent from JavaScript 733 | */ 734 | - (void) hasChats:(CDVInvokedUrlCommand*)command { 735 | BOOL hasChats = [IBGReplies hasChats]; 736 | if (hasChats) { 737 | [self sendSuccessResult:command]; 738 | } 739 | } 740 | 741 | /** 742 | * Show replies to user. 743 | * 744 | * @param {CDVInvokedUrlCommand*} command 745 | * The command sent from JavaScript 746 | */ 747 | - (void) showReplies:(CDVInvokedUrlCommand*)command { 748 | [IBGReplies show]; 749 | [self sendSuccessResult:command]; 750 | } 751 | 752 | /** 753 | * Sets the locale used to display the strings in the 754 | * correct language. 755 | * 756 | * @param {CDVInvokedUrlCommand*} command 757 | * The command sent from JavaScript 758 | */ 759 | - (void) setLocale:(CDVInvokedUrlCommand*)command 760 | { 761 | NSString* locale = [command argumentAtIndex:0]; 762 | IBGLocale parsedLocale = (IBGLocale) [ArgsRegistry.locales[locale] intValue]; 763 | 764 | [Instabug setLocale:parsedLocale]; 765 | 766 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 767 | callbackId:[command callbackId]]; 768 | } 769 | 770 | /** 771 | * Sets whether user steps tracking is visual, non visual or disabled. 772 | * 773 | * @param {CDVInvokedUrlCommand*} command 774 | * The command sent from JavaScript 775 | */ 776 | - (void) setReproStepsMode:(CDVInvokedUrlCommand*)command DEPRECATED_MSG_ATTRIBUTE("This method is deprecated and will be removed in a future version. Use 'setReproStepsConfig:' instead."); 777 | { 778 | NSString* mode = [command argumentAtIndex:0]; 779 | IBGUserStepsMode parsedMode = (IBGUserStepsMode) [ArgsRegistry.reproStepsModes[mode] intValue]; 780 | 781 | [Instabug setReproStepsFor:IBGIssueTypeAll withMode:parsedMode]; 782 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 783 | callbackId:[command callbackId]]; 784 | } 785 | - (void)setReproStepsConfig:(CDVInvokedUrlCommand*)command { 786 | NSArray* arguments = [command arguments]; 787 | IBGUserStepsMode bugMode = (IBGUserStepsMode)[arguments[0] intValue]; 788 | IBGUserStepsMode crashMode = (IBGUserStepsMode)[arguments[1] intValue]; 789 | [Instabug setReproStepsFor:IBGIssueTypeBug withMode:bugMode]; 790 | [Instabug setReproStepsFor:IBGIssueTypeCrash withMode:crashMode]; 791 | 792 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 793 | [self.commandDelegate sendPluginResult:pluginResult callbackId:[command callbackId]]; 794 | } 795 | /** 796 | * Sets the welcome message mode. 797 | * 798 | * @param {CDVInvokedUrlCommand*} command 799 | * The command sent from JavaScript 800 | */ 801 | - (void) setWelcomeMessageMode:(CDVInvokedUrlCommand*)command 802 | { 803 | NSString* mode = [command argumentAtIndex:0]; 804 | IBGWelcomeMessageMode parsedMode = (IBGWelcomeMessageMode) [ArgsRegistry.welcomeMessageModes[mode] intValue]; 805 | 806 | [Instabug setWelcomeMessageMode:parsedMode]; 807 | 808 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 809 | callbackId:[command callbackId]]; 810 | } 811 | 812 | /** 813 | * Shows the welcome message in a specific mode. 814 | * 815 | * @param {CDVInvokedUrlCommand*} command 816 | * The command sent from JavaScript 817 | */ 818 | - (void) showWelcomeMessage:(CDVInvokedUrlCommand*)command 819 | { 820 | NSString* mode = [command argumentAtIndex:0]; 821 | IBGWelcomeMessageMode parsedMode = (IBGWelcomeMessageMode) [ArgsRegistry.welcomeMessageModes[mode] intValue]; 822 | 823 | [Instabug showWelcomeMessageWithMode:parsedMode]; 824 | 825 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 826 | callbackId:[command callbackId]]; 827 | } 828 | 829 | /** 830 | * Sets whether the extended bug report mode should be disabled, enabled with 831 | * required fields or enabled with optional fields. 832 | * 833 | * @param {CDVInvokedUrlCommand*} command 834 | * The command sent from JavaScript 835 | */ 836 | - (void) setExtendedBugReportMode:(CDVInvokedUrlCommand*)command 837 | { 838 | CDVPluginResult* result; 839 | 840 | IBGExtendedBugReportMode extendedBugReportMode = [self parseExtendedBugReportMode:[command argumentAtIndex:0]]; 841 | 842 | if (extendedBugReportMode != -1) { 843 | IBGBugReporting.extendedBugReportMode = extendedBugReportMode; 844 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 845 | } else { 846 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 847 | messageAsString:@"A valid extended bug report mode must be provided."]; 848 | } 849 | 850 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 851 | } 852 | 853 | /** 854 | * Enables/disables showing in-app notifications when the user receives a new 855 | * message. 856 | * 857 | * @param {CDVInvokedUrlCommand*} command 858 | * The command sent from JavaScript 859 | */ 860 | - (void) setChatNotificationEnabled:(CDVInvokedUrlCommand*)command 861 | { 862 | CDVPluginResult* result; 863 | 864 | BOOL isEnabled = [command argumentAtIndex:0]; 865 | 866 | if (isEnabled) { 867 | IBGReplies.inAppNotificationsEnabled = [[command argumentAtIndex:0] boolValue]; 868 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 869 | } else { 870 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 871 | messageAsString:@"A boolean value must be provided."]; 872 | } 873 | 874 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 875 | } 876 | 877 | /** 878 | * Sets whether IBGLog should also print to Xcode's console log or not. 879 | * 880 | * @param {CDVInvokedUrlCommand*} command 881 | * The command sent from JavaScript 882 | */ 883 | - (void) setIBGLogPrintsToConsole:(CDVInvokedUrlCommand*)command 884 | { 885 | CDVPluginResult* result; 886 | 887 | BOOL isEnabled = [command argumentAtIndex:0]; 888 | 889 | if (isEnabled) { 890 | IBGLog.printsToConsole = [[command argumentAtIndex:0] boolValue]; 891 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 892 | } else { 893 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 894 | messageAsString:@"A boolean value must be provided."]; 895 | } 896 | 897 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 898 | } 899 | 900 | /** 901 | * Returns the number of unread messages the user currently has. 902 | * 903 | * @param {CDVInvokedUrlCommand*} command 904 | * The command sent from JavaScript 905 | */ 906 | - (void) getUnreadRepliesCount:(CDVInvokedUrlCommand*)command 907 | { 908 | CDVPluginResult* result; 909 | 910 | NSInteger messageCount = IBGReplies.unreadRepliesCount; 911 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt: messageCount]; 912 | 913 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 914 | } 915 | 916 | /** 917 | * Sets the threshold value of the shake gesture for iPhone/iPod touch. 918 | * 919 | * @param {CDVInvokedUrlCommand*} command 920 | * The command sent from JavaScript 921 | */ 922 | - (void) setShakingThresholdForiPhone:(CDVInvokedUrlCommand*)command 923 | { 924 | double threshold = [[command argumentAtIndex:0] doubleValue]; 925 | 926 | IBGBugReporting.shakingThresholdForiPhone = threshold; 927 | 928 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 929 | callbackId:[command callbackId]]; 930 | } 931 | 932 | /** 933 | * Sets the threshold value of the shake gesture for iPad. 934 | * 935 | * @param {CDVInvokedUrlCommand*} command 936 | * The command sent from JavaScript 937 | */ 938 | - (void) setShakingThresholdForiPad:(CDVInvokedUrlCommand*)command 939 | { 940 | double threshold = [[command argumentAtIndex:0] doubleValue]; 941 | 942 | IBGBugReporting.shakingThresholdForiPad = threshold; 943 | 944 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 945 | callbackId:[command callbackId]]; 946 | } 947 | 948 | /** 949 | * Convenience method for setting the default edge on 950 | * which the floating button will be shown and its 951 | * offset from the top. 952 | */ 953 | - (void) setFloatingButtonEdge:(CDVInvokedUrlCommand*)command 954 | { 955 | NSString* edge = [command argumentAtIndex:0 withDefault:@"right"]; 956 | double offset = [[command argumentAtIndex:1] doubleValue]; 957 | NSNumber* parsedEdge = ArgsRegistry.floatingButtonEdges[edge]; 958 | 959 | IBGBugReporting.floatingButtonTopOffset = offset; 960 | IBGBugReporting.floatingButtonEdge = (CGRectEdge) [parsedEdge intValue]; 961 | 962 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 963 | callbackId:[command callbackId]]; 964 | } 965 | 966 | /** 967 | * Sets whether to enable the session profiler or not. 968 | * 969 | * @param {CDVInvokedUrlCommand*} command 970 | * The command sent from JavaScript 971 | */ 972 | - (void) setSessionProfilerEnabled:(CDVInvokedUrlCommand*)command 973 | { 974 | bool enabled = [[command argumentAtIndex:0] boolValue]; 975 | [Instabug setSessionProfilerEnabled:enabled]; 976 | 977 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 978 | callbackId:[command callbackId]]; 979 | } 980 | 981 | /** 982 | * Sets the SDK color theme 983 | * 984 | * @param {CDVInvokedUrlCommand*} command 985 | * The command sent from JavaScript 986 | */ 987 | - (void) setColorTheme:(CDVInvokedUrlCommand*)command 988 | { 989 | NSString* theme = [command argumentAtIndex:0]; 990 | IBGColorTheme parsedTheme = (IBGColorTheme) [ArgsRegistry.colorThemes[theme] intValue]; 991 | 992 | [Instabug setColorTheme:parsedTheme]; 993 | 994 | [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 995 | callbackId:[command callbackId]]; 996 | } 997 | 998 | /** 999 | * Sets a threshold for numbers of sessions and another for number of days 1000 | * required before a survey, that has been dismissed once, would show again. 1001 | * 1002 | * @param {CDVInvokedUrlCommand*} command 1003 | * The command sent from JavaScript 1004 | */ 1005 | - (void) setAutoShowingSurveysEnabled:(CDVInvokedUrlCommand*)command 1006 | { 1007 | CDVPluginResult* result; 1008 | 1009 | BOOL autoShowingSurveysEnabled = [command argumentAtIndex:0]; 1010 | 1011 | if (autoShowingSurveysEnabled) { 1012 | IBGSurveys.autoShowingEnabled = [[command argumentAtIndex:0] boolValue]; 1013 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 1014 | } else { 1015 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 1016 | messageAsString:@"A boolean value must be provided."]; 1017 | } 1018 | 1019 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 1020 | } 1021 | 1022 | /** 1023 | * Sets whether surveys are enabled or not. 1024 | * 1025 | * @param {CDVInvokedUrlCommand*} command 1026 | * The command sent from JavaScript 1027 | */ 1028 | - (void) setSurveysEnabled:(CDVInvokedUrlCommand*)command 1029 | { 1030 | CDVPluginResult* result; 1031 | 1032 | BOOL isEnabled = [command argumentAtIndex:0]; 1033 | 1034 | if (isEnabled) { 1035 | IBGSurveys.enabled = [[command argumentAtIndex:0] boolValue]; 1036 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 1037 | } else { 1038 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 1039 | messageAsString:@"A boolean value must be provided."]; 1040 | } 1041 | 1042 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 1043 | } 1044 | 1045 | /** 1046 | * Shows the UI for feature requests list 1047 | * 1048 | * @param {CDVInvokedUrlCommand*} command 1049 | * The command sent from JavaScript 1050 | */ 1051 | - (void) showFeatureRequests:(CDVInvokedUrlCommand*)command 1052 | { 1053 | [IBGFeatureRequests show]; 1054 | [self sendSuccessResult:command]; 1055 | } 1056 | 1057 | /** 1058 | * Resets the value of the user's email and name, previously set. 1059 | * 1060 | * @param {CDVInvokedUrlCommand*} command 1061 | * The command sent from JavaScript 1062 | */ 1063 | - (void) logOut:(CDVInvokedUrlCommand*)command 1064 | { 1065 | [Instabug logOut]; 1066 | [self sendSuccessResult:command]; 1067 | } 1068 | 1069 | /** 1070 | * Dismisses any Instabug views that are currently being shown. 1071 | * 1072 | * @param {CDVInvokedUrlCommand*} command 1073 | * The command sent from JavaScript 1074 | */ 1075 | - (void) dismiss:(CDVInvokedUrlCommand*)command 1076 | { 1077 | [IBGBugReporting dismiss]; 1078 | [self sendSuccessResult:command]; 1079 | } 1080 | 1081 | /** 1082 | * Set custom user attributes that are going to be sent with each feedback, bug or crash. 1083 | */ 1084 | - (void) setUserAttribute:(CDVInvokedUrlCommand*)command 1085 | { 1086 | CDVPluginResult* result; 1087 | 1088 | NSString* key = [command argumentAtIndex:0]; 1089 | NSString* value = [command argumentAtIndex:1]; 1090 | 1091 | if (key && value) { 1092 | [Instabug setUserAttribute:value withKey:key]; 1093 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 1094 | } else { 1095 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 1096 | messageAsString:@"key and value parameters must be provided."]; 1097 | } 1098 | 1099 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 1100 | } 1101 | 1102 | /** 1103 | * Removes a given key and its associated value from user attributes. 1104 | * Does nothing if a key does not exist. 1105 | */ 1106 | - (void) removeUserAttribute:(CDVInvokedUrlCommand*)command 1107 | { 1108 | CDVPluginResult* result; 1109 | 1110 | NSString* key = [command argumentAtIndex:0]; 1111 | 1112 | if (key) { 1113 | [Instabug removeUserAttributeForKey:key]; 1114 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 1115 | } else { 1116 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 1117 | messageAsString:@"key parameter must be provided."]; 1118 | } 1119 | 1120 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 1121 | } 1122 | 1123 | /** 1124 | * Returns the user attribute associated with a given key. 1125 | */ 1126 | - (void) getUserAttribute:(CDVInvokedUrlCommand*)command 1127 | { 1128 | CDVPluginResult* result; 1129 | 1130 | NSString* key = [command argumentAtIndex:0]; 1131 | NSString* userAttribute = @[[Instabug userAttributeForKey:key]]; 1132 | 1133 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString: userAttribute]; 1134 | 1135 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 1136 | } 1137 | 1138 | /** 1139 | * Returns the user attribute associated with a given key. 1140 | */ 1141 | - (void) getAllUserAttributes:(CDVInvokedUrlCommand*)command 1142 | { 1143 | CDVPluginResult* result; 1144 | 1145 | NSDictionary* userAttributes = @[[Instabug userAttributes]]; 1146 | 1147 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:userAttributes]; 1148 | 1149 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 1150 | } 1151 | 1152 | /** 1153 | * Shows one of the surveys that were not shown before, that also have 1154 | * conditions that match the current device/user. 1155 | * 1156 | * @param {CDVInvokedUrlCommand*} command 1157 | * The command sent from JavaScript 1158 | */ 1159 | - (void) showSurveyIfAvailable:(CDVInvokedUrlCommand*)command 1160 | { 1161 | [IBGSurveys showSurveyIfAvailable]; 1162 | [self sendSuccessResult:command]; 1163 | } 1164 | 1165 | /** 1166 | * Sets a threshold for numbers of sessions and another for number of days 1167 | * required before a survey, that has been dismissed once, would show again. 1168 | * 1169 | * @param {CDVInvokedUrlCommand*} command 1170 | * The command sent from JavaScript 1171 | */ 1172 | - (void) setShouldShowSurveysWelcomeScreen:(CDVInvokedUrlCommand*)command 1173 | { 1174 | CDVPluginResult* result; 1175 | 1176 | BOOL shouldShowWelcomeScreen = [command argumentAtIndex:0]; 1177 | 1178 | if (shouldShowWelcomeScreen) { 1179 | IBGSurveys.shouldShowWelcomeScreen = [[command argumentAtIndex:0] boolValue]; 1180 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 1181 | } else { 1182 | result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR 1183 | messageAsString:@"A boolean value must be provided."]; 1184 | } 1185 | 1186 | [self.commandDelegate sendPluginResult:result callbackId:[command callbackId]]; 1187 | } 1188 | 1189 | /** 1190 | * Convenience method for converting NSString to 1191 | * IBGInvocationEvent. 1192 | * 1193 | * @param {NSString*} event 1194 | * NSString shortcode for IBGInvocationEvent 1195 | */ 1196 | - (IBGInvocationEvent) parseInvocationEvent:(NSString*)event 1197 | { 1198 | if ([event isEqualToString:@"shake"]) { 1199 | return IBGInvocationEventShake; 1200 | } else if ([event isEqualToString:@"button"]) { 1201 | return IBGInvocationEventFloatingButton; 1202 | } else if ([event isEqualToString:@"screenshot"]) { 1203 | return IBGInvocationEventScreenshot; 1204 | } else if ([event isEqualToString:@"swipe"]) { 1205 | return IBGInvocationEventTwoFingersSwipeLeft; 1206 | } else if ([event isEqualToString:@"pan"]) { 1207 | return IBGInvocationEventRightEdgePan; 1208 | } else if ([event isEqualToString:@"none"]) { 1209 | return IBGInvocationEventNone; 1210 | } else return 0; 1211 | } 1212 | 1213 | /** 1214 | * Convenience method for converting NSString to 1215 | * IBGAction. 1216 | * 1217 | * @param {NSString*} actionType 1218 | * NSString shortcode for IBGAction 1219 | */ 1220 | - (IBGAction) parseActionType:(NSString*)actionType 1221 | { 1222 | if ([actionType isEqualToString:@"requestNewFeature"]) { 1223 | return IBGActionRequestNewFeature; 1224 | } else if ([actionType isEqualToString:@"addCommentToFeature"]) { 1225 | return IBGActionAddCommentToFeature; 1226 | } else return 0; 1227 | } 1228 | 1229 | /** 1230 | * Convenience method for converting NSString to 1231 | * IBGBugReportingInvocationOption. 1232 | * 1233 | * @param {NSString*} option 1234 | * NSString shortcode for IBGBugReportingInvocationOption 1235 | */ 1236 | - (IBGBugReportingOption) parseInvocationOption:(NSString*)option 1237 | { 1238 | if ([option isEqualToString:@"emailFieldHidden"]) { 1239 | return IBGBugReportingOptionEmailFieldHidden; 1240 | } else if ([option isEqualToString:@"emailFieldOptional"]) { 1241 | return IBGBugReportingOptionEmailFieldOptional; 1242 | } else if ([option isEqualToString:@"commentFieldRequired"]) { 1243 | return IBGBugReportingOptionCommentFieldRequired; 1244 | } else if ([option isEqualToString:@"disablePostSendingDialog"]) { 1245 | return IBGBugReportingOptionDisablePostSendingDialog; 1246 | } else return 0; 1247 | } 1248 | 1249 | - (IBGBugReportingReportType) parseBugReportingReportType:(NSString*)type { 1250 | if ([type isEqualToString:@"bug"]) { 1251 | return IBGBugReportingReportTypeBug; 1252 | } else if ([type isEqualToString:@"feedback"]) { 1253 | return IBGBugReportingReportTypeFeedback; 1254 | } else if ([type isEqualToString:@"question"]) { 1255 | return IBGBugReportingReportTypeQuestion; 1256 | } else return 0; 1257 | } 1258 | 1259 | /** 1260 | * Convenience method for converting NSString to 1261 | * IBGPosition. 1262 | * 1263 | * @param {NSString*} position 1264 | * NSString shortcode for IBGPosition 1265 | */ 1266 | - (IBGPosition) parseIBGPosition:(NSString*)position 1267 | { 1268 | if ([position isEqualToString:@"topRight"]) { 1269 | return IBGPositionTopRight; 1270 | } else if ([position isEqualToString:@"bottomLeft"]) { 1271 | return IBGPositionBottomLeft; 1272 | } else if ([position isEqualToString:@"topLeft"]) { 1273 | return IBGPositionTopLeft; 1274 | } else if ([position isEqualToString:@"bottomRight"]) { 1275 | return IBGPositionBottomRight; 1276 | } else return 0; 1277 | } 1278 | 1279 | /** 1280 | * Convenience method for converting NSString to 1281 | * IBGExtendedBugReportMode. 1282 | * 1283 | * @param {NSString*} mode 1284 | * NSString shortcode for IBGExtendedBugReportMode 1285 | */ 1286 | - (IBGExtendedBugReportMode) parseExtendedBugReportMode:(NSString*)mode 1287 | { 1288 | if ([mode isEqualToString:@"enabledWithRequiredFields"]) { 1289 | return IBGExtendedBugReportModeEnabledWithRequiredFields; 1290 | } else if ([mode isEqualToString:@"enabledWithOptionalFields"]) { 1291 | return IBGExtendedBugReportModeEnabledWithOptionalFields; 1292 | } else if ([mode isEqualToString:@"disabled"]) { 1293 | return IBGExtendedBugReportModeDisabled; 1294 | } else return -1; 1295 | } 1296 | 1297 | /** 1298 | * Convenience method for converting NSString to 1299 | * IBGDismissType. 1300 | * 1301 | * @param {NSString*} dismissType 1302 | * NSString shortcode for IBGDismissType 1303 | */ 1304 | - (NSString*) parseDismissType:(IBGDismissType)dismissType 1305 | { 1306 | if (dismissType == IBGDismissTypeSubmit) { 1307 | return @"submit"; 1308 | } else if (dismissType == IBGDismissTypeCancel) { 1309 | return @"cancel"; 1310 | } else if (dismissType == IBGDismissTypeAddAttachment) { 1311 | return @"add attachment"; 1312 | } else return @""; 1313 | } 1314 | 1315 | /** 1316 | * Convenience method for converting NSString to 1317 | * IBGReportType. 1318 | * 1319 | * @param {NSString*} reportType 1320 | * NSString shortcode for IBGReportType 1321 | */ 1322 | - (NSString*) parseReportType:(IBGReportType)reportType 1323 | { 1324 | if (reportType == IBGReportTypeBug) { 1325 | return @"bug"; 1326 | } else if (reportType == IBGReportTypeFeedback) { 1327 | return @"feedback"; 1328 | } else if (reportType == IBGReportTypeQuestion) { 1329 | return @"question"; 1330 | } else return @""; 1331 | } 1332 | 1333 | /** 1334 | * Util method for parsing hex string to UIColor. 1335 | * 1336 | * @param {NSString *} hexString 1337 | * NSString representation of hex color 1338 | */ 1339 | - (UIColor *)colorFromHexString:(NSString *)hexString { 1340 | unsigned rgbValue = 0; 1341 | NSScanner* scanner = [NSScanner scannerWithString:hexString]; 1342 | [scanner scanHexInt:&rgbValue]; 1343 | return [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 1344 | green:((rgbValue & 0xFF00) >> 8)/255.0 1345 | blue:(rgbValue & 0xFF)/255.0 alpha:1.0]; 1346 | } 1347 | 1348 | /** 1349 | * Convenience method for sending successful plugin 1350 | * result in methods that cannot fail. 1351 | * 1352 | * @param {CDVInvokedUrlCommand*} command 1353 | * The command sent from JavaScript 1354 | */ 1355 | - (void) sendSuccessResult:(CDVInvokedUrlCommand*)command 1356 | { 1357 | [self.commandDelegate 1358 | sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] 1359 | callbackId:[command callbackId]]; 1360 | } 1361 | 1362 | - (void) setBaseUrlForDeprecationLogs { 1363 | SEL setCurrentPlatformSEL = NSSelectorFromString(@"setCurrentPlatform:"); 1364 | if([[Instabug class] respondsToSelector:setCurrentPlatformSEL]) { 1365 | NSInvocation *inv = [NSInvocation invocationWithMethodSignature:[[Instabug class] methodSignatureForSelector:setCurrentPlatformSEL]]; 1366 | [inv setSelector:setCurrentPlatformSEL]; 1367 | [inv setTarget:[Instabug class]]; 1368 | IBGPlatform platform = IBGPlatformCordova; 1369 | [inv setArgument:&(platform) atIndex:2]; 1370 | 1371 | [inv invoke]; 1372 | } 1373 | } 1374 | 1375 | - (void)setString:(CDVInvokedUrlCommand*)command { 1376 | NSString* key = [command argumentAtIndex:0]; 1377 | NSString* value = [command argumentAtIndex:1]; 1378 | NSString* placeholder = ArgsRegistry.placeholders[key]; 1379 | [Instabug setValue:value forStringWithKey:placeholder]; 1380 | } 1381 | 1382 | - (IBGSDKDebugLogsLevel)parseLogLevel:(NSString*)logLevel { 1383 | if ([logLevel isEqualToString:@"verbose"]) { 1384 | return IBGSDKDebugLogsLevelVerbose; 1385 | } else if ([logLevel isEqualToString:@"debug"]) { 1386 | return IBGSDKDebugLogsLevelDebug; 1387 | } else if ([logLevel isEqualToString:@"error"]) { 1388 | return IBGSDKDebugLogsLevelError; 1389 | } else { 1390 | return IBGSDKDebugLogsLevelNone; 1391 | } 1392 | } 1393 | 1394 | @end 1395 | -------------------------------------------------------------------------------- /src/ios/util/ArgsRegistry.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | typedef NSDictionary ArgsDictionary; 5 | 6 | @interface ArgsRegistry : NSObject 7 | 8 | + (ArgsDictionary *) recordButtonPositions; 9 | + (ArgsDictionary *) welcomeMessageModes; 10 | + (ArgsDictionary *) colorThemes; 11 | + (ArgsDictionary *) floatingButtonEdges; 12 | + (NSDictionary *) placeholders; 13 | + (ArgsDictionary *) reproStepsModes; 14 | + (ArgsDictionary *) locales; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /src/ios/util/ArgsRegistry.m: -------------------------------------------------------------------------------- 1 | #import "ArgsRegistry.h" 2 | 3 | @implementation ArgsRegistry 4 | 5 | + (ArgsDictionary *) recordButtonPositions { 6 | return @{ 7 | @"topLeft": @(IBGPositionTopLeft), 8 | @"topRight": @(IBGPositionTopRight), 9 | @"bottomLeft": @(IBGPositionBottomLeft), 10 | @"bottomRight": @(IBGPositionBottomRight), 11 | }; 12 | } 13 | 14 | + (ArgsDictionary *) welcomeMessageModes { 15 | return @{ 16 | @"welcomeMessageModeLive": @(IBGWelcomeMessageModeLive), 17 | @"welcomeMessageModeBeta": @(IBGWelcomeMessageModeBeta), 18 | @"welcomeMessageModeDisabled": @(IBGWelcomeMessageModeDisabled), 19 | }; 20 | } 21 | 22 | + (ArgsDictionary *) colorThemes { 23 | return @{ 24 | @"light": @(IBGColorThemeLight), 25 | @"dark": @(IBGColorThemeDark), 26 | }; 27 | } 28 | 29 | + (ArgsDictionary *) floatingButtonEdges { 30 | return @{ 31 | @"left": @(CGRectMinXEdge), 32 | @"right": @(CGRectMaxXEdge), 33 | }; 34 | } 35 | 36 | + (NSDictionary *) placeholders { 37 | return @{ 38 | @"shakeHint": kIBGShakeStartAlertTextStringName, 39 | @"swipeHint": kIBGTwoFingerSwipeStartAlertTextStringName, 40 | @"edgeSwipeStartHint": kIBGEdgeSwipeStartAlertTextStringName, 41 | @"startAlertText": kIBGStartAlertTextStringName, 42 | @"invalidEmailMessage": kIBGInvalidEmailMessageStringName, 43 | @"invalidEmailTitle": kIBGInvalidEmailTitleStringName, 44 | @"invalidCommentMessage":kIBGInsufficientContentMessageStringName, 45 | @"invalidCommentTitle": kIBGInsufficientContentTitleStringName, 46 | @"invocationHeader": kIBGInvocationTitleStringName, 47 | @"reportQuestion": kIBGAskAQuestionStringName, 48 | @"reportBug": kIBGReportBugStringName, 49 | @"reportFeedback": kIBGReportFeedbackStringName, 50 | @"emailFieldHint": kIBGEmailFieldPlaceholderStringName, 51 | @"commentFieldHintForBugReport": kIBGCommentFieldPlaceholderForBugReportStringName, 52 | @"commentFieldHintForFeedback": kIBGCommentFieldPlaceholderForFeedbackStringName, 53 | @"commentFieldHintForQuestion": kIBGCommentFieldPlaceholderForQuestionStringName, 54 | @"addVideoMessage": kIBGAddScreenRecordingMessageStringName, 55 | @"addVoiceMessage": kIBGAddVoiceMessageStringName, 56 | @"addImageFromGallery": kIBGAddImageFromGalleryStringName, 57 | @"addExtraScreenshot": kIBGAddExtraScreenshotStringName, 58 | @"audioRecordingPermissionDeniedTitle": kIBGAudioRecordingPermissionDeniedTitleStringName, 59 | @"audioRecordingPermissionDeniedMessage": kIBGAudioRecordingPermissionDeniedMessageStringName, 60 | @"microphonePermissionAlertSettingsButtonTitle": kIBGMicrophonePermissionAlertSettingsButtonTitleStringName, 61 | @"conversationsHeaderTitle": kIBGChatsTitleStringName, 62 | @"chatsHeaderTitle": kIBGChatsTitleStringName, 63 | @"team": kIBGTeamStringName, 64 | @"recordingMessageToHoldText": kIBGRecordingMessageToHoldTextStringName, 65 | @"recordingMessageToReleaseText": kIBGRecordingMessageToReleaseTextStringName, 66 | @"messagesNotification": kIBGMessagesNotificationTitleSingleMessageStringName, 67 | @"messagesNotificationAndOthers": kIBGMessagesNotificationTitleMultipleMessagesStringName, 68 | @"screenshotHeaderTitle": kIBGScreenshotTitleStringName, 69 | @"okButtonTitle": kIBGOkButtonTitleStringName, 70 | @"cancelButtonTitle": kIBGCancelButtonTitleStringName, 71 | @"thankYouText": kIBGThankYouAlertTitleStringName, 72 | @"audio": kIBGAudioStringName, 73 | @"image": kIBGImageStringName, 74 | @"screenRecording": kIBGScreenRecordingStringName, 75 | @"surveyEnterYourAnswer": kIBGSurveyEnterYourAnswerTextPlaceholder, 76 | @"videoPressRecord": kIBGVideoPressRecordTitle, 77 | @"collectingDataText": kIBGCollectingDataText, 78 | @"thankYouAlertText": kIBGThankYouAlertMessageStringName, 79 | 80 | @"welcomeMessageBetaWelcomeStepTitle": kIBGBetaWelcomeMessageWelcomeStepTitle, 81 | @"welcomeMessageBetaWelcomeStepContent": kIBGBetaWelcomeMessageWelcomeStepContent, 82 | @"welcomeMessageBetaHowToReportStepTitle": kIBGBetaWelcomeMessageHowToReportStepTitle, 83 | @"welcomeMessageBetaHowToReportStepContent": kIBGBetaWelcomeMessageHowToReportStepContent, 84 | @"welcomeMessageBetaFinishStepTitle": kIBGBetaWelcomeMessageFinishStepTitle, 85 | @"welcomeMessageBetaFinishStepContent": kIBGBetaWelcomeMessageFinishStepContent, 86 | @"welcomeMessageLiveWelcomeStepTitle": kIBGLiveWelcomeMessageTitle, 87 | @"welcomeMessageLiveWelcomeStepContent": kIBGLiveWelcomeMessageContent, 88 | 89 | @"surveysStoreRatingThanksTitle": kIBGStoreRatingThankYouTitleText, 90 | @"surveysStoreRatingThanksSubtitle": kIBGStoreRatingThankYouDescriptionText, 91 | 92 | @"reportBugDescription": kIBGReportBugDescriptionStringName, 93 | @"reportFeedbackDescription": kIBGReportFeedbackDescriptionStringName, 94 | @"reportQuestionDescription": kIBGReportQuestionDescriptionStringName, 95 | @"requestFeatureDescription": kIBGRequestFeatureDescriptionStringName, 96 | 97 | @"discardAlertTitle": kIBGDiscardAlertTitle, 98 | @"discardAlertMessage": kIBGDiscardAlertMessage, 99 | @"discardAlertCancel": kIBGDiscardAlertCancel, 100 | @"discardAlertAction": kIBGDiscardAlertAction, 101 | @"addAttachmentButtonTitleStringName": kIBGAddAttachmentButtonTitleStringName, 102 | 103 | @"reportReproStepsDisclaimerBody": kIBGReproStepsDisclaimerBody, 104 | @"reportReproStepsDisclaimerLink": kIBGReproStepsDisclaimerLink, 105 | @"reproStepsProgressDialogBody": kIBGProgressViewTitle, 106 | @"reproStepsListHeader": kIBGReproStepsListTitle, 107 | @"reproStepsListDescription": kIBGReproStepsListHeader, 108 | @"reproStepsListEmptyStateDescription": kIBGReproStepsListEmptyStateLabel, 109 | @"reproStepsListItemTitle": kIBGReproStepsListItemName, 110 | 111 | @"insufficientContentMessage": kIBGInsufficientContentMessageStringName, 112 | @"insufficientContentTitle": kIBGInsufficientContentTitleStringName, 113 | }; 114 | } 115 | 116 | + (ArgsDictionary *) reproStepsModes { 117 | return @{ 118 | @"enabled": @(IBGUserStepsModeEnable), 119 | @"disabled": @(IBGUserStepsModeDisable), 120 | @"enabledWithNoScreenshots": @(IBGUserStepsModeEnabledWithNoScreenshots), 121 | }; 122 | } 123 | 124 | + (ArgsDictionary *) locales { 125 | return @{ 126 | @"arabic": @(IBGLocaleArabic), 127 | @"azerbaijani": @(IBGLocaleAzerbaijani), 128 | @"chineseSimplified": @(IBGLocaleChineseSimplified), 129 | @"chineseTraditional": @(IBGLocaleChineseTraditional), 130 | @"czech": @(IBGLocaleCzech), 131 | @"danish": @(IBGLocaleDanish), 132 | @"dutch": @(IBGLocaleDutch), 133 | @"english": @(IBGLocaleEnglish), 134 | @"finnish": @(IBGLocaleFinnish), 135 | @"french": @(IBGLocaleFrench), 136 | @"german": @(IBGLocaleGerman), 137 | @"hungarian": @(IBGLocaleHungarian), 138 | @"italian": @(IBGLocaleItalian), 139 | @"japanese": @(IBGLocaleJapanese), 140 | @"korean": @(IBGLocaleKorean), 141 | @"norwegian": @(IBGLocaleNorwegian), 142 | @"polish": @(IBGLocalePolish), 143 | @"portugueseBrazil": @(IBGLocalePortugueseBrazil), 144 | @"portuguesePortugal": @(IBGLocalePortuguese), 145 | @"romanian": @(IBGLocaleRomanian), 146 | @"russian": @(IBGLocaleRussian), 147 | @"slovak": @(IBGLocaleSlovak), 148 | @"spanish": @(IBGLocaleSpanish), 149 | @"swedish": @(IBGLocaleSwedish), 150 | @"turkish": @(IBGLocaleTurkish), 151 | }; 152 | } 153 | 154 | @end 155 | -------------------------------------------------------------------------------- /src/modules/ArgsRegistry.ts: -------------------------------------------------------------------------------- 1 | namespace ArgsRegistry { 2 | export enum position { 3 | topLeft = "topLeft", 4 | topRight = "topRight", 5 | bottomLeft = "bottomLeft", 6 | bottomRight = "bottomRight", 7 | } 8 | 9 | export enum welcomeMessageMode { 10 | live = "welcomeMessageModeLive", 11 | beta = "welcomeMessageModeBeta", 12 | disabled = "welcomeMessageModeDisabled", 13 | } 14 | 15 | export enum floatingButtonEdge { 16 | left = "left", 17 | right = "right", 18 | } 19 | 20 | export enum colorTheme { 21 | light = "light", 22 | dark = "dark", 23 | } 24 | 25 | export enum strings { 26 | shakeHint = "shakeHint", 27 | swipeHint = "swipeHint", 28 | edgeSwipeStartHint = "edgeSwipeStartHint", 29 | startAlertText = "startAlertText", 30 | invalidEmailMessage = "invalidEmailMessage", 31 | invalidEmailTitle = "invalidEmailTitle", 32 | invalidCommentMessage = "invalidCommentMessage", 33 | invalidCommentTitle = "invalidCommentTitle", 34 | invocationHeader = "invocationHeader", 35 | reportQuestion = "reportQuestion", 36 | reportBug = "reportBug", 37 | reportFeedback = "reportFeedback", 38 | emailFieldHint = "emailFieldHint", 39 | commentFieldHintForBugReport = "commentFieldHintForBugReport", 40 | commentFieldHintForFeedback = "commentFieldHintForFeedback", 41 | commentFieldHintForQuestion = "commentFieldHintForQuestion", 42 | videoPressRecord = "videoPressRecord", 43 | addVideoMessage = "addVideoMessage", 44 | addVoiceMessage = "addVoiceMessage", 45 | addImageFromGallery = "addImageFromGallery", 46 | addExtraScreenshot = "addExtraScreenshot", 47 | audioRecordingPermissionDeniedTitle = "audioRecordingPermissionDeniedTitle", 48 | audioRecordingPermissionDeniedMessage = "audioRecordingPermissionDeniedMessage", 49 | microphonePermissionAlertSettingsButtonText = "microphonePermissionAlertSettingsButtonTitle", 50 | recordingMessageToHoldText = "recordingMessageToHoldText", 51 | recordingMessageToReleaseText = "recordingMessageToReleaseText", 52 | conversationsHeaderTitle = "conversationsHeaderTitle", 53 | screenshotHeaderTitle = "screenshotHeaderTitle", 54 | doneButtonText = "doneButtonText", 55 | okButtonText = "okButtonTitle", 56 | cancelButtonText = "cancelButtonTitle", 57 | thankYouText = "thankYouText", 58 | audio = "audio", 59 | image = "image", 60 | screenRecording = "screenRecording", 61 | team = "team", 62 | messagesNotification = "messagesNotification", 63 | messagesNotificationAndOthers = "messagesNotificationAndOthers", 64 | conversationTextFieldHint = "conversationTextFieldHint", 65 | collectingDataText = "collectingDataText", 66 | thankYouAlertText = "thankYouAlertText", 67 | welcomeMessageBetaWelcomeStepTitle = "welcomeMessageBetaWelcomeStepTitle", 68 | welcomeMessageBetaWelcomeStepContent = "welcomeMessageBetaWelcomeStepContent", 69 | welcomeMessageBetaHowToReportStepTitle = "welcomeMessageBetaHowToReportStepTitle", 70 | welcomeMessageBetaHowToReportStepContent = "welcomeMessageBetaHowToReportStepContent", 71 | welcomeMessageBetaFinishStepTitle = "welcomeMessageBetaFinishStepTitle", 72 | welcomeMessageBetaFinishStepContent = "welcomeMessageBetaFinishStepContent", 73 | welcomeMessageLiveWelcomeStepTitle = "welcomeMessageLiveWelcomeStepTitle", 74 | welcomeMessageLiveWelcomeStepContent = "welcomeMessageLiveWelcomeStepContent", 75 | surveysStoreRatingThanksTitle = "surveysStoreRatingThanksTitle", 76 | surveysStoreRatingThanksSubtitle = "surveysStoreRatingThanksSubtitle", 77 | reportBugDescription = "reportBugDescription", 78 | reportFeedbackDescription = "reportFeedbackDescription", 79 | reportQuestionDescription = "reportQuestionDescription", 80 | requestFeatureDescription = "requestFeatureDescription", 81 | discardAlertTitle = "discardAlertTitle", 82 | discardAlertMessage = "discardAlertMessage", 83 | discardAlertCancel = "discardAlertCancel", 84 | discardAlertAction = "discardAlertAction", 85 | addAttachmentButtonTitleStringName = "addAttachmentButtonTitleStringName", 86 | reportReproStepsDisclaimerBody = "reportReproStepsDisclaimerBody", 87 | reportReproStepsDisclaimerLink = "reportReproStepsDisclaimerLink", 88 | reproStepsProgressDialogBody = "reproStepsProgressDialogBody", 89 | reproStepsListHeader = "reproStepsListHeader", 90 | reproStepsListDescription = "reproStepsListDescription", 91 | reproStepsListEmptyStateDescription = "reproStepsListEmptyStateDescription", 92 | reproStepsListItemTitle = "reproStepsListItemTitle", 93 | insufficientContentMessage = "insufficientContentMessage", 94 | insufficientContentTitle = "insufficientContentTitle", 95 | } 96 | 97 | export enum reproStepsMode { 98 | enabled = "enabled", 99 | disabled = "disabled", 100 | enabledWithNoScreenshots = "enabledWithNoScreenshots", 101 | } 102 | 103 | export enum locale { 104 | arabic = "arabic", 105 | azerbaijani = "azerbaijani", 106 | chineseSimplified = "chineseSimplified", 107 | chineseTraditional = "chineseTraditional", 108 | czech = "czech", 109 | danish = "danish", 110 | dutch = "dutch", 111 | english = "english", 112 | finnish = "finnish", 113 | french = "french", 114 | german = "german", 115 | hungarian = "hungarian", 116 | indonesian = "indonesian", 117 | italian = "italian", 118 | japanese = "japanese", 119 | korean = "korean", 120 | norwegian = "norwegian", 121 | polish = "polish", 122 | portugueseBrazil = "portugueseBrazil", 123 | portuguesePortugal = "portuguesePortugal", 124 | romanian = "romanian", 125 | russian = "russian", 126 | slovak = "slovak", 127 | spanish = "spanish", 128 | swedish = "swedish", 129 | turkish = "turkish", 130 | } 131 | 132 | export enum logLeve { 133 | none = "none", 134 | debug = "debug", 135 | error = "error", 136 | verbose = "verbose", 137 | } 138 | } 139 | export = ArgsRegistry; 140 | -------------------------------------------------------------------------------- /src/modules/BugReporting.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Instabug Bug Reporting module. 3 | */ 4 | 5 | import { exec } from "./IBGCordova"; 6 | import registry from "./ArgsRegistry"; 7 | 8 | namespace BugReporting { 9 | export enum reportType { 10 | bug = "bug", 11 | feedback = "feedback", 12 | question = "question", 13 | } 14 | 15 | export enum option { 16 | emailFieldHidden = "emailFieldHidden", 17 | emailFieldOptional = "emailFieldOptional", 18 | commentFieldRequired = "commentFieldRequired", 19 | disablePostSendingDialog = "disablePostSendingDialog", 20 | } 21 | 22 | export enum invocationEvents { 23 | shake = "shake", 24 | button = "button", 25 | screenshot = "screenshot", 26 | swipe = "swipe", 27 | none = "none", 28 | } 29 | 30 | export enum extendedBugReportMode { 31 | enabledWithRequiredFields = "enabledWithRequiredFields", 32 | enabledWithOptionalFields = "enabledWithOptionalFields", 33 | disabled = "disabled", 34 | } 35 | 36 | export const position = registry.position; 37 | 38 | /** 39 | * Enables or disables all bug reporting functionalities. 40 | * @param isEnabled a boolean to enable or disable the feature. 41 | * @param success callback on function success. 42 | * @param error callback on function error. 43 | */ 44 | export const setEnabled = ( 45 | isEnabled: boolean, 46 | success?: () => void, 47 | error?: (err: any) => void 48 | ) => { 49 | exec("IBGPlugin", "setBugReportingEnabled", [isEnabled], success, error); 50 | }; 51 | 52 | /** 53 | * Sets report type either bug, feedback or both. 54 | * @param reportTypes an array of reportType. 55 | * @param success callback on function success. 56 | * @param error callback on function error. 57 | */ 58 | export const setReportTypes = ( 59 | reportTypes: reportType[], 60 | success?: () => void, 61 | error?: (err: any) => void 62 | ) => { 63 | exec("IBGPlugin", "setReportTypes", [reportTypes], success, error); 64 | }; 65 | 66 | /** 67 | * Shows report view with specified options. 68 | * @param reportType an enum of reportType. 69 | * @param options an array of invocation option. 70 | * @param success callback on function success. 71 | * @param error callback on function error. 72 | */ 73 | export const showWithOptions = ( 74 | reportType: reportType, 75 | options: option[], 76 | success?: () => void, 77 | error?: (err: any) => void 78 | ) => { 79 | exec( 80 | "IBGPlugin", 81 | "showBugReportingWithReportTypeAndOptions", 82 | [reportType, options], 83 | success, 84 | error 85 | ); 86 | }; 87 | 88 | /** 89 | * Sets the invocation options. 90 | * Default is set by `Instabug.start`. 91 | * @param options an array of invocation option. 92 | * @param success callback on function success. 93 | * @param error callback on function error. 94 | */ 95 | export const setOptions = ( 96 | options: option[], 97 | success?: () => void, 98 | error?: (err: any) => void 99 | ) => { 100 | exec("IBGPlugin", "setInvocationOptions", [options], success, error); 101 | }; 102 | 103 | /** 104 | * Sets a block of code to be executed just before the SDK's UI is presented. 105 | * This block is executed on the UI thread. Could be used for performing any 106 | * UI changes before the SDK's UI is shown. 107 | * @param success callback on function success. 108 | * @param error callback on function error. 109 | */ 110 | export const setOnInvokeHandler = ( 111 | success: () => void, 112 | error?: (err: any) => void 113 | ) => { 114 | exec("IBGPlugin", "setPreInvocationHandler", [], success, error); 115 | }; 116 | 117 | /** 118 | * Sets a block of code to be executed right after the SDK's UI is dismissed. 119 | * This block is executed on the UI thread. Could be used for performing any 120 | * UI changes after the SDK's UI is dismissed. 121 | * @param success callback on function success; param includes reportType and dismissType. 122 | * @param error callback on function error. 123 | */ 124 | export const setOnDismissHandler = ( 125 | success: (data: { reportType: string; dismissType: string }) => void, 126 | error?: (err: any) => void 127 | ) => { 128 | exec("IBGPlugin", "setPostInvocationHandler", [], success, error); 129 | }; 130 | 131 | /** 132 | * Sets the events that will invoke the SDK. 133 | * @param events an array of invocationEvents. 134 | * @param success callback on function success. 135 | * @param error callback on function error. 136 | */ 137 | export const setInvocationEvents = ( 138 | events: invocationEvents[], 139 | success?: () => void, 140 | error?: (err: any) => void 141 | ) => { 142 | exec("IBGPlugin", "setInvocationEvents", [events], success, error); 143 | }; 144 | 145 | /** 146 | * Sets enabled types of attachments for bug reporting. 147 | * @param screenshot a boolean to enable/disable screenshot attachment. 148 | * @param extraScreenshot a boolean to enable/disable extra screenshot attachment. 149 | * @param galleryImage a boolean to enable/disable gallery image attachment. 150 | * @param screenRecording a boolean to enable/disable screen recording attachment. 151 | * @param success callback on function success. 152 | * @param error callback on function error. 153 | */ 154 | export const setEnabledAttachmentTypes = ( 155 | screenshot: boolean, 156 | extraScreenshot: boolean, 157 | galleryImage: boolean, 158 | screenRecording: boolean, 159 | success?: () => void, 160 | error?: (err: any) => void 161 | ) => { 162 | exec( 163 | "IBGPlugin", 164 | "setAttachmentTypesEnabled", 165 | [screenshot, extraScreenshot, galleryImage, screenRecording], 166 | success, 167 | error 168 | ); 169 | }; 170 | 171 | /** 172 | * 173 | * @param extendedBugReportMode an enum of extendedBugReportMode. 174 | * @param success callback on function success. 175 | * @param error callback on function error. 176 | */ 177 | export const setExtendedBugReportMode = ( 178 | extendedBugReportMode: extendedBugReportMode, 179 | success?: () => void, 180 | error?: (err: any) => void 181 | ) => { 182 | exec( 183 | "IBGPlugin", 184 | "setExtendedBugReportMode", 185 | [extendedBugReportMode], 186 | success, 187 | error 188 | ); 189 | }; 190 | 191 | /** 192 | * Sets the default edge and offset from the top at which the floating button 193 | * will be shown. Different orientations are already handled. 194 | * @param edge the position of the edge; the default is right. 195 | * @param offset the offset value from the top edge. 196 | * @param success callback on function success. 197 | * @param error callback on function error. 198 | */ 199 | export const setFloatingButtonEdge = ( 200 | edge: registry.floatingButtonEdge, 201 | offset: number, 202 | success?: () => void, 203 | error?: (err: any) => void 204 | ) => { 205 | exec("IBGPlugin", "setFloatingButtonEdge", [edge, offset], success, error); 206 | }; 207 | 208 | /** 209 | * Sets the threshold value of the shake gesture for iPhone/iPod Touch 210 | * Default for iPhone is 2.5. 211 | * @param threshold the shaking threshold for iPhone. 212 | * @param success callback on function success. 213 | * @param error callback on function error. 214 | */ 215 | export const setShakingThresholdForiPhone = ( 216 | threshold: number, 217 | success?: () => void, 218 | error?: (err: any) => void 219 | ) => { 220 | exec( 221 | "IBGPlugin", 222 | "setShakingThresholdForiPhone", 223 | [threshold], 224 | success, 225 | error 226 | ); 227 | }; 228 | 229 | /** 230 | * Sets the threshold value of the shake gesture for iPad. 231 | * Default for iPad is 0.6. 232 | * @param threshold the shaking threshold for iPad. 233 | * @param success callback on function success. 234 | * @param error callback on function error. 235 | */ 236 | export const setShakingThresholdForiPad = ( 237 | threshold: number, 238 | success?: () => void, 239 | error?: (err: any) => void 240 | ) => { 241 | exec( 242 | "IBGPlugin", 243 | "setShakingThresholdForiPad", 244 | [threshold], 245 | success, 246 | error 247 | ); 248 | }; 249 | 250 | /** 251 | * Sets the threshold value of the shake gesture for android devices. 252 | * Default for android is an integer value equals 350. 253 | * you could increase the shaking difficulty level by 254 | * increasing the `350` value and vice versa 255 | * @param threshold the shaking threshold for android devices. 256 | * @param success callback on function success. 257 | * @param error callback on function error. 258 | */ 259 | export const setShakingThresholdForAndroid = ( 260 | threshold: number, 261 | success?: () => void, 262 | error?: (err: any) => void 263 | ) => { 264 | exec("IBGPlugin", "setShakingThreshold", [threshold], success, error); 265 | }; 266 | 267 | /** 268 | * Sets the default position at which the Instabug screen recording button will be shown. 269 | * Different orientations are already handled. 270 | * (Default for `position` is `bottomRight`) 271 | * 272 | * @param position an enum of position to control the video recording button position on the screen. 273 | * @param success callback on function success. 274 | * @param error callback on function error. 275 | */ 276 | export const setVideoRecordingFloatingButtonPosition = ( 277 | position: registry.position, 278 | success?: () => void, 279 | error?: (err: any) => void 280 | ) => { 281 | exec( 282 | "IBGPlugin", 283 | "setVideoRecordingFloatingButtonPosition", 284 | [position], 285 | success, 286 | error 287 | ); 288 | }; 289 | 290 | /** 291 | * Adds a disclaimer text within the bug reporting form, which can include hyperlinked text. 292 | * @param text a String of the disclaimer text. 293 | * @param success callback on function success. 294 | * @param error callback on function error. 295 | */ 296 | export const setDisclaimerText = ( 297 | text: string, 298 | success?: () => void, 299 | error?: (err: any) => void 300 | ) => { 301 | exec("IBGPlugin", "setDisclaimerText", [text], success, error); 302 | }; 303 | 304 | /** 305 | * Sets a minimum number of characters as a requirement for the comments field in the different report types. 306 | * @param limit an integer number of characters. 307 | * @param reportTypes an optional an array of reportType. If it's not passed, the limit will apply to all report types. 308 | * @param success callback on function success. 309 | * @param error callback on function error. 310 | */ 311 | export const setCommentMinimumCharacterCount = ( 312 | limit: number, 313 | reportTypes?: reportType[], 314 | success?: () => void, 315 | error?: (err: any) => void 316 | ) => { 317 | exec("IBGPlugin", "setCommentMinimumCharacterCount", [limit, reportTypes], success, error); 318 | }; 319 | } 320 | export = BugReporting; 321 | -------------------------------------------------------------------------------- /src/modules/FeatureRequests.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Instabug Feature Requests module. 3 | */ 4 | 5 | import { exec } from "./IBGCordova"; 6 | 7 | namespace FeatureRequests { 8 | export enum actionTypes { 9 | requestNewFeature = "requestNewFeature", 10 | addCommentToFeature = "addCommentToFeature", 11 | } 12 | 13 | /** 14 | * Shows the UI for feature requests list. 15 | * @param success callback on function success. 16 | * @param error callback on function error. 17 | */ 18 | export const show = (success?: () => void, error?: (err: any) => void) => { 19 | exec("IBGPlugin", "showFeatureRequests", [], success, error); 20 | }; 21 | 22 | /** 23 | * Sets whether users are required to enter an email address or not when 24 | * sending reports. 25 | * Defaults to YES. 26 | * @param isRequired a boolean to indicate if email field is required. 27 | * @param actionTypes array of actionTypes. 28 | * @param success callback on function success. 29 | * @param error callback on function error. 30 | */ 31 | export const setEmailFieldRequired = ( 32 | isRequired: boolean, 33 | actionTypes: actionTypes[], 34 | success?: () => void, 35 | error?: (err: any) => void 36 | ) => { 37 | exec( 38 | "IBGPlugin", 39 | "setEmailFieldRequiredForFeatureRequests", 40 | [isRequired, actionTypes], 41 | success, 42 | error 43 | ); 44 | }; 45 | } 46 | export = FeatureRequests; 47 | -------------------------------------------------------------------------------- /src/modules/IBGCordova.ts: -------------------------------------------------------------------------------- 1 | export const exec = ( 2 | service: string, 3 | action: string, 4 | args?: any[], 5 | success?: (data: any) => any, 6 | fail?: (err: any) => any 7 | ) => { 8 | cordova.exec( 9 | success!, 10 | fail!, 11 | service, 12 | action, 13 | args 14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /src/modules/Instabug.ts: -------------------------------------------------------------------------------- 1 | import { exec } from "./IBGCordova"; 2 | import registry from "./ArgsRegistry"; 3 | import bugReporting from "./BugReporting"; 4 | import ArgsRegistry from "./ArgsRegistry"; 5 | 6 | namespace Instabug { 7 | export const welcomeMessageMode = registry.welcomeMessageMode; 8 | export const floatingButtonEdge = registry.floatingButtonEdge; 9 | export const colorTheme = registry.colorTheme; 10 | export const strings = registry.strings; 11 | export const reproStepsMode = registry.reproStepsMode; 12 | export const locale = registry.locale; 13 | 14 | /** 15 | * @deprecated This method is deprecated and will be removed in a future version. Use `init` instead. 16 | * Starts the SDK. 17 | * This is the main SDK method that does all the magic. This is the only 18 | * method that SHOULD be called. 19 | * Should be called in constructor of the AppRegistry component 20 | * 21 | * @param token the token that identifies the app, you can find 22 | * it on your dashboard. 23 | * @param invocationEvents an array of invocationEvents that invoke 24 | * the SDK's UI. 25 | * @param success callback on function success. 26 | * @param error callback on function error. 27 | */ 28 | export const start = ( 29 | token: string, 30 | invocationEvents: bugReporting.invocationEvents[], 31 | success?: () => void, 32 | error?: (err: any) => void 33 | ) => { 34 | exec("IBGPlugin", "start", [token, invocationEvents], success, error); 35 | }; 36 | 37 | /** 38 | * Initializes the Instabug SDK with additional configurations. 39 | * 40 | * @param token The token that identifies the app, available on your dashboard. 41 | * @param invocationEvents An array of invocation events that trigger the SDK's UI. 42 | * @param logLevel The level of detail in logs that you want to print. 43 | * @param success Callback on function success. 44 | * @param error Callback on function error. 45 | */ 46 | export const init = ( 47 | token: string, 48 | invocationEvents: bugReporting.invocationEvents[], 49 | logLevel: ArgsRegistry.logLeve, 50 | success?: () => void, 51 | error?: (err: any) => void 52 | ) => { 53 | exec( 54 | "IBGPlugin", // Plugin name 55 | "init", // Action name 56 | [token, invocationEvents, logLevel], // Arguments 57 | success, 58 | error 59 | ); 60 | }; 61 | 62 | /** 63 | * Shows default Instabug prompt. 64 | * 65 | * @param success callback on function success. 66 | * @param error callback on function error. 67 | */ 68 | export const show = (success?: () => void, error?: (err: any) => void) => { 69 | exec("IBGPlugin", "show", [], success, error); 70 | }; 71 | 72 | /** 73 | * Sets the primary color of the SDK's UI. 74 | * Sets the color of UI elements indicating interactivity or call to action. 75 | * To use, import processColor and pass to it with argument the color hex 76 | * as argument. 77 | * 78 | * @param color a color hex to set the UI elements of the SDK to. 79 | * @param success callback on function success. 80 | * @param error callback on function error. 81 | */ 82 | export const setPrimaryColor = ( 83 | color: string, 84 | success?: () => void, 85 | error?: (err: any) => void 86 | ) => { 87 | exec("IBGPlugin", "setPrimaryColor", [color], success, error); 88 | }; 89 | 90 | /** 91 | * Logs a user event that happens through the lifecycle of the application. 92 | * Logged user events are going to be sent with each report, as well as at the end of a session. 93 | * 94 | * @param userEvent the user event name. 95 | * @param success callback on function success. 96 | * @param error callback on function error. 97 | */ 98 | export const logUserEventWithName = ( 99 | userEvent: string, 100 | success?: () => void, 101 | error?: (err: any) => void 102 | ) => { 103 | exec("IBGPlugin", "logUserEventWithName", [userEvent], success, error); 104 | }; 105 | 106 | /** 107 | * Sets whether user steps tracking is visual, non visual or disabled. 108 | * User Steps tracking is enabled by default if it's available 109 | * in your current plan. 110 | * 111 | * @deprecated This method is deprecated and will be removed in a future version. 112 | * Use `setReproStepsConfig` instead. 113 | * 114 | * @param reproStepsMode an enum to set user steps tracking 115 | * to be enabled, non visual or disabled. 116 | * @param success callback on function success. 117 | * @param error callback on function error. 118 | */ 119 | export const setReproStepsMode = ( 120 | reproStepsMode: registry.reproStepsMode | `${registry.reproStepsMode}`, 121 | success?: () => void, 122 | error?: (err: any) => void 123 | ) => { 124 | exec("IBGPlugin", "setReproStepsMode", [reproStepsMode], success, error); 125 | }; 126 | 127 | /** 128 | * Configures user steps tracking for bug, crash, and session replay issue types separately. 129 | * User Steps tracking is enabled by default if it's available 130 | * in your current plan. 131 | * 132 | * @param bugMode an enum to set user steps tracking for bug issues. 133 | * @param crashMode an enum to set user steps tracking for crash issues. 134 | * @param success callback on function success. 135 | * @param error callback on function error. 136 | */ 137 | export const setReproStepsConfig = ( 138 | bugMode: registry.reproStepsMode | `${registry.reproStepsMode}`, 139 | crashMode: registry.reproStepsMode | `${registry.reproStepsMode}`, 140 | success?: () => void, 141 | error?: (err: any) => void 142 | ) => { 143 | exec("IBGPlugin", "setReproStepsConfig", [bugMode, crashMode], success, error); 144 | }; 145 | 146 | /** 147 | * The session profiler is enabled by default and it attaches to the bug and 148 | * crash reports the following information during the last 60 seconds before the report is sent. 149 | * @param isEnabled a boolean to enable or disable the feature. 150 | * @param success callback on function success. 151 | * @param error callback on function error. 152 | */ 153 | export const setSessionProfilerEnabled = ( 154 | isEnabled: boolean, 155 | success?: () => void, 156 | error?: (err: any) => void 157 | ) => { 158 | exec("IBGPlugin", "setSessionProfilerEnabled", [isEnabled], success, error); 159 | }; 160 | 161 | /** 162 | * Sets the welcome message mode to live, beta or disabled. 163 | * @param mode an enum to set the welcome message mode. 164 | * @param success callback on function success. 165 | * @param error callback on function error. 166 | */ 167 | export const setWelcomeMessageMode = ( 168 | mode: registry.welcomeMessageMode, 169 | success?: () => void, 170 | error?: (err: any) => void 171 | ) => { 172 | exec("IBGPlugin", "setWelcomeMessageMode", [mode], success, error); 173 | }; 174 | 175 | /** 176 | * Shows the welcome message in a specific mode. 177 | * @param mode an enum to set the mode to show the welcome message with. 178 | * @param success callback on function success. 179 | * @param error callback on function error. 180 | */ 181 | export const showWelcomeMessage = ( 182 | mode: registry.welcomeMessageMode, 183 | success?: () => void, 184 | error?: (err: any) => void 185 | ) => { 186 | exec("IBGPlugin", "showWelcomeMessage", [mode], success, error); 187 | }; 188 | 189 | /** 190 | * Attaches user data to each report being sent. 191 | * Each call to this method overrides the user data to be attached. 192 | * Maximum size of the string is 1,000 characters. 193 | * 194 | * @param data a string to be attached to each report, with a 195 | * maximum size of 1,000 characters. 196 | * @param success callback on function success. 197 | * @param error callback on function error. 198 | */ 199 | export const setUserData = ( 200 | data: string, 201 | success?: () => void, 202 | error?: (err: any) => void 203 | ) => { 204 | exec("IBGPlugin", "setUserData", [data], success, error); 205 | }; 206 | 207 | /** 208 | * Add file to be attached to the bug report. 209 | * 210 | * @param filePath the path of the file to be attached. 211 | * @param success callback on function success. 212 | * @param error callback on function error. 213 | */ 214 | export const addFile = ( 215 | filePath: string, 216 | success?: () => void, 217 | error?: (err: any) => void 218 | ) => { 219 | exec("IBGPlugin", "addFile", [filePath], success, error); 220 | }; 221 | 222 | /** 223 | * Appends a log message to Instabug internal log 224 | *

225 | * These logs are then sent along the next uploaded report. 226 | * All log messages are timestamped
227 | * Logs aren't cleared per single application run. 228 | * If you wish to reset the logs, 229 | * use {@link #clearLogs()} ()} 230 | *

231 | * Note: logs passed to this method are NOT printed to Logcat 232 | * 233 | * @param message the log message. 234 | * @param success callback on function success. 235 | * @param error callback on function error. 236 | */ 237 | export const addLog = ( 238 | message: string, 239 | success?: () => void, 240 | error?: (err: any) => void 241 | ) => { 242 | exec("IBGPlugin", "addLog", [message], success, error); 243 | }; 244 | 245 | /** 246 | * Clear all Instabug logs, console logs, network logs and user steps. 247 | * 248 | * @param success callback on function success. 249 | * @param error callback on function error. 250 | */ 251 | export const clearLog = ( 252 | success?: () => void, 253 | error?: (err: any) => void 254 | ) => { 255 | exec("IBGPlugin", "clearLog", [], success, error); 256 | }; 257 | 258 | /** 259 | * Sets whether IBGLog should also print to Xcode's console log or not. 260 | * 261 | * @param isEnabled a boolean to set whether printing to 262 | * Xcode's console is enabled or not. 263 | * @param success callback on function success. 264 | * @param error callback on function error. 265 | */ 266 | export const setIBGLogPrintsToConsole = ( 267 | isEnabled: boolean, 268 | success?: () => void, 269 | error?: (err: any) => void 270 | ) => { 271 | exec("IBGPlugin", "setIBGLogPrintsToConsole", [isEnabled], success, error); 272 | }; 273 | 274 | /** 275 | * Disables all Instabug functionality 276 | * It works on android only 277 | * 278 | * @param success callback on function success. 279 | * @param error callback on function error. 280 | */ 281 | export const disable = (success?: () => void, error?: (err: any) => void) => { 282 | exec("IBGPlugin", "disable", [], success, error); 283 | }; 284 | 285 | /** 286 | * Enables all Instabug functionality 287 | * It works on android only 288 | * 289 | * @param success callback on function success. 290 | * @param error callback on function error. 291 | */ 292 | export const enable = (success?: () => void, error?: (err: any) => void) => { 293 | exec("IBGPlugin", "enable", [], success, error); 294 | }; 295 | 296 | /** 297 | * Gets a boolean indicating whether the SDK is enabled or not 298 | * It works on android only 299 | * 300 | * @param success callback on function success. 301 | * @param error callback on function error. 302 | */ 303 | export const isEnabled = ( 304 | success: (isEnabled: boolean) => void, 305 | error?: (err: any) => void 306 | ) => { 307 | exec("IBGPlugin", "getIsEnabled", [], success, error); 308 | }; 309 | 310 | /** 311 | * Sets user attribute to overwrite it's value or create a new one if it doesn't exist. 312 | * 313 | * @param key the attribute key. 314 | * @param value the attribute value. 315 | * @param success callback on function success. 316 | * @param error callback on function error. 317 | */ 318 | export const setUserAttribute = ( 319 | key: string, 320 | value: string, 321 | success?: () => void, 322 | error?: (err: any) => void 323 | ) => { 324 | exec("IBGPlugin", "setUserAttribute", [key, value], success, error); 325 | }; 326 | 327 | /** 328 | * Removes user attribute if exists. 329 | * 330 | * @param key the attribute key as string. 331 | * @param success callback on function success. 332 | * @param error callback on function error. 333 | */ 334 | export const removeUserAttribute = ( 335 | key: string, 336 | success?: () => void, 337 | error?: (err: any) => void 338 | ) => { 339 | exec("IBGPlugin", "removeUserAttribute", [key], success, error); 340 | }; 341 | 342 | /** 343 | * Returns all user attributes. 344 | * 345 | * @param success callback on function success. 346 | * @param error callback on function error. 347 | */ 348 | export const getAllUserAttributes = function ( 349 | success: (userAttributes: { key: string; value: string }[]) => void, 350 | error?: (err: any) => void 351 | ) { 352 | exec("IBGPlugin", "getAllUserAttributes", [], success, error); 353 | }; 354 | 355 | /** 356 | * Returns the user attribute associated with a given key. 357 | * 358 | * @param key the attribute key as string. 359 | * @param success callback on function success. 360 | * @param error callback on function error. 361 | */ 362 | export const getUserAttribute = ( 363 | key: string, 364 | success: (value: string) => void, 365 | error?: (err: any) => void 366 | ) => { 367 | exec("IBGPlugin", "getUserAttribute", [key], success, error); 368 | }; 369 | 370 | /** 371 | * Sets the default value of the user's email and hides the email field from the reporting UI 372 | * and set the user's name to be included with all reports. 373 | * It also reset the chats on device to that email and removes user attributes, 374 | * user data and completed surveys. 375 | * 376 | * @param email the email address to be set as the user's email. 377 | * @param name the name of the user to be set. 378 | * @param success callback on function success. 379 | * @param error callback on function error. 380 | */ 381 | export const identifyUserWithEmail = ( 382 | email: string, 383 | name: string, 384 | success?: () => void, 385 | error?: (err: any) => void 386 | ) => { 387 | exec("IBGPlugin", "identifyUserWithEmail", [email, name], success, error); 388 | }; 389 | 390 | export const setPreSendingHandler = ( 391 | success: () => void, 392 | error?: (err: any) => void 393 | ) => { 394 | exec("IBGPlugin", "setPreSendingHandler", [], success, error); 395 | }; 396 | 397 | /** 398 | * Sets the default value of the user's email to nil and show email field and remove user name 399 | * from all reports 400 | * It also reset the chats on device and removes user attributes, user data and completed surveys. 401 | * 402 | * @param success callback on function success. 403 | * @param error callback on function error. 404 | */ 405 | export const logOut = (success?: () => void, error?: (err: any) => void) => { 406 | exec("IBGPlugin", "logOut", [], success, error); 407 | }; 408 | 409 | /** 410 | * Sets the SDK's locale. 411 | * Use to change the SDK's UI to different language. 412 | * Defaults to the device's current locale. 413 | * 414 | * @param locale a locale to set the SDK to. 415 | * @param success callback on function success. 416 | * @param error callback on function error. 417 | */ 418 | export const setLocale = ( 419 | locale: registry.locale | `${registry.locale}`, 420 | success?: () => void, 421 | error?: (err: any) => void 422 | ) => { 423 | exec("IBGPlugin", "setLocale", [locale], success, error); 424 | }; 425 | 426 | /** 427 | * Sets SDK color theme. 428 | * 429 | * @param theme the color theme to set the SDK UI to. 430 | * @param success callback on function success. 431 | * @param error callback on function error. 432 | */ 433 | export const setColorTheme = ( 434 | theme: registry.colorTheme, 435 | success?: () => void, 436 | error?: (err: any) => void 437 | ) => { 438 | exec("IBGPlugin", "setColorTheme", [theme], success, error); 439 | }; 440 | 441 | /** 442 | * Overrides any of the strings shown in the SDK with custom ones. 443 | * Allows you to customize any of the strings shown to users in the SDK. 444 | * @param key the key of the string to override. 445 | * @param value the string value to override the default one. 446 | * @param success callback on function success. 447 | * @param error callback on function error. 448 | */ 449 | export const setString = ( 450 | key: registry.strings, 451 | value: string, 452 | success?: () => void, 453 | error?: (err: any) => void 454 | ) => { 455 | exec("IBGPlugin", "setString", [key, value], success, error); 456 | }; 457 | } 458 | export = Instabug; 459 | -------------------------------------------------------------------------------- /src/modules/Replies.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Instabug Replies module. 3 | */ 4 | 5 | import { exec } from "./IBGCordova"; 6 | 7 | namespace Replies { 8 | /** 9 | * Enables or disables all replies functionalities. 10 | * @param isEnabled a boolean to enable or disable the feature. 11 | * @param success callback on function success. 12 | * @param error callback on function error. 13 | */ 14 | export const setEnabled = ( 15 | isEnabled: boolean, 16 | success?: () => void, 17 | error?: (err: any) => void 18 | ) => { 19 | exec("IBGPlugin", "setRepliesEnabled", [isEnabled], success, error); 20 | }; 21 | 22 | /** 23 | * Shows replies. 24 | * @param success callback on function success. 25 | * @param error callback on function error. 26 | */ 27 | export const show = (success?: () => void, error?: (err: any) => void) => { 28 | exec("IBGPlugin", "showReplies", [], success, error); 29 | }; 30 | 31 | /** 32 | * Calls success callback if chats exist. 33 | * @param success callback on function success. 34 | * @param error callback on function error. 35 | */ 36 | export const hasChats = ( 37 | success: () => void, 38 | error?: (err: any) => void 39 | ) => { 40 | exec("IBGPlugin", "hasChats", [], success, error); 41 | }; 42 | 43 | /** 44 | * Returns the number of unread replies for the user. 45 | * @param success callback on function success. 46 | * @param error callback on function error. 47 | */ 48 | export const getUnreadRepliesCount = ( 49 | success: (repliesCount: number) => void, 50 | error?: (err: any) => void 51 | ) => { 52 | exec("IBGPlugin", "getUnreadRepliesCount", [], success, error); 53 | }; 54 | 55 | /** 56 | * Enables in app notifications for any new reply received. 57 | * @param isEnabled a boolean to enable or disable in-app notifications. 58 | * @param success callback on function success. 59 | * @param error callback on function error. 60 | */ 61 | export const setInAppNotificationEnabled = ( 62 | isEnabled: boolean, 63 | success?: () => void, 64 | error?: (err: any) => void 65 | ) => { 66 | exec( 67 | "IBGPlugin", 68 | "setChatNotificationEnabled", 69 | [isEnabled], 70 | success, 71 | error 72 | ); 73 | }; 74 | } 75 | export = Replies; 76 | -------------------------------------------------------------------------------- /src/modules/Surveys.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Instabug Surveys module. 3 | */ 4 | 5 | import { exec } from "./IBGCordova"; 6 | 7 | namespace Surveys { 8 | /** 9 | * Sets whether auto surveys showing are enabled or not. 10 | * @param autoShowingSurveysEnabled a boolean for whether to auto show a survey. 11 | * @param success callback on function success. 12 | * @param error callback on function error. 13 | */ 14 | export const setAutoShowingEnabled = ( 15 | autoShowingSurveysEnabled: boolean, 16 | success?: () => void, 17 | error?: (err: any) => void 18 | ) => { 19 | exec( 20 | "IBGPlugin", 21 | "setAutoShowingSurveysEnabled", 22 | [autoShowingSurveysEnabled], 23 | success, 24 | error 25 | ); 26 | }; 27 | 28 | /** 29 | * Sets whether surveys are enabled or not. 30 | * If you disable surveys on the SDK but still have active surveys on your Instabug dashboard, 31 | * those surveys are still going to be sent to the device, but are not going to be 32 | * shown automatically. 33 | * To manually display any available surveys, call `Instabug.showSurveyIfAvailable()`. 34 | * Defaults to `true`. 35 | * @param isEnabled a boolean to enable or disable the feature. 36 | * @param success callback on function success. 37 | * @param error callback on function error. 38 | */ 39 | export const setEnabled = ( 40 | isEnabled: boolean, 41 | success?: () => void, 42 | error?: (err: any) => void 43 | ) => { 44 | exec("IBGPlugin", "setSurveysEnabled", [isEnabled], success, error); 45 | }; 46 | 47 | /** 48 | * Shows one of the surveys that were not shown before, that also have conditions 49 | * that match the current device/user. 50 | * Does nothing if there are no available surveys or if a survey has already been shown 51 | * in the current session. 52 | * @param success callback on function success. 53 | * @param error callback on function error. 54 | */ 55 | export const showSurveyIfAvailable = ( 56 | success?: () => void, 57 | error?: (err: any) => void 58 | ) => { 59 | exec("IBGPlugin", "showSurveyIfAvailable", [], success, error); 60 | }; 61 | 62 | /** 63 | * Sets a block of code to be executed just before the survey's UI is presented. 64 | * This block is executed on the UI thread. Could be used for performing any UI changes before 65 | * the survey's UI is shown. 66 | * @param success callback on function success. 67 | * @param error callback on function error. 68 | */ 69 | export const setOnShowHandler = ( 70 | success: () => void, 71 | error?: (err: any) => void 72 | ) => { 73 | exec("IBGPlugin", "willShowSurveyHandler", [], success, error); 74 | }; 75 | 76 | /** 77 | * Sets a block of code to be executed right after the survey's UI is dismissed. 78 | * This block is executed on the UI thread. Could be used for performing any UI 79 | * changes after the survey's UI is dismissed. 80 | * @param success callback on function success. 81 | * @param error callback on function error. 82 | */ 83 | export const setOnDismissHandler = ( 84 | success: () => void, 85 | error?: (err: any) => void 86 | ) => { 87 | exec("IBGPlugin", "didDismissSurveyHandler", [], success, error); 88 | }; 89 | 90 | /** 91 | * Shows survey with a specific token. 92 | * Does nothing if there are no available surveys with that specific token. 93 | * Answered and cancelled surveys won't show up again. 94 | * @param surveyToken a string with a survey token. 95 | * @param success callback on function success. 96 | * @param error callback on function error. 97 | */ 98 | export const showSurveyWithToken = ( 99 | surveyToken: string, 100 | success?: () => void, 101 | error?: (err: any) => void 102 | ) => { 103 | exec("IBGPlugin", "showSurveyWithToken", [surveyToken], success, error); 104 | }; 105 | 106 | /** 107 | * Returns true if the survey with a specific token was answered before. 108 | * Will return false if the token does not exist or if the survey was not answered before. 109 | * @param surveyToken a string with a survey token. 110 | * @param success callback on function success. 111 | * @param error callback on function error. 112 | */ 113 | export const hasRespondedToSurveyWithToken = ( 114 | surveyToken: string, 115 | success: (hasResponded: boolean) => void, 116 | error?: (err: any) => void 117 | ) => { 118 | exec( 119 | "IBGPlugin", 120 | "hasRespondedToSurveyWithToken", 121 | [surveyToken], 122 | success, 123 | error 124 | ); 125 | }; 126 | 127 | /** 128 | * Returns an array containing the available surveys. 129 | * @param success callback on function success. 130 | * @param error callback on function error. 131 | */ 132 | export const getAvailableSurveys = ( 133 | success: (availableSurveys: string[]) => void, 134 | error?: (err: any) => void 135 | ) => { 136 | exec("IBGPlugin", "getAvailableSurveys", [], success, error); 137 | }; 138 | 139 | /** 140 | * Setting an option for all the surveys to show a welcome screen before 141 | * the user starts taking the survey. 142 | * @param shouldShowWelcomeScreen a boolean to control whether the welcome screen should show. 143 | * @param success callback on function success. 144 | * @param error callback on function error. 145 | */ 146 | export const setShouldShowSurveysWelcomeScreen = ( 147 | shouldShowWelcomeScreen: boolean, 148 | success?: () => void, 149 | error?: (err: any) => void 150 | ) => { 151 | exec( 152 | "IBGPlugin", 153 | "setShouldShowSurveysWelcomeScreen", 154 | [shouldShowWelcomeScreen], 155 | success, 156 | error 157 | ); 158 | }; 159 | } 160 | export = Surveys; 161 | -------------------------------------------------------------------------------- /src/modules/index.ts: -------------------------------------------------------------------------------- 1 | import Instabug from "./Instabug"; 2 | import BugReporting from "./BugReporting"; 3 | import FeatureRequests from "./FeatureRequests"; 4 | import Replies from "./Replies"; 5 | import Surveys from "./Surveys"; 6 | 7 | export = { Instabug, BugReporting, FeatureRequests, Surveys, Replies }; 8 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "rootDir": "./src/modules", 6 | "strict": true, 7 | "declaration": true, 8 | "outDir": "www", 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "skipLibCheck": true 12 | }, 13 | "include": ["src/modules/*.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/cordova@^0.0.34": 6 | "integrity" "sha512-rkiiTuf/z2wTd4RxFOb+clE7PF4AEJU0hsczbUdkHHBtkUmpWQpEddynNfJYKYtZFJKbq4F+brfekt1kx85IZA==" 7 | "resolved" "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz" 8 | "version" "0.0.34" 9 | 10 | "typescript@^4.8.2": 11 | "integrity" "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==" 12 | "resolved" "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz" 13 | "version" "4.8.2" 14 | --------------------------------------------------------------------------------