diff --git a/.gitignore b/.gitignore index a5892e8..e739a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,27 @@ android/.DS_Store ios/.DS_Store -build/ \ No newline at end of file +build/ +/android/src/main/java/com/instabug/reactlibrary/wrappedAPIs + +# Xcode + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + + +*node_modules/ +*Pods/ +*Podfile.lock diff --git a/.npmignore b/.npmignore index 4c34f82..a8bf30a 100644 --- a/.npmignore +++ b/.npmignore @@ -11,4 +11,4 @@ android/local.properties ios/.DS_Store build/ - +InstabugSample diff --git a/InstabugSample/.babelrc b/InstabugSample/.babelrc new file mode 100644 index 0000000..8df53fe --- /dev/null +++ b/InstabugSample/.babelrc @@ -0,0 +1,3 @@ +{ +"presets": ["react-native"] +} \ No newline at end of file diff --git a/InstabugSample/.buckconfig b/InstabugSample/.buckconfig new file mode 100644 index 0000000..934256c --- /dev/null +++ b/InstabugSample/.buckconfig @@ -0,0 +1,6 @@ + +[android] + target = Google Inc.:Google APIs:23 + +[maven_repositories] + central = https://repo1.maven.org/maven2 diff --git a/InstabugSample/.flowconfig b/InstabugSample/.flowconfig new file mode 100644 index 0000000..b38ea97 --- /dev/null +++ b/InstabugSample/.flowconfig @@ -0,0 +1,44 @@ +[ignore] +; We fork some components by platform +.*/*[.]android.js + +; Ignore "BUCK" generated dirs +/\.buckd/ + +; Ignore unexpected extra "@providesModule" +.*/node_modules/.*/node_modules/fbjs/.* + +; Ignore duplicate module providers +; For RN Apps installed via npm, "Libraries" folder is inside +; "node_modules/react-native" but in the source repo it is in the root +.*/Libraries/react-native/React.js +.*/Libraries/react-native/ReactNative.js + +[include] + +[libs] +node_modules/react-native/Libraries/react-native/react-native-interface.js +node_modules/react-native/flow +flow/ + +[options] +module.system=haste + +experimental.strict_type_args=true + +munge_underscores=true + +module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' + +suppress_type=$FlowIssue +suppress_type=$FlowFixMe +suppress_type=$FixMe + +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-7]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-7]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy + +unsafe.enable_getters_and_setters=true + +[version] +^0.37.0 diff --git a/InstabugSample/.gitattributes b/InstabugSample/.gitattributes new file mode 100644 index 0000000..d42ff18 --- /dev/null +++ b/InstabugSample/.gitattributes @@ -0,0 +1 @@ +*.pbxproj -text diff --git a/InstabugSample/.gitignore b/InstabugSample/.gitignore new file mode 100644 index 0000000..8fce639 --- /dev/null +++ b/InstabugSample/.gitignore @@ -0,0 +1,54 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +project.xcworkspace + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +android/app/libs +*.keystore + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots diff --git a/InstabugSample/.watchmanconfig b/InstabugSample/.watchmanconfig new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/InstabugSample/.watchmanconfig @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/InstabugSample/__tests__/index.android.js b/InstabugSample/__tests__/index.android.js new file mode 100644 index 0000000..b49b908 --- /dev/null +++ b/InstabugSample/__tests__/index.android.js @@ -0,0 +1,12 @@ +import 'react-native'; +import React from 'react'; +import Index from '../index.android.js'; + +// Note: test renderer must be required after react-native. +import renderer from 'react-test-renderer'; + +it('renders correctly', () => { + const tree = renderer.create( + + ); +}); diff --git a/InstabugSample/__tests__/index.ios.js b/InstabugSample/__tests__/index.ios.js new file mode 100644 index 0000000..ba7c5b5 --- /dev/null +++ b/InstabugSample/__tests__/index.ios.js @@ -0,0 +1,12 @@ +import 'react-native'; +import React from 'react'; +import Index from '../index.ios.js'; + +// Note: test renderer must be required after react-native. +import renderer from 'react-test-renderer'; + +it('renders correctly', () => { + const tree = renderer.create( + + ); +}); diff --git a/InstabugSample/android/app/BUCK b/InstabugSample/android/app/BUCK new file mode 100644 index 0000000..8fdad0a --- /dev/null +++ b/InstabugSample/android/app/BUCK @@ -0,0 +1,66 @@ +import re + +# To learn about Buck see [Docs](https://buckbuild.com/). +# To run your application with Buck: +# - install Buck +# - `npm start` - to start the packager +# - `cd android` +# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` +# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck +# - `buck install -r android/app` - compile, install and run application +# + +lib_deps = [] +for jarfile in glob(['libs/*.jar']): + name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) + lib_deps.append(':' + name) + prebuilt_jar( + name = name, + binary_jar = jarfile, + ) + +for aarfile in glob(['libs/*.aar']): + name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) + lib_deps.append(':' + name) + android_prebuilt_aar( + name = name, + aar = aarfile, + ) + +android_library( + name = 'all-libs', + exported_deps = lib_deps +) + +android_library( + name = 'app-code', + srcs = glob([ + 'src/main/java/**/*.java', + ]), + deps = [ + ':all-libs', + ':build_config', + ':res', + ], +) + +android_build_config( + name = 'build_config', + package = 'com.instabugsample', +) + +android_resource( + name = 'res', + res = 'src/main/res', + package = 'com.instabugsample', +) + +android_binary( + name = 'app', + package_type = 'debug', + manifest = 'src/main/AndroidManifest.xml', + keystore = '//android/keystores:debug', + deps = [ + ':app-code', + ], +) diff --git a/InstabugSample/android/app/build.gradle b/InstabugSample/android/app/build.gradle new file mode 100644 index 0000000..1bbfdbf --- /dev/null +++ b/InstabugSample/android/app/build.gradle @@ -0,0 +1,144 @@ +apply plugin: "com.android.application" + +import com.android.build.OutputFile + +/** + * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets + * and bundleReleaseJsAndAssets). + * These basically call `react-native bundle` with the correct arguments during the Android build + * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the + * bundle directly from the development server. Below you can see all the possible configurations + * and their defaults. If you decide to add a configuration block, make sure to add it before the + * `apply from: "../../node_modules/react-native/react.gradle"` line. + * + * project.ext.react = [ + * // the name of the generated asset file containing your JS bundle + * bundleAssetName: "index.android.bundle", + * + * // the entry file for bundle generation + * entryFile: "index.android.js", + * + * // whether to bundle JS and assets in debug mode + * bundleInDebug: false, + * + * // whether to bundle JS and assets in release mode + * bundleInRelease: true, + * + * // whether to bundle JS and assets in another build variant (if configured). + * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants + * // The configuration property can be in the following formats + * // 'bundleIn${productFlavor}${buildType}' + * // 'bundleIn${buildType}' + * // bundleInFreeDebug: true, + * // bundleInPaidRelease: true, + * // bundleInBeta: true, + * + * // the root of your project, i.e. where "package.json" lives + * root: "../../", + * + * // where to put the JS bundle asset in debug mode + * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", + * + * // where to put the JS bundle asset in release mode + * jsBundleDirRelease: "$buildDir/intermediates/assets/release", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in debug mode + * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in release mode + * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", + * + * // by default the gradle tasks are skipped if none of the JS files or assets change; this means + * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to + * // date; if you have any other folders that you want to ignore for performance reasons (gradle + * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ + * // for example, you might want to remove it from here. + * inputExcludes: ["android/**", "ios/**"], + * + * // override which node gets called and with what additional arguments + * nodeExecutableAndArgs: ["node"] + * + * // supply additional arguments to the packager + * extraPackagerArgs: [] + * ] + */ + +apply from: "../../node_modules/react-native/react.gradle" + +/** + * Set this to true to create two separate APKs instead of one: + * - An APK that only works on ARM devices + * - An APK that only works on x86 devices + * The advantage is the size of the APK is reduced by about 4MB. + * Upload all the APKs to the Play Store and people will download + * the correct one based on the CPU architecture of their device. + */ +def enableSeparateBuildPerCPUArchitecture = false + +/** + * Run Proguard to shrink the Java bytecode in release builds. + */ +def enableProguardInReleaseBuilds = false + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + applicationId "com.instabugsample" + minSdkVersion 16 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + ndk { + abiFilters "armeabi-v7a", "x86" + } + } + splits { + abi { + reset() + enable enableSeparateBuildPerCPUArchitecture + universalApk false // If true, also generate a universal APK + include "armeabi-v7a", "x86" + } + } + buildTypes { + release { + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + } + } + // applicationVariants are e.g. debug, release + applicationVariants.all { variant -> + variant.outputs.each { output -> + // For each separate APK per architecture, set a unique version code as described here: + // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits + def versionCodes = ["armeabi-v7a":1, "x86":2] + def abi = output.getFilter(OutputFile.ABI) + if (abi != null) { // null for the universal-debug, universal-release variants + output.versionCodeOverride = + versionCodes.get(abi) * 1048576 + defaultConfig.versionCode + } + } + } + repositories { + maven { url "https://jitpack.io" } + } +} + +dependencies { + compile project(':instabug-reactnative') + compile project(':react-native-dialogs') + compile fileTree(dir: "libs", include: ["*.jar"]) + compile "com.android.support:appcompat-v7:23.0.1" + compile "com.facebook.react:react-native:+" // From node_modules +} + +// Run this once to be able to run the application with BUCK +// puts all compile dependencies into folder libs for BUCK to use +task copyDownloadableDepsToLibs(type: Copy) { + from configurations.compile + into 'libs' +} diff --git a/InstabugSample/android/app/proguard-rules.pro b/InstabugSample/android/app/proguard-rules.pro new file mode 100644 index 0000000..48361a9 --- /dev/null +++ b/InstabugSample/android/app/proguard-rules.pro @@ -0,0 +1,66 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Disabling obfuscation is useful if you collect stack traces from production crashes +# (unless you are using a system that supports de-obfuscate the stack traces). +-dontobfuscate + +# React Native + +# Keep our interfaces so they can be used by other ProGuard rules. +# See http://sourceforge.net/p/proguard/bugs/466/ +-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip +-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters +-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip + +# Do not strip any method/class that is annotated with @DoNotStrip +-keep @com.facebook.proguard.annotations.DoNotStrip class * +-keep @com.facebook.common.internal.DoNotStrip class * +-keepclassmembers class * { + @com.facebook.proguard.annotations.DoNotStrip *; + @com.facebook.common.internal.DoNotStrip *; +} + +-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { + void set*(***); + *** get*(); +} + +-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } +-keep class * extends com.facebook.react.bridge.NativeModule { *; } +-keepclassmembers,includedescriptorclasses class * { native ; } +-keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } + +-dontwarn com.facebook.react.** + +# okhttp + +-keepattributes Signature +-keepattributes *Annotation* +-keep class okhttp3.** { *; } +-keep interface okhttp3.** { *; } +-dontwarn okhttp3.** + +# okio + +-keep class sun.misc.Unsafe { *; } +-dontwarn java.nio.file.* +-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement +-dontwarn okio.** diff --git a/InstabugSample/android/app/src/main/AndroidManifest.xml b/InstabugSample/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f1a300b --- /dev/null +++ b/InstabugSample/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + diff --git a/InstabugSample/android/app/src/main/java/com/instabugsample/MainActivity.java b/InstabugSample/android/app/src/main/java/com/instabugsample/MainActivity.java new file mode 100644 index 0000000..84c52dc --- /dev/null +++ b/InstabugSample/android/app/src/main/java/com/instabugsample/MainActivity.java @@ -0,0 +1,15 @@ +package com.instabugsample; + +import com.facebook.react.ReactActivity; + +public class MainActivity extends ReactActivity { + + /** + * Returns the name of the main component registered from JavaScript. + * This is used to schedule rendering of the component. + */ + @Override + protected String getMainComponentName() { + return "InstabugSample"; + } +} diff --git a/InstabugSample/android/app/src/main/java/com/instabugsample/MainApplication.java b/InstabugSample/android/app/src/main/java/com/instabugsample/MainApplication.java new file mode 100644 index 0000000..c4f121e --- /dev/null +++ b/InstabugSample/android/app/src/main/java/com/instabugsample/MainApplication.java @@ -0,0 +1,48 @@ +package com.instabugsample; + +import android.app.Application; +import android.util.Log; + +import com.facebook.react.ReactApplication; +import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage; +import com.instabug.reactlibrary.RNInstabugReactnativePackage; +import com.facebook.react.ReactInstanceManager; +import com.facebook.react.ReactNativeHost; +import com.facebook.react.ReactPackage; +import com.facebook.react.shell.MainReactPackage; +import com.facebook.soloader.SoLoader; + +import java.util.Arrays; +import java.util.List; + +public class MainApplication extends Application implements ReactApplication { + + private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { + @Override + public boolean getUseDeveloperSupport() { + return BuildConfig.DEBUG; + } + + @Override + protected List getPackages() { + return Arrays.asList( + new MainReactPackage(), + new ReactNativeDialogsPackage(), + new RNInstabugReactnativePackage("YOUR_ANDROID_APPLICATION_TOKEN", + MainApplication.this,"button") + + ); + } + }; + + @Override + public ReactNativeHost getReactNativeHost() { + return mReactNativeHost; + } + + @Override + public void onCreate() { + super.onCreate(); + SoLoader.init(this, /* native exopackage */ false); + } +} diff --git a/InstabugSample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/InstabugSample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..cde69bc Binary files /dev/null and b/InstabugSample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/InstabugSample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/InstabugSample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..c133a0c Binary files /dev/null and b/InstabugSample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/InstabugSample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/InstabugSample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..bfa42f0 Binary files /dev/null and b/InstabugSample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/InstabugSample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/InstabugSample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..324e72c Binary files /dev/null and b/InstabugSample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/InstabugSample/android/app/src/main/res/values/strings.xml b/InstabugSample/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..549a876 --- /dev/null +++ b/InstabugSample/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + InstabugSample + diff --git a/InstabugSample/android/app/src/main/res/values/styles.xml b/InstabugSample/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..319eb0c --- /dev/null +++ b/InstabugSample/android/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/InstabugSample/android/build.gradle b/InstabugSample/android/build.gradle new file mode 100644 index 0000000..fcba4c5 --- /dev/null +++ b/InstabugSample/android/build.gradle @@ -0,0 +1,24 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.3.1' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + mavenLocal() + jcenter() + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url "$rootDir/../node_modules/react-native/android" + } + } +} diff --git a/InstabugSample/android/gradle.properties b/InstabugSample/android/gradle.properties new file mode 100644 index 0000000..1fd964e --- /dev/null +++ b/InstabugSample/android/gradle.properties @@ -0,0 +1,20 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +android.useDeprecatedNdk=true diff --git a/InstabugSample/android/gradle/wrapper/gradle-wrapper.jar b/InstabugSample/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..b5166da Binary files /dev/null and b/InstabugSample/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/InstabugSample/android/gradle/wrapper/gradle-wrapper.properties b/InstabugSample/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..b9fbfab --- /dev/null +++ b/InstabugSample/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip diff --git a/InstabugSample/android/gradlew b/InstabugSample/android/gradlew new file mode 100755 index 0000000..91a7e26 --- /dev/null +++ b/InstabugSample/android/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/InstabugSample/android/gradlew.bat b/InstabugSample/android/gradlew.bat new file mode 100644 index 0000000..aec9973 --- /dev/null +++ b/InstabugSample/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/InstabugSample/android/keystores/BUCK b/InstabugSample/android/keystores/BUCK new file mode 100644 index 0000000..15da20e --- /dev/null +++ b/InstabugSample/android/keystores/BUCK @@ -0,0 +1,8 @@ +keystore( + name = 'debug', + store = 'debug.keystore', + properties = 'debug.keystore.properties', + visibility = [ + 'PUBLIC', + ], +) diff --git a/InstabugSample/android/keystores/debug.keystore.properties b/InstabugSample/android/keystores/debug.keystore.properties new file mode 100644 index 0000000..121bfb4 --- /dev/null +++ b/InstabugSample/android/keystores/debug.keystore.properties @@ -0,0 +1,4 @@ +key.store=debug.keystore +key.alias=androiddebugkey +key.store.password=android +key.alias.password=android diff --git a/InstabugSample/android/settings.gradle b/InstabugSample/android/settings.gradle new file mode 100644 index 0000000..a8770c7 --- /dev/null +++ b/InstabugSample/android/settings.gradle @@ -0,0 +1,7 @@ +rootProject.name = 'InstabugSample' +include ':react-native-dialogs' +project(':react-native-dialogs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogs/android') +include ':instabug-reactnative' +project(':instabug-reactnative').projectDir = new File(rootProject.projectDir, '../node_modules/instabug-reactnative/android') + +include ':app' diff --git a/InstabugSample/app.json b/InstabugSample/app.json new file mode 100644 index 0000000..2081ecf --- /dev/null +++ b/InstabugSample/app.json @@ -0,0 +1,4 @@ +{ + "name": "InstabugSample", + "displayName": "InstabugSample" +} \ No newline at end of file diff --git a/InstabugSample/index.android.js b/InstabugSample/index.android.js new file mode 100644 index 0000000..e940985 --- /dev/null +++ b/InstabugSample/index.android.js @@ -0,0 +1,324 @@ +/** + * Sample React Native App + * https://github.com/facebook/react-native + * @flow + */ +import React, {Component} from "react"; +import { + AppRegistry, + StyleSheet, + Text, + Button, + Alert, + View, + processColor, + Aerlt, + Image, + ListView, + TouchableHighlight, + RecyclerViewBackedScrollView +} from "react-native"; +import Instabug from "instabug-reactnative"; +let DialogAndroid = require('react-native-dialogs'); + +export default class InstabugSample extends Component { + + constructor(props) { + super(props); + Instabug.startWithToken('0f0dc916bd9175e3b5d2fdf0cfa49a69', + Instabug.invocationEvent.floatingButton); + Instabug.setPreInvocationHandler(() => { + Alert.alert("PreInvocationEvent", "Done :) "); + }); + const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2}); + this.state = { + dataSource: ds.cloneWithRows(this._genRows({})), + }; + } + + _renderRow(rowData, sectionID, rowID, highlightRow) { + const that = this; + return ( + { + that._pressRow(rowID); + highlightRow(sectionID, rowID); + }}> + + + + {rowData} + + + + + ); + } + + _genRows() { + var dataBlob = [ + "Invoke", + "Invoke with invocation mode", + "Select invocation event", + "Show intro message", + "Unread messages count", + "Set locale", + "Set color theme", + "Set primary color" + ]; + return dataBlob; + } + + _pressRow(rowID) { + if (rowID == 0) { + Instabug.invoke(); + } else if (rowID == 1) { + this._showInvocationModeActionSheet(); + } else if (rowID == 2) { + this._showInvocationEventActionSheet(); + } else if (rowID == 3) { + Instabug.showIntroMessage(); + } else if (rowID == 4) { + + Instabug.getUnreadMessagesCount((count) => { + Alert.alert("UnReadMessages", "Messages: " + count); + }); + + } else if (rowID == 5) { + this._showLocaleActionSheet(); + } else if (rowID == 6) { + this._showColorThemeActionSheet(); + } else if (rowID == 7) { + this._showPrimaryColorActionSheet(); + } + } + + _showInvocationModeActionSheet() { + let options = { + "items": [ + "New bug", + "New Feedback", + "New Chat", + "None" + ], + "title": "Instabug modes", + itemsCallback: (id, text) => { + if (id == 0) { + Instabug.invokeWithInvocationMode(Instabug.invocationMode.newBug); + } else if (id == 1) { + Instabug.invokeWithInvocationMode(Instabug.invocationMode.newFeedback); + } else if (id == 2) { + Instabug.invokeWithInvocationMode(Instabug.invocationMode.newChat); + } else if (id == 3) { + Instabug.invokeWithInvocationMode(Instabug.invocationMode.NA); + } + } + }; + + showDialog = function () { + let dialog = new DialogAndroid(); + dialog.set(options); + dialog.show(); + }; + + showDialog(); + } + + _showColorThemeActionSheet() { + let options = { + "items": [ + "Light", + "Dark" + ], + "title": "Instabug Themes", + itemsCallback: (id, text) => { + if (id == 0) { + Instabug.setColorTheme(Instabug.colorTheme.light); + } else if (id == 1) { + Instabug.setColorTheme(Instabug.colorTheme.dark); + } + } + }; + + showDialog = function () { + let dialog = new DialogAndroid(); + dialog.set(options); + dialog.show(); + }; + + showDialog(); + } + + _showPrimaryColorActionSheet() { + let options = { + "items": [ + "Red", + "Green", + "Blue" + ], + "title": "Instabug Primary Color", + itemsCallback: (id, text) => { + if (id == 0) { + Instabug.setPrimaryColor(processColor('#ff0000')); + } else if (id == 1) { + Instabug.setPrimaryColor(processColor('#00ff00')); + } else if (id == 2) { + Instabug.setPrimaryColor(processColor('#0000ff')); + } + } + }; + + showDialog = function () { + let dialog = new DialogAndroid(); + dialog.set(options); + dialog.show(); + }; + + showDialog(); + } + + _showLocaleActionSheet() { + + let options = { + "items": [ + "Arabic", + "Chinese Simplified", + "Chinese Traditional", + "Czech", + "Danish", + "English", + "French", + "German", + "Italian", + "Japanese", + "Polish", + "Portuguese Brazil", + "Russian", + "Spanish", + "Swedish", + "Turkish" + ], + "title": "Instabug Primary Color", + itemsCallback: (id, text) => { + if (id == 0) { + Instabug.setLocale(Instabug.locale.arabic); + } else if (id == 1) { + Instabug.setLocale(Instabug.locale.chineseSimplified); + } else if (id == 2) { + Instabug.setLocale(Instabug.locale.chineseTraditional); + } else if (id == 3) { + Instabug.setLocale(Instabug.locale.czech); + } else if (id == 4) { + Instabug.setLocale(Instabug.locale.danish); + } else if (id == 5) { + Instabug.setLocale(Instabug.locale.english); + } else if (id == 6) { + Instabug.setLocale(Instabug.locale.french); + } else if (id == 7) { + Instabug.setLocale(Instabug.locale.german); + } else if (id == 8) { + Instabug.setLocale(Instabug.locale.italian); + } else if (id == 9) { + Instabug.setLocale(Instabug.locale.japanese); + } else if (id == 10) { + Instabug.setLocale(Instabug.locale.polish); + } else if (id == 11) { + Instabug.setLocale(Instabug.locale.portugueseBrazil); + } else if (id == 12) { + Instabug.setLocale(Instabug.locale.russian); + } else if (id == 13) { + Instabug.setLocale(Instabug.locale.spanish); + } else if (id == 14) { + Instabug.setLocale(Instabug.locale.swedish); + } else if (id == 15) { + Instabug.setLocale(Instabug.locale.turkish); + } + } + }; + + showDialog = function () { + let dialog = new DialogAndroid(); + dialog.set(options); + dialog.show(); + }; + + showDialog(); + } + + _showInvocationEventActionSheet() { + + + let options = { + "items": [ + "Shake", + "Screenshot", + "Two fingers swipe", + "Floating button" + ], + "title": "Instabug Themes", + itemsCallback: (id, text) => { + if (id == 0) { + Instabug.setInvocationEvent(Instabug.invocationEvent.shake); + } else if (id == 1) { + Instabug.setInvocationEvent(Instabug.invocationEvent.screenshot); + } else if (id == 2) { + Instabug.setInvocationEvent(Instabug.invocationEvent.twoFingersSwipe); + } else if (id) { + Instabug.setInvocationEvent(Instabug.invocationEvent.floatingButton); + } + } + }; + + showDialog = function () { + let dialog = new DialogAndroid(); + dialog.set(options); + dialog.show(); + }; + + showDialog(); + } + + _renderSeparator(sectionID, rowID, adjacentRowHighlighted) { + return ( + + ); + } + + render() { + console.log(JSON.stringify(this.state)); + return ( + } + style={styles.listView} + /> + ); + } +} + +const styles = StyleSheet.create({ + row: { + flexDirection: 'row', + justifyContent: 'center', + padding: 10, + backgroundColor: '#F6F6F6', + }, + thumb: { + width: 64, + height: 64, + }, + text: { + flex: 1, + }, + listView: { + paddingTop: 20 + }, +}); + +AppRegistry.registerComponent('InstabugSample', () => InstabugSample); diff --git a/InstabugSample/index.ios.js b/InstabugSample/index.ios.js new file mode 100644 index 0000000..26092fd --- /dev/null +++ b/InstabugSample/index.ios.js @@ -0,0 +1,272 @@ +/** + * Sample React Native App + * https://github.com/facebook/react-native + * @flow + */ + +import React, { Component } from 'react'; +import { + AppRegistry, + StyleSheet, + Text, + Button, + Alert, + View, + processColor, + Aerlt, + Image, + ListView, + TouchableHighlight, + RecyclerViewBackedScrollView, + ActionSheetIOS, +} from 'react-native'; + +import Instabug from'instabug-reactnative'; + +export default class InstabugSample extends Component { + + constructor(props) { + super(props); + Instabug.startWithToken('0f0dc916bd9175e3b5d2fdf0cfa49a69', Instabug.invocationEvent.shake); + const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2}); + this.state = { + dataSource: ds.cloneWithRows(this._genRows({})), + }; + } + + _renderRow(rowData: string, sectionID: number, rowID: number, highlightRow: (sectionID: number, rowID: number) => void) { + const that = this; + return ( + { + that._pressRow(rowID); + highlightRow(sectionID, rowID); + }}> + + + + {rowData} + + + + + ); + } + + _genRows() { + var dataBlob = [ + "Invoke", + "Invoke with invocation mode", + "Select invocation event", + "Show intro message", + "Unread messages count", + "Set locale", + "Set color theme", + "Set primary color" + ]; + return dataBlob; + } + + _pressRow(rowID: number) { + if (rowID == 0) { + Instabug.invoke(); + } else if (rowID == 1) { + this._showInvocationModeActionSheet(); + } else if (rowID == 2) { + this._showInvocationEventActionSheet(); + } else if (rowID == 3) { + Instabug.showIntroMessage(); + } else if (rowID == 4) { + Instabug.getUnreadMessagesCount(function (number) { + Alert.alert(number.toString()); + }); + } else if (rowID == 5) { + this._showLocaleActionSheet(); + } else if (rowID == 6) { + this._showColorThemeActionSheet(); + } else if (rowID == 7) { + this._showPrimaryColorActionSheet(); + } + } + + _showInvocationModeActionSheet() { + ActionSheetIOS.showActionSheetWithOptions({ + options: [ + "New bug", + "New Feedback", + "New Chat", + "None" + ], + }, + (buttonIndex) => { + if (buttonIndex == 0) { + Instabug.invokeWithInvocationMode(Instabug.invocationMode.newBug); + } else if (buttonIndex == 1) { + Instabug.invokeWithInvocationMode(Instabug.invocationMode.newFeedback); + } else if (buttonIndex == 2) { + Instabug.invokeWithInvocationMode(Instabug.invocationMode.newChat); + } else if (buttonIndex == 3) { + Instabug.invokeWithInvocationMode(Instabug.invocationMode.NA); + } + }); + } + + _showColorThemeActionSheet() { + ActionSheetIOS.showActionSheetWithOptions({ + options: [ + "Light", + "Dark", + ], + }, + (buttonIndex) => { + if (buttonIndex == 0) { + Instabug.setColorTheme(Instabug.colorTheme.light); + } else if (buttonIndex == 1) { + Instabug.setColorTheme(Instabug.colorTheme.dark); + } + }); + } + + _showPrimaryColorActionSheet() { + ActionSheetIOS.showActionSheetWithOptions({ + options: [ + "Red", + "Green", + "Blue" + ], + }, + (buttonIndex) => { + if (buttonIndex == 0) { + Instabug.setPrimaryColor(processColor('#ff0000')); + } else if (buttonIndex == 1) { + Instabug.setPrimaryColor(processColor('#00ff00')); + } else if (buttonIndex == 2) { + Instabug.setPrimaryColor(processColor('#0000ff')); + } + }); + } + + _showLocaleActionSheet() { + ActionSheetIOS.showActionSheetWithOptions({ + options: [ + "Arabic", + "Chinese Simplified", + "Chinese Traditional", + "Czech", + "Danish", + "English", + "French", + "German", + "Italian", + "Japanese", + "Polish", + "Portuguese Brazil", + "Russian", + "Spanish", + "Swedish", + "Turkish" + ], + }, + (buttonIndex) => { + if (buttonIndex == 0) { + Instabug.setLocale(Instabug.locale.arabic); + } else if (buttonIndex == 1) { + Instabug.setLocale(Instabug.locale.chineseSimplified); + } else if (buttonIndex == 2) { + Instabug.setLocale(Instabug.locale.chineseTraditional); + } else if (buttonIndex == 3) { + Instabug.setLocale(Instabug.locale.czech); + } else if (buttonIndex == 4) { + Instabug.setLocale(Instabug.locale.danish); + } else if (buttonIndex == 5) { + Instabug.setLocale(Instabug.locale.english); + } else if (buttonIndex == 6) { + Instabug.setLocale(Instabug.locale.french); + } else if (buttonIndex == 7) { + Instabug.setLocale(Instabug.locale.german); + } else if (buttonIndex == 8) { + Instabug.setLocale(Instabug.locale.italian); + } else if (buttonIndex == 9) { + Instabug.setLocale(Instabug.locale.japanese); + } else if (buttonIndex == 10) { + Instabug.setLocale(Instabug.locale.polish); + } else if (buttonIndex == 11) { + Instabug.setLocale(Instabug.locale.portugueseBrazil); + } else if (buttonIndex == 12) { + Instabug.setLocale(Instabug.locale.russian); + } else if (buttonIndex == 13) { + Instabug.setLocale(Instabug.locale.spanish); + } else if (buttonIndex == 14) { + Instabug.setLocale(Instabug.locale.swedish); + } else if (buttonIndex == 15) { + Instabug.setLocale(Instabug.locale.turkish); + } + }); + } + + _showInvocationEventActionSheet() { + ActionSheetIOS.showActionSheetWithOptions({ + options: [ + "Shake", + "Screenshot", + "Two fingers swipe", + "Floating button" + ], + }, + (buttonIndex) => { + if (buttonIndex == 0) { + Instabug.setInvocationEvent(Instabug.invocationEvent.shake); + } else if (buttonIndex == 1) { + Instabug.setInvocationEvent(Instabug.invocationEvent.screenshot); + } else if (buttonIndex == 2) { + Instabug.setInvocationEvent(Instabug.invocationEvent.twoFingersSwipe); + } else if (buttonIndex) { + Instabug.setInvocationEvent(Instabug.invocationEvent.floatingButton); + } + }); + } + + _renderSeparator(sectionID: number, rowID: number, adjacentRowHighlighted: bool) { + return ( + + ); + } + + render() { + console.log(JSON.stringify(this.state)); + return ( + } + style={styles.listView} + /> + ); + } +} + +const styles = StyleSheet.create({ + row: { + flexDirection: 'row', + justifyContent: 'center', + padding: 10, + backgroundColor: '#F6F6F6', + }, + thumb: { + width: 64, + height: 64, + }, + text: { + flex: 1, + }, + listView: { + paddingTop: 20 + }, +}); + +AppRegistry.registerComponent('InstabugSample', () => InstabugSample); diff --git a/InstabugSample/ios/InstabugSample-tvOS/Info.plist b/InstabugSample/ios/InstabugSample-tvOS/Info.plist new file mode 100644 index 0000000..2fb6a11 --- /dev/null +++ b/InstabugSample/ios/InstabugSample-tvOS/Info.plist @@ -0,0 +1,54 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + NSLocationWhenInUseUsageDescription + + NSAppTransportSecurity + + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/InstabugSample/ios/InstabugSample-tvOSTests/Info.plist b/InstabugSample/ios/InstabugSample-tvOSTests/Info.plist new file mode 100644 index 0000000..886825c --- /dev/null +++ b/InstabugSample/ios/InstabugSample-tvOSTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/InstabugSample/ios/InstabugSample.xcodeproj/project.pbxproj b/InstabugSample/ios/InstabugSample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..cee55fe --- /dev/null +++ b/InstabugSample/ios/InstabugSample.xcodeproj/project.pbxproj @@ -0,0 +1,1380 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; + 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; + 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; + 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; + 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; + 00E356F31AD99517003FC87E /* InstabugSampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InstabugSampleTests.m */; }; + 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; + 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; + 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; + 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; + 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */; }; + 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; + 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; + 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; + 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; + 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; + 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; + 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; + 2DCD954D1E0B4F2C00145EB5 /* InstabugSampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InstabugSampleTests.m */; }; + 3F14AAB3F8DF4F53A90F3677 /* libRNInstabug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E4D43295C2849C9ABADE838 /* libRNInstabug.a */; }; + 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; + 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; + FB6237B8BC81FC0C990E8BE6 /* libPods-InstabugSample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E9562565B465A2839B076D83 /* libPods-InstabugSample.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTActionSheet; + }; + 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTGeolocation; + }; + 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B5115D1A9E6B3D00147676; + remoteInfo = RCTImage; + }; + 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B511DB1A9E6C8500147676; + remoteInfo = RCTNetwork; + }; + 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; + remoteInfo = RCTVibration; + }; + 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 13B07F861A680F5B00A75B9A; + remoteInfo = InstabugSample; + }; + 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTSettings; + }; + 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3C86DF461ADF2C930047B81A; + remoteInfo = RCTWebSocket; + }; + 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; + remoteInfo = React; + }; + 2460ED191E530B9B0043EDA4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 330102236E534C228083A4A1 /* RNInstabug.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 24DF11ED1DA3A2B90056F77C; + remoteInfo = RNInstabug; + }; + 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; + remoteInfo = "InstabugSample-tvOS"; + }; + 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; + remoteInfo = "RCTImage-tvOS"; + }; + 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28471D9B043800D4039D; + remoteInfo = "RCTLinking-tvOS"; + }; + 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28541D9B044C00D4039D; + remoteInfo = "RCTNetwork-tvOS"; + }; + 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28611D9B046600D4039D; + remoteInfo = "RCTSettings-tvOS"; + }; + 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A287B1D9B048500D4039D; + remoteInfo = "RCTText-tvOS"; + }; + 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28881D9B049200D4039D; + remoteInfo = "RCTWebSocket-tvOS"; + }; + 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28131D9B038B00D4039D; + remoteInfo = "React-tvOS"; + }; + 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3C059A1DE3340900C268FA; + remoteInfo = yoga; + }; + 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3C06751DE3340C00C268FA; + remoteInfo = "yoga-tvOS"; + }; + 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; + remoteInfo = cxxreact; + }; + 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; + remoteInfo = "cxxreact-tvOS"; + }; + 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; + remoteInfo = jschelpers; + }; + 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; + remoteInfo = "jschelpers-tvOS"; + }; + 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTAnimation; + }; + 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28201D9B03D100D4039D; + remoteInfo = "RCTAnimation-tvOS"; + }; + 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTLinking; + }; + 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B5119B1A9E6C1200147676; + remoteInfo = RCTText; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; + 00E356EE1AD99517003FC87E /* InstabugSampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InstabugSampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* InstabugSampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstabugSampleTests.m; sourceTree = ""; }; + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; + 13B07F961A680F5B00A75B9A /* InstabugSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InstabugSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = InstabugSample/AppDelegate.h; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = InstabugSample/AppDelegate.m; sourceTree = ""; }; + 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = InstabugSample/Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = InstabugSample/Info.plist; sourceTree = ""; }; + 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = InstabugSample/main.m; sourceTree = ""; }; + 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; + 21DED4D3594E0D93E837631F /* Pods-InstabugSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-InstabugSample/Pods-InstabugSample.release.xcconfig"; sourceTree = ""; }; + 2D02E47B1E0B4A5D006451C7 /* InstabugSample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "InstabugSample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D02E4901E0B4A5D006451C7 /* InstabugSample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "InstabugSample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 330102236E534C228083A4A1 /* RNInstabug.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNInstabug.xcodeproj; path = "../node_modules/instabug-reactnative/ios/RNInstabug.xcodeproj"; sourceTree = ""; }; + 5E4D43295C2849C9ABADE838 /* libRNInstabug.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNInstabug.a; sourceTree = ""; }; + 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; + 8601D784DB38337F6E545397 /* Pods-InstabugSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InstabugSample/Pods-InstabugSample.debug.xcconfig"; sourceTree = ""; }; + E9562565B465A2839B076D83 /* libPods-InstabugSample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InstabugSample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00E356EB1AD99517003FC87E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 146834051AC3E58100842450 /* libReact.a in Frameworks */, + 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, + 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, + 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, + 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, + 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, + 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, + 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, + 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, + 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, + 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, + 3F14AAB3F8DF4F53A90F3677 /* libRNInstabug.a in Frameworks */, + FB6237B8BC81FC0C990E8BE6 /* libPods-InstabugSample.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */, + 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */, + 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, + 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, + 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, + 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, + 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, + 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00C302A81ABCB8CE00DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302B61ABCB90400DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302BC1ABCB91800DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, + 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302D41ABCB9D200DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, + 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302E01ABCB9EE00DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, + ); + name = Products; + sourceTree = ""; + }; + 00E356EF1AD99517003FC87E /* InstabugSampleTests */ = { + isa = PBXGroup; + children = ( + 00E356F21AD99517003FC87E /* InstabugSampleTests.m */, + 00E356F01AD99517003FC87E /* Supporting Files */, + ); + path = InstabugSampleTests; + sourceTree = ""; + }; + 00E356F01AD99517003FC87E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 00E356F11AD99517003FC87E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 139105B71AF99BAD00B5F7CC /* Products */ = { + isa = PBXGroup; + children = ( + 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, + 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 139FDEE71B06529A00C62182 /* Products */ = { + isa = PBXGroup; + children = ( + 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, + 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 13B07FAE1A68108700A75B9A /* InstabugSample */ = { + isa = PBXGroup; + children = ( + 008F07F21AC5B25A0029DE68 /* main.jsbundle */, + 13B07FAF1A68108700A75B9A /* AppDelegate.h */, + 13B07FB01A68108700A75B9A /* AppDelegate.m */, + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, + 13B07FB71A68108700A75B9A /* main.m */, + ); + name = InstabugSample; + sourceTree = ""; + }; + 146834001AC3E56700842450 /* Products */ = { + isa = PBXGroup; + children = ( + 146834041AC3E56700842450 /* libReact.a */, + 3DAD3EA31DF850E9000B6D8A /* libReact.a */, + 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, + 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, + 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, + 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, + 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, + 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, + ); + name = Products; + sourceTree = ""; + }; + 2460ECFD1E530B9B0043EDA4 /* Products */ = { + isa = PBXGroup; + children = ( + 2460ED1A1E530B9B0043EDA4 /* libRNInstabug.a */, + ); + name = Products; + sourceTree = ""; + }; + 443E311BD736B6F07D8B5811 /* Frameworks */ = { + isa = PBXGroup; + children = ( + E9562565B465A2839B076D83 /* libPods-InstabugSample.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 5E91572E1DD0AC6500FF2AA8 /* Products */ = { + isa = PBXGroup; + children = ( + 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, + 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 78C398B11ACF4ADC00677621 /* Products */ = { + isa = PBXGroup; + children = ( + 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, + 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 8098B839B3C5F5897B38D9B3 /* Pods */ = { + isa = PBXGroup; + children = ( + 8601D784DB38337F6E545397 /* Pods-InstabugSample.debug.xcconfig */, + 21DED4D3594E0D93E837631F /* Pods-InstabugSample.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, + 146833FF1AC3E56700842450 /* React.xcodeproj */, + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, + 330102236E534C228083A4A1 /* RNInstabug.xcodeproj */, + ); + name = Libraries; + sourceTree = ""; + }; + 832341B11AAA6A8300B99B32 /* Products */ = { + isa = PBXGroup; + children = ( + 832341B51AAA6A8300B99B32 /* libRCTText.a */, + 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* InstabugSample */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 00E356EF1AD99517003FC87E /* InstabugSampleTests */, + 83CBBA001A601CBA00E9B192 /* Products */, + 8098B839B3C5F5897B38D9B3 /* Pods */, + 443E311BD736B6F07D8B5811 /* Frameworks */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* InstabugSample.app */, + 00E356EE1AD99517003FC87E /* InstabugSampleTests.xctest */, + 2D02E47B1E0B4A5D006451C7 /* InstabugSample-tvOS.app */, + 2D02E4901E0B4A5D006451C7 /* InstabugSample-tvOSTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00E356ED1AD99517003FC87E /* InstabugSampleTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "InstabugSampleTests" */; + buildPhases = ( + 00E356EA1AD99517003FC87E /* Sources */, + 00E356EB1AD99517003FC87E /* Frameworks */, + 00E356EC1AD99517003FC87E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00E356F51AD99517003FC87E /* PBXTargetDependency */, + ); + name = InstabugSampleTests; + productName = InstabugSampleTests; + productReference = 00E356EE1AD99517003FC87E /* InstabugSampleTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 13B07F861A680F5B00A75B9A /* InstabugSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "InstabugSample" */; + buildPhases = ( + 1815D8FB2BCD715098EBFE3D /* [CP] Check Pods Manifest.lock */, + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + F34B58CB9681C17878B6D0CC /* [CP] Embed Pods Frameworks */, + 0B79621FBDFDDD687F85A8D4 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = InstabugSample; + productName = "Hello World"; + productReference = 13B07F961A680F5B00A75B9A /* InstabugSample.app */; + productType = "com.apple.product-type.application"; + }; + 2D02E47A1E0B4A5D006451C7 /* InstabugSample-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "InstabugSample-tvOS" */; + buildPhases = ( + 2D02E4771E0B4A5D006451C7 /* Sources */, + 2D02E4781E0B4A5D006451C7 /* Frameworks */, + 2D02E4791E0B4A5D006451C7 /* Resources */, + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "InstabugSample-tvOS"; + productName = "InstabugSample-tvOS"; + productReference = 2D02E47B1E0B4A5D006451C7 /* InstabugSample-tvOS.app */; + productType = "com.apple.product-type.application"; + }; + 2D02E48F1E0B4A5D006451C7 /* InstabugSample-tvOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "InstabugSample-tvOSTests" */; + buildPhases = ( + 2D02E48C1E0B4A5D006451C7 /* Sources */, + 2D02E48D1E0B4A5D006451C7 /* Frameworks */, + 2D02E48E1E0B4A5D006451C7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, + ); + name = "InstabugSample-tvOSTests"; + productName = "InstabugSample-tvOSTests"; + productReference = 2D02E4901E0B4A5D006451C7 /* InstabugSample-tvOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 610; + ORGANIZATIONNAME = Facebook; + TargetAttributes = { + 00E356ED1AD99517003FC87E = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 13B07F861A680F5B00A75B9A; + }; + 2D02E47A1E0B4A5D006451C7 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + }; + 2D02E48F1E0B4A5D006451C7 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + TestTargetID = 2D02E47A1E0B4A5D006451C7; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "InstabugSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; + ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; + }, + { + ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; + ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; + }, + { + ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; + ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; + }, + { + ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; + ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + }, + { + ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; + ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + }, + { + ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; + ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + }, + { + ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; + ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + }, + { + ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; + ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + }, + { + ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; + ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; + }, + { + ProductGroup = 139FDEE71B06529A00C62182 /* Products */; + ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + }, + { + ProductGroup = 146834001AC3E56700842450 /* Products */; + ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; + }, + { + ProductGroup = 2460ECFD1E530B9B0043EDA4 /* Products */; + ProjectRef = 330102236E534C228083A4A1 /* RNInstabug.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* InstabugSample */, + 00E356ED1AD99517003FC87E /* InstabugSampleTests */, + 2D02E47A1E0B4A5D006451C7 /* InstabugSample-tvOS */, + 2D02E48F1E0B4A5D006451C7 /* InstabugSample-tvOSTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTActionSheet.a; + remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTGeolocation.a; + remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTImage.a; + remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTNetwork.a; + remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTVibration.a; + remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTSettings.a; + remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTWebSocket.a; + remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 146834041AC3E56700842450 /* libReact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libReact.a; + remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2460ED1A1E530B9B0043EDA4 /* libRNInstabug.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRNInstabug.a; + remoteRef = 2460ED191E530B9B0043EDA4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTImage-tvOS.a"; + remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTLinking-tvOS.a"; + remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTNetwork-tvOS.a"; + remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTSettings-tvOS.a"; + remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTText-tvOS.a"; + remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTWebSocket-tvOS.a"; + remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libReact.a; + remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libyoga.a; + remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libyoga.a; + remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcxxreact.a; + remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcxxreact.a; + remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjschelpers.a; + remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjschelpers.a; + remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTAnimation.a; + remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTAnimation-tvOS.a"; + remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTLinking.a; + remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTText.a; + remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 00E356EC1AD99517003FC87E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4791E0B4A5D006451C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48E1E0B4A5D006451C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; + }; + 0B79621FBDFDDD687F85A8D4 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InstabugSample/Pods-InstabugSample-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 1815D8FB2BCD715098EBFE3D /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../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"; + showEnvVarsInLog = 0; + }; + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native Code And Images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; + }; + F34B58CB9681C17878B6D0CC /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InstabugSample/Pods-InstabugSample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 00E356EA1AD99517003FC87E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00E356F31AD99517003FC87E /* InstabugSampleTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, + 13B07FC11A68108700A75B9A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4771E0B4A5D006451C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, + 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48C1E0B4A5D006451C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2DCD954D1E0B4F2C00145EB5 /* InstabugSampleTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 13B07F861A680F5B00A75B9A /* InstabugSample */; + targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; + }; + 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2D02E47A1E0B4A5D006451C7 /* InstabugSample-tvOS */; + targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 13B07FB21A68108700A75B9A /* Base */, + ); + name = LaunchScreen.xib; + path = InstabugSample; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 00E356F61AD99517003FC87E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = InstabugSampleTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InstabugSample.app/InstabugSample"; + }; + name = Debug; + }; + 00E356F71AD99517003FC87E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + INFOPLIST_FILE = InstabugSampleTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InstabugSample.app/InstabugSample"; + }; + name = Release; + }; + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8601D784DB38337F6E545397 /* Pods-InstabugSample.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = NO; + INFOPLIST_FILE = InstabugSample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_NAME = InstabugSample; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 21DED4D3594E0D93E837631F /* Pods-InstabugSample.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = 1; + INFOPLIST_FILE = InstabugSample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_NAME = InstabugSample; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + 2D02E4971E0B4A5E006451C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "InstabugSample-tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.InstabugSample-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.2; + }; + name = Debug; + }; + 2D02E4981E0B4A5E006451C7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "InstabugSample-tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.InstabugSample-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.2; + }; + name = Release; + }; + 2D02E4991E0B4A5E006451C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "InstabugSample-tvOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.InstabugSample-tvOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InstabugSample-tvOS.app/InstabugSample-tvOS"; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Debug; + }; + 2D02E49A1E0B4A5E006451C7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "InstabugSample-tvOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.InstabugSample-tvOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InstabugSample-tvOS.app/InstabugSample-tvOS"; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "InstabugSampleTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00E356F61AD99517003FC87E /* Debug */, + 00E356F71AD99517003FC87E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "InstabugSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "InstabugSample-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D02E4971E0B4A5E006451C7 /* Debug */, + 2D02E4981E0B4A5E006451C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "InstabugSample-tvOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D02E4991E0B4A5E006451C7 /* Debug */, + 2D02E49A1E0B4A5E006451C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "InstabugSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/InstabugSample/ios/InstabugSample.xcodeproj/xcshareddata/xcschemes/InstabugSample-tvOS.xcscheme b/InstabugSample/ios/InstabugSample.xcodeproj/xcshareddata/xcschemes/InstabugSample-tvOS.xcscheme new file mode 100644 index 0000000..07a9a3e --- /dev/null +++ b/InstabugSample/ios/InstabugSample.xcodeproj/xcshareddata/xcschemes/InstabugSample-tvOS.xcscheme @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/InstabugSample/ios/InstabugSample.xcodeproj/xcshareddata/xcschemes/InstabugSample.xcscheme b/InstabugSample/ios/InstabugSample.xcodeproj/xcshareddata/xcschemes/InstabugSample.xcscheme new file mode 100644 index 0000000..5097b41 --- /dev/null +++ b/InstabugSample/ios/InstabugSample.xcodeproj/xcshareddata/xcschemes/InstabugSample.xcscheme @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/InstabugSample/ios/InstabugSample.xcworkspace/contents.xcworkspacedata b/InstabugSample/ios/InstabugSample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..8398a26 --- /dev/null +++ b/InstabugSample/ios/InstabugSample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/InstabugSample/ios/InstabugSample/AppDelegate.h b/InstabugSample/ios/InstabugSample/AppDelegate.h new file mode 100644 index 0000000..a9654d5 --- /dev/null +++ b/InstabugSample/ios/InstabugSample/AppDelegate.h @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@interface AppDelegate : UIResponder + +@property (nonatomic, strong) UIWindow *window; + +@end diff --git a/InstabugSample/ios/InstabugSample/AppDelegate.m b/InstabugSample/ios/InstabugSample/AppDelegate.m new file mode 100644 index 0000000..3ad996e --- /dev/null +++ b/InstabugSample/ios/InstabugSample/AppDelegate.m @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "AppDelegate.h" + +#import +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + NSURL *jsCodeLocation; + + jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; + + RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation + moduleName:@"InstabugSample" + initialProperties:nil + launchOptions:launchOptions]; + rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + UIViewController *rootViewController = [UIViewController new]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + return YES; +} + +@end diff --git a/InstabugSample/ios/InstabugSample/Base.lproj/LaunchScreen.xib b/InstabugSample/ios/InstabugSample/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..845597a --- /dev/null +++ b/InstabugSample/ios/InstabugSample/Base.lproj/LaunchScreen.xib @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/InstabugSample/ios/InstabugSample/Images.xcassets/AppIcon.appiconset/Contents.json b/InstabugSample/ios/InstabugSample/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..118c98f --- /dev/null +++ b/InstabugSample/ios/InstabugSample/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/InstabugSample/ios/InstabugSample/Info.plist b/InstabugSample/ios/InstabugSample/Info.plist new file mode 100644 index 0000000..6f22121 --- /dev/null +++ b/InstabugSample/ios/InstabugSample/Info.plist @@ -0,0 +1,56 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + InstabugSample + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + NSLocationWhenInUseUsageDescription + + NSAppTransportSecurity + + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/InstabugSample/ios/InstabugSample/main.m b/InstabugSample/ios/InstabugSample/main.m new file mode 100644 index 0000000..3d767fc --- /dev/null +++ b/InstabugSample/ios/InstabugSample/main.m @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/InstabugSample/ios/InstabugSampleTests/Info.plist b/InstabugSample/ios/InstabugSampleTests/Info.plist new file mode 100644 index 0000000..886825c --- /dev/null +++ b/InstabugSample/ios/InstabugSampleTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/InstabugSample/ios/InstabugSampleTests/InstabugSampleTests.m b/InstabugSample/ios/InstabugSampleTests/InstabugSampleTests.m new file mode 100644 index 0000000..54ca42c --- /dev/null +++ b/InstabugSample/ios/InstabugSampleTests/InstabugSampleTests.m @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import +#import + +#import +#import + +#define TIMEOUT_SECONDS 600 +#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" + +@interface InstabugSampleTests : XCTestCase + +@end + +@implementation InstabugSampleTests + +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test +{ + if (test(view)) { + return YES; + } + for (UIView *subview in [view subviews]) { + if ([self findSubviewInView:subview matching:test]) { + return YES; + } + } + return NO; +} + +- (void)testRendersWelcomeScreen +{ + UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; + NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; + BOOL foundElement = NO; + + __block NSString *redboxError = nil; + RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { + if (level >= RCTLogLevelError) { + redboxError = message; + } + }); + + while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { + [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + + foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; + } + + RCTSetLogFunction(RCTDefaultLogFunction); + + XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); + XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); +} + + +@end diff --git a/InstabugSample/ios/Podfile b/InstabugSample/ios/Podfile new file mode 100644 index 0000000..cce5295 --- /dev/null +++ b/InstabugSample/ios/Podfile @@ -0,0 +1,3 @@ +target 'InstabugSample' do + pod 'Instabug', '7.2.5' +end diff --git a/InstabugSample/package.json b/InstabugSample/package.json new file mode 100644 index 0000000..5c57ea7 --- /dev/null +++ b/InstabugSample/package.json @@ -0,0 +1,24 @@ +{ + "name": "InstabugSample", + "version": "0.0.1", + "private": true, + "scripts": { + "start": "node_modules/react-native/packager/packager.sh", + "test": "jest" + }, + "dependencies": { + "instabug-reactnative": "file:../", + "react": "15.4.2", + "react-native": "^0.41.2", + "react-native-dialogs": "0.0.19" + }, + "devDependencies": { + "babel-jest": "18.0.0", + "babel-preset-react-native": "1.9.1", + "jest": "18.1.0", + "react-test-renderer": "15.4.2" + }, + "jest": { + "preset": "react-native" + } +} diff --git a/android/build.gradle b/android/build.gradle index 738987f..96ef4ce 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,7 +21,7 @@ android { dependencies { compile 'com.facebook.react:react-native:0.20.+' - compile 'com.instabug.library:instabug:3+' + compile 'com.instabug.library:instabug:4+' } \ No newline at end of file diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java index 6135417..cac5fe4 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java @@ -1,15 +1,34 @@ - package com.instabug.reactlibrary; +import android.app.Application; import android.net.Uri; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.ReadableArray; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.bridge.WritableArray; +import com.facebook.react.bridge.WritableNativeArray; +import com.facebook.react.bridge.WritableMap; +import com.facebook.react.bridge.WritableNativeMap; +import com.facebook.react.bridge.Callback; + import com.instabug.library.Instabug; import com.instabug.library.internal.module.InstabugLocale; import com.instabug.library.invocation.InstabugInvocationEvent; import com.instabug.library.invocation.InstabugInvocationMode; +import com.instabug.library.InstabugColorTheme; +import com.instabug.library.logging.InstabugLog; +import com.instabug.library.bugreporting.model.ReportCategory; +import com.instabug.library.InstabugCustomTextPlaceHolder; +import com.instabug.library.user.UserEventParam; +import com.instabug.library.OnSdkDismissedCallback; +import com.instabug.library.bugreporting.model.Bug; +import com.instabug.survey.InstabugSurvey; + +import com.instabug.reactlibrary.utils.ArrayUtil; +import com.instabug.reactlibrary.utils.MapUtil; import java.util.ArrayList; import java.util.HashMap; @@ -17,22 +36,23 @@ import java.util.Locale; import java.util.Map; +/** + * The type Rn instabug reactnative module. + */ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { - private Instabug mInstabug; - private InstabugInvocationEvent invocationEvent; - + //InvocationEvents private final String INVOCATION_EVENT_NONE = "none"; private final String INVOCATION_EVENT_SHAKE = "shake"; private final String INVOCATION_EVENT_SCREENSHOT = "screenshot"; private final String INVOCATION_EVENT_TWO_FINGERS_SWIPE = "swipe"; private final String INVOCATION_EVENT_FLOATING_BUTTON = "button"; - + //InvocationModes private final String INVOCATION_MODE_NEW_BUG = "bug"; private final String INVOCATION_MODE_NEW_FEEDBACK = "feedback"; private final String INVOCATION_MODE_NEW_CHAT = "chat"; private final String INVOCATION_MODE_CHATS_LIST = "chats"; - + //locales private final String LOCALE_ARABIC = "arabic"; private final String LOCALE_CHINESE_SIMPLIFIED = "chinesesimplified"; private final String LOCALE_CHINESE_TRADITIONAL = "chinesetraditional"; @@ -50,9 +70,57 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { private final String LOCALE_SWEDISH = "swedish"; private final String LOCALE_TURKISH = "turkish"; - public RNInstabugReactnativeModule(ReactApplicationContext reactContext, Instabug mInstabug) { + //Theme colors + private final String COLOR_THEME_LIGHT = "light"; + private final String COLOR_THEME_DARK = "dark"; + + //CustomTextPlaceHolders + private final String SHAKE_HINT = "shakeHint"; + private final String SWIPE_HINT = "swipeHint"; + private final String INVALID_EMAIL_MESSAGE = "invalidEmailMessage"; + private final String INVALID_COMMENT_MESSAGE = "invalidCommentMessage"; + private final String EMAIL_FIELD_HINT = "emailFieldHint"; + private final String COMMENT_FIELD_HINT_FOR_BUG_REPORT = "commentFieldHintForBugReport"; + private final String COMMENT_FIELD_HINT_FOR_FEEDBACK = "commentFieldHintForFeedback"; + + private final String INVOCATION_HEADER = "invocationHeader"; + private final String START_CHATS = "talkToUs"; + private final String REPORT_BUG = "reportBug"; + private final String REPORT_FEEDBACK = "reportFeedback"; + + private final String CONVERSATIONS_LIST_TITLE = "conversationsHeaderTitle"; + + private final String ADD_VOICE_MESSAGE = "addVoiceMessage"; + private final String ADD_IMAGE_FROM_GALLERY = "addImageFromGallery"; + private final String ADD_EXTRA_SCREENSHOT = "addExtraScreenshot"; + private final String ADD_VIDEO = "addVideoMessage"; + + private final String AUDIO_RECORDING_PERMISSION_DENIED = + "audioRecordingPermissionDeniedMessage"; + + private final String VOICE_MESSAGE_PRESS_AND_HOLD_TO_RECORD = "recordingMessageToHoldText"; + private final String VOICE_MESSAGE_RELEASE_TO_ATTACH = "recordingMessageToReleaseText"; + + private final String REPORT_SUCCESSFULLY_SENT = "thankYouText"; + private final String VIDEO_PLAYER_TITLE = "video"; + + private final String CONVERSATION_TEXT_FIELD_HINT = "conversationTextFieldHint"; + + private Application androidApplication; + private Instabug mInstabug; + private InstabugInvocationEvent invocationEvent; + private InstabugCustomTextPlaceHolder placeHolders; + + /** + * Instantiates a new Rn instabug reactnative module. + * + * @param reactContext the react context + * @param mInstabug the m instabug + */ + public RNInstabugReactnativeModule(ReactApplicationContext reactContext, Application + androidApplication) { super(reactContext); - this.mInstabug = mInstabug; + this.androidApplication = androidApplication; } @Override @@ -60,6 +128,17 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { return "Instabug"; } + @ReactMethod + public void startWithToken(String androidToken, String invocationEvent) { + mInstabug = new Instabug.Builder(this.androidApplication, androidToken) + .setIntroMessageEnabled(false) + .setInvocationEvent(getInvocationEventById(invocationEvent)) + .build(); + //init placHolders + placeHolders = new InstabugCustomTextPlaceHolder(); + + } + /** * invoke sdk manually */ @@ -75,7 +154,7 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { /** * invoke sdk manually with desire invocation mode * - * @param invocation mode + * @param invocationMode the invocation mode */ @ReactMethod public void invokeWithInvocationMode(String invocationMode) { @@ -119,10 +198,9 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { * @param tags */ @ReactMethod - public void addTags(String tags) { + public void appendTags(String tags) { try { String[] result = tags.split(","); - mInstabug.resetTags(); //clear last commit tags mInstabug.addTags(result); } catch (Exception e) { e.printStackTrace(); @@ -143,12 +221,12 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { } } - /** - * The file at filePath will be uploaded along upcoming reports with the name fileNameWithExtension + * The file at filePath will be uploaded along upcoming reports with the name + * fileNameWithExtension * - * @param fileUri - * @param fileNameWithExtension + * @param fileUri the file uri + * @param fileNameWithExtension the file name with extension */ @ReactMethod public void setFileAttachment(String fileUri, String fileNameWithExtension) { @@ -164,7 +242,7 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { * If your app already acquires the user's email address and you provide it to this method, * Instabug will pre-fill the user email in reports. * - * @param userEmail + * @param userEmail the user email */ @ReactMethod public void setUserEmail(String userEmail) { @@ -178,7 +256,7 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { /** * Sets the user name that is used in the dashboard's contacts. * - * @param username + * @param username the username */ @ReactMethod public void setUserName(String username) { @@ -221,7 +299,8 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { * Set the primary color that the SDK will use to tint certain UI elements in the SDK * * @param primaryColorValue The value of the primary color , - * whatever this color was parsed from a resource color or hex color or RGB color values + * whatever this color was parsed from a resource color or hex color + * or RGB color values */ @ReactMethod public void setPrimaryColor(int primaryColor) { @@ -242,9 +321,11 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { * @param {boolean} screenRecording A boolean to enable or disable screen recording attachments. */ @ReactMethod - public void setAttachmentTypesEnabled(boolean screenshot, boolean extraScreenshot, boolean galleryImage, boolean voiceNote, boolean screenRecording) { + public void setAttachmentTypesEnabled(boolean screenshot, boolean extraScreenshot, boolean + galleryImage, boolean voiceNote, boolean screenRecording) { try { - mInstabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording); + mInstabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, + voiceNote, screenRecording); } catch (Exception e) { e.printStackTrace(); } @@ -253,8 +334,10 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { /** * Appends a log message to Instabug internal log *

- * These logs are then sent along the next uploaded report. All log messages are timestamped
- * Logs aren't cleared per single application run. If you wish to reset the logs, use {@link #clearLog()} + * These logs are then sent along the next uploaded report. All log messages are timestamped + *
+ * Logs aren't cleared per single application run. If you wish to reset the logs, use + * {@link #clearLog()} *

* Note: logs passed to this method are NOT printed to Logcat * @@ -270,18 +353,41 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { } /** + * Gets tags. + * * @return all tags added using {@link #addTags(String...)} * @see #resetTags() */ @ReactMethod - public ArrayList getTags() { - ArrayList tags = new ArrayList(); + public void getTags(Callback tagsCallback) { + WritableArray tagsArray; try { - tags = mInstabug.getTags(); + ArrayList tags = mInstabug.getTags(); + tagsArray = new WritableNativeArray(); + for (int i = 0; i < tags.size(); i++) { + tagsArray.pushString(tags.get(i)); + } + tagsCallback.invoke(tagsArray); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Set the user identity. + * Instabug will pre-fill the user email in reports. + * + * @param username Username. + * @param email User's default email + */ + @ReactMethod + public void identifyUser(String userName, String userEmail) { + try { + mInstabug.identifyUser(userName, userEmail); } catch (Exception e) { e.printStackTrace(); } - return tags; } /** @@ -297,6 +403,8 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { } /** + * Is enabled boolean. + * * @return {@code true} if Instabug is enabled, {@code false} if it's disabled * @see #enable() * @see #disable() @@ -359,7 +467,7 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { * @return number of messages that are unread for this user */ @ReactMethod - public int getUnreadMessagesCount() { + public void getUnreadMessagesCount(Callback messageCountCallback) { int unreadMessages = 0; try { unreadMessages = mInstabug.getUnreadMessagesCount(); @@ -367,20 +475,27 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { e.printStackTrace(); } - return unreadMessages; + messageCountCallback.invoke(unreadMessages); } /** * Sets the event used to invoke Instabug SDK * - * @param instabugInvocationEvent to be used to invoke SDK + * @param invocationEventValue the invocation event value * @see InstabugInvocationEvent */ @ReactMethod public void setInvocationEvent(String invocationEventValue) { - InstabugInvocationEvent invocationEvent = InstabugInvocationEvent.FLOATING_BUTTON; try { - //setting invocation event + mInstabug.changeInvocationEvent(getInvocationEventById(invocationEventValue)); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private InstabugInvocationEvent getInvocationEventById(String invocationEventValue) { + InstabugInvocationEvent invocationEvent = InstabugInvocationEvent.SHAKE; + try { if (invocationEventValue.equals(INVOCATION_EVENT_FLOATING_BUTTON)) { invocationEvent = InstabugInvocationEvent.FLOATING_BUTTON; } else if (invocationEventValue.equals(INVOCATION_EVENT_TWO_FINGERS_SWIPE)) { @@ -393,11 +508,11 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { invocationEvent = InstabugInvocationEvent.NONE; } - mInstabug.changeInvocationEvent(invocationEvent); + return invocationEvent; } catch (Exception e) { e.printStackTrace(); + return invocationEvent; } - } /** @@ -430,43 +545,647 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { } } + /** + * Report a caught exception to Instabug dashboard + * + * @param throwable the exception to be reported + */ + @ReactMethod + public void reportJsException(ReadableArray stack, String message, String errorIdentifier) { + try { + int size = stack != null ? stack.size() : 0; + StackTraceElement[] stackTraceElements = new StackTraceElement[size]; + for (int i = 0; i < size; i++) { + ReadableMap frame = stack.getMap(i); + String methodName = frame.getString("methodName"); + String fileName = frame.getString("file"); + int lineNumber = frame.getInt("lineNumber"); + + stackTraceElements[i] = new StackTraceElement(fileName, methodName, fileName, + lineNumber); + } + Throwable throwable = new Throwable(message); + throwable.setStackTrace(stackTraceElements); + if (errorIdentifier != null) + mInstabug.reportException(throwable); + else + mInstabug.reportException(throwable, errorIdentifier); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + /** + * Appends a log message to Instabug internal log + *

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

+ * Note: logs passed to this method are NOT printed to Logcat + * + * @param logMessage The message you would like logged + * @param level the level + * @param message the message + */ + @ReactMethod + public void log(String level, String message) { + try { + switch (level) { + case "v": + InstabugLog.v(message); + break; + case "i": + InstabugLog.i(message); + break; + case "d": + InstabugLog.d(message); + break; + case "e": + InstabugLog.e(message); + break; + case "w": + InstabugLog.w(message); + break; + case "wtf": + InstabugLog.wtf(message); + break; + default: + InstabugLog.d(message); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Clears Instabug internal log + */ + @ReactMethod + public void clearLogs() { + try { + InstabugLog.clearLogs(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Sets user attribute to overwrite it's value or create a new one if it doesn't exist. + * + * @param key the attribute + * @param value the value + */ + @ReactMethod + public void setUserAttribute(String key, String value) { + try { + mInstabug.setUserAttribute(key, value); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Gets specific user attribute. + * + * @param key the attribute key as string + * @return the desired user attribute + */ + @ReactMethod + public void getUserAttribute(String key, Callback userAttributeCallback) { + String userAttribute; + try { + userAttribute = mInstabug.getUserAttribute(key); + userAttributeCallback.invoke(userAttribute); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Removes user attribute if exists. + * + * @param key the attribute key as string + * @see #setUserAttribute(String, String) + */ + @ReactMethod + public void removeUserAttribute(String key) { + try { + mInstabug.removeUserAttribute(key); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Gets all saved user attributes. + * + * @return all user attributes as HashMap + */ + @ReactMethod + public void getAllUserAttributes(Callback userAttributesCallback) { + WritableMap writableMap = new WritableNativeMap(); + try { + HashMap map = mInstabug.getAllUserAttributes(); + for (HashMap.Entry entry : map.entrySet()) { + writableMap.putString(entry.getKey(), entry.getValue()); + } + } catch (Exception e) { + e.printStackTrace(); + } + userAttributesCallback.invoke(writableMap); + } + + /** + * Clears all user attributes if exists. + */ + @ReactMethod + public void clearAllUserAttributes() { + try { + mInstabug.clearAllUserAttributes(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Sets InstabugSDK theme color. + * + * @param theme which is a constant String "light" or "dark" + */ + @ReactMethod + public void setColorTheme(String theme) { + try { + if (theme.equals(COLOR_THEME_LIGHT)) { + mInstabug.setTheme(InstabugColorTheme.InstabugColorThemeLight); + + } else if (theme.equals(COLOR_THEME_DARK)) { + mInstabug.setTheme(InstabugColorTheme.InstabugColorThemeDark); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Allows you to show a predefined set of categories for users to choose + * from when reporting a bug or sending feedback. Selected category + * shows up on your Instabug dashboard as a tag to make filtering + * through issues easier. + * + * @param reportCategories the report categories list which is a list of ReportCategory model + */ + @ReactMethod + public void setReportCategories(ReadableArray categoriesTitles) { + try { + ArrayList bugCategories = new ArrayList<>(); + int size = categoriesTitles != null ? categoriesTitles.size() : 0; + if (size == 0) return; + for (int i = 0; i < size; i++) { + bugCategories.add(ReportCategory.getInstance().withLabel(categoriesTitles + .getString(i))); + } + + Instabug.setReportCategories(bugCategories); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Sets whether users are required to enter an email address or not when + * sending reports. + * Defaults to YES. + * + * @param {boolean} isEmailFieldRequired A boolean to indicate whether email + * field is required or not. + */ + @ReactMethod + public void setEmailFieldRequired(boolean isEmailFieldRequired) { + try { + mInstabug.setEmailFieldRequired(isEmailFieldRequired); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Sets whether users are required to enter a comment or not when sending reports. + * Defaults to NO. + * + * @param {boolean} isCommentFieldRequired A boolean to indicate whether comment + * field is required or not. + */ + @ReactMethod + public void setCommentFieldRequired(boolean isCommentFieldRequired) { + try { + mInstabug.setCommentFieldRequired(isCommentFieldRequired); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Overrides any of the strings shown in the SDK with custom ones. + * Allows you to customize any of the strings shown to users in the SDK. + * + * @param {string} string String value to override the default one. + * @param {strings} key Key of string to override. + */ + @ReactMethod + public void setStringToKey(String string, String key) { + try { + placeHolders.set(getStringToKeyConstant(key), string); + Instabug.setCustomTextPlaceHolders(placeHolders); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Sets the default value of the user's email to null and show email field and remove user + * name from all reports + * It also reset the chats on device and removes user attributes, user data and completed + * surveys. + */ + @ReactMethod + public void logOut() { + try { + mInstabug.logoutUser(); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Enables/disables screenshot view when reporting a bug/improvement. + * By default, screenshot view is shown when reporting a bug, but not when + * sending feedback. + * + * @param {boolean} willSkipScreenshotAnnotation sets whether screenshot view is + * shown or not. Passing YES will show screenshot view for both feedback and + * bug reporting, while passing NO will disable it for both. + */ + @ReactMethod + public void setWillSkipScreenshotAnnotation(boolean willSkipScreenshotAnnotation) { + try { + mInstabug.setWillSkipScreenshotAnnotation(willSkipScreenshotAnnotation); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Logs a user event that happens through the lifecycle of the application. + * Logged user events are going to be sent with each report, as well as at the end of a session. + * + * @param {string} name Event name. + */ + @ReactMethod + public void logUserEventWithName(String name) { + try { + mInstabug.logUserEvent(name); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Logs a user event that happens through the lifecycle of the application. + * Logged user events are going to be sent with each report, as well as at the end of a + * session. + * + * @param {string} name Event name. + * @param {ReadableMap} params An optional ReadableMap to be associated with the event. + */ + @ReactMethod + public void logUserEventWithNameAndParams(String name, ReadableMap params) { + try { + Map paramsMap = MapUtil.toMap(params); + UserEventParam[] userEventParams = new UserEventParam[paramsMap.size()]; + int index = 0; + UserEventParam userEventParam; + for (Map.Entry entry : paramsMap.entrySet()) { + userEventParam = new UserEventParam().setKey(entry.getKey()) + .setValue((entry.getValue()).toString()); + userEventParams[index] = userEventParam; + index++; + } + + mInstabug.logUserEvent(name, userEventParams); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Sets a block of code to be executed just before the SDK's UI is presented. + * This block is executed on the UI thread. Could be used for performing any + * UI changes before the SDK's UI is shown. + * + * @param {preInvocationHandler} preInvocationHandler - A callback that gets executed before + * invoking the SDK + */ + @ReactMethod + public void setPreInvocationHandler(final Callback preInvocationHandler) { + try { + Runnable preInvocationRunnable = new Runnable() { + @Override + public void run() { + preInvocationHandler.invoke(); + } + }; + mInstabug.setPreInvocation(preInvocationRunnable); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Sets a block of code to be executed before sending each report. + * This block is executed in the background before sending each report. Could + * be used for attaching logs and extra data to reports. + * + * @param {preSendingHandler} preSendingHandler - A callback that gets executed before + * sending each bug + * report. + */ + @ReactMethod + public void setPreSendingHandler(final Callback preSendingHandler) { + try { + Runnable preSendingRunnable = new Runnable() { + @Override + public void run() { + preSendingHandler.invoke(); + } + }; + mInstabug.setPreSendingRunnable(preSendingRunnable); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Sets a block of code to be executed right after the SDK's UI is dismissed. + * This block is executed on the UI thread. Could be used for performing any + * UI changes after the SDK's UI is dismissed. + * + * @param {postInvocationHandler} postInvocationHandler - A callback to get executed after + * dismissing the SDK. + */ + @ReactMethod + public void setPostInvocationHandler(final Callback postInvocationHandler) { + try { + + mInstabug.setOnSdkDismissedCallback(new OnSdkDismissedCallback() { + @Override + public void onSdkDismissed(DismissType issueState, Bug.Type bugType) { + postInvocationHandler.invoke(); + } + }); + + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Show any valid survey if exist + * + * @return return true if a valid survey was shown otherwise false + */ + @ReactMethod + public void showSurveysIfAvailable() { + try { + mInstabug.showValidSurvey(); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Show any valid survey if exist + * + * @return return true if a valid survey was shown otherwise false + */ + @ReactMethod + public void setSurveysEnabled(boolean surveysEnabled) { + try { + InstabugSurvey.setSurveysAutoShowing(surveysEnabled); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + + /** + * Sets the runnable that gets executed just before showing any valid survey
+ * WARNING: This runs on your application's main UI thread. Please do not include + * any blocking operations to avoid ANRs. + * + * @param preShowingSurveyRunnable to run on the UI thread before showing any valid survey + */ + @ReactMethod + public void setWillShowSurveyHandler(final Callback willShowSurveyHandler) { + try { + Runnable willShowSurveyRunnable = new Runnable() { + @Override + public void run() { + willShowSurveyHandler.invoke(); + } + }; + mInstabug.setPreShowingSurveyRunnable(willShowSurveyRunnable); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Sets the runnable that gets executed just after showing any valid survey
+ * WARNING: This runs on your application's main UI thread. Please do not include + * any blocking operations to avoid ANRs. + * + * @param afterShowingSurveyRunnable to run on the UI thread after showing any valid survey + */ + @ReactMethod + public void setDidDismissSurveyHandler(final Callback didDismissSurveyHandler) { + try { + Runnable didDismissSurveyRunnable = new Runnable() { + @Override + public void run() { + didDismissSurveyHandler.invoke(); + } + }; + mInstabug.setAfterShowingSurveyRunnable(didDismissSurveyRunnable); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + /** + * Enable/Disable prompt options when SDK invoked. When only a single option is enabled it + * becomes the default + * invocation option that SDK gets invoked with and prompt options screen will not show. When + * none is enabled, Bug + * reporting becomes the default invocation option. + * + * @param {boolean} chat weather Talk to us is enable or not + * @param {boolean} bug weather Report a Problem is enable or not + * @param {boolean} feedback weather General Feedback is enable or not + */ + @ReactMethod + public void setPromptOptionsEnabled(boolean chat, boolean bug, boolean feedback) { + try { + mInstabug.setPromptOptionsEnabled(chat, bug, feedback); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Clears all Uris of the attached files. + * The URIs which added via {@link Instabug#addFileAttachment} API not the physical files. + */ + @ReactMethod + public void clearFileAttachment() { + try { + mInstabug.clearFileAttachment(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + /** + * Sets a block of code that gets executed when a new message is received. + * + * @param {onNewMessgaeHandler} onNewMessageHandler - A callback that gets + * executed when a new message is received. + */ + @ReactMethod + public void setOnNewMessageHandler(final Callback onNewMessageHandler) { + try { + Runnable onNewMessageRunnable = new Runnable() { + @Override + public void run() { + onNewMessageHandler.invoke(); + } + }; + mInstabug.setNewMessageHandler(onNewMessageRunnable); + } catch (java.lang.Exception exception) { + exception.printStackTrace(); + } + } + + private InstabugCustomTextPlaceHolder.Key getStringToKeyConstant(String key) { + String keyInLowerCase = key.toLowerCase(); + switch (keyInLowerCase) { + case SHAKE_HINT: + return InstabugCustomTextPlaceHolder.Key.SHAKE_HINT; + case SWIPE_HINT: + return InstabugCustomTextPlaceHolder.Key.SWIPE_HINT; + case INVALID_EMAIL_MESSAGE: + return InstabugCustomTextPlaceHolder.Key.INVALID_EMAIL_MESSAGE; + case INVALID_COMMENT_MESSAGE: + return InstabugCustomTextPlaceHolder.Key.INVALID_COMMENT_MESSAGE; + case EMAIL_FIELD_HINT: + return InstabugCustomTextPlaceHolder.Key.EMAIL_FIELD_HINT; + case COMMENT_FIELD_HINT_FOR_BUG_REPORT: + return InstabugCustomTextPlaceHolder.Key.COMMENT_FIELD_HINT_FOR_BUG_REPORT; + case COMMENT_FIELD_HINT_FOR_FEEDBACK: + return InstabugCustomTextPlaceHolder.Key.COMMENT_FIELD_HINT_FOR_FEEDBACK; + case INVOCATION_HEADER: + return InstabugCustomTextPlaceHolder.Key.INVOCATION_HEADER; + case START_CHATS: + return InstabugCustomTextPlaceHolder.Key.START_CHATS; + case REPORT_BUG: + return InstabugCustomTextPlaceHolder.Key.REPORT_BUG; + case REPORT_FEEDBACK: + return InstabugCustomTextPlaceHolder.Key.REPORT_FEEDBACK; + case CONVERSATIONS_LIST_TITLE: + return InstabugCustomTextPlaceHolder.Key.CONVERSATIONS_LIST_TITLE; + case ADD_VOICE_MESSAGE: + return InstabugCustomTextPlaceHolder.Key.ADD_VOICE_MESSAGE; + case ADD_IMAGE_FROM_GALLERY: + return InstabugCustomTextPlaceHolder.Key.ADD_IMAGE_FROM_GALLERY; + case ADD_EXTRA_SCREENSHOT: + return InstabugCustomTextPlaceHolder.Key.ADD_EXTRA_SCREENSHOT; + case ADD_VIDEO: + return InstabugCustomTextPlaceHolder.Key.ADD_VIDEO; + case AUDIO_RECORDING_PERMISSION_DENIED: + return InstabugCustomTextPlaceHolder.Key.AUDIO_RECORDING_PERMISSION_DENIED; + case VOICE_MESSAGE_PRESS_AND_HOLD_TO_RECORD: + return InstabugCustomTextPlaceHolder.Key.VOICE_MESSAGE_PRESS_AND_HOLD_TO_RECORD; + case VOICE_MESSAGE_RELEASE_TO_ATTACH: + return InstabugCustomTextPlaceHolder.Key.VOICE_MESSAGE_RELEASE_TO_ATTACH; + case CONVERSATION_TEXT_FIELD_HINT: + return InstabugCustomTextPlaceHolder.Key.CONVERSATION_TEXT_FIELD_HINT; + case REPORT_SUCCESSFULLY_SENT: + return InstabugCustomTextPlaceHolder.Key.REPORT_SUCCESSFULLY_SENT; + case VIDEO_PLAYER_TITLE: + return InstabugCustomTextPlaceHolder.Key.VIDEO_PLAYER_TITLE; + default: + return null; + } + } + private Locale getLocaleByKey(String instabugLocale) { String localeInLowerCase = instabugLocale.toLowerCase(); switch (localeInLowerCase) { case LOCALE_ARABIC: - return new Locale(InstabugLocale.ARABIC.getCode(), InstabugLocale.ARABIC.getCountry()); + return new Locale(InstabugLocale.ARABIC.getCode(), InstabugLocale.ARABIC + .getCountry()); case LOCALE_ENGLISH: - return new Locale(InstabugLocale.ENGLISH.getCode(), InstabugLocale.ENGLISH.getCountry()); + return new Locale(InstabugLocale.ENGLISH.getCode(), InstabugLocale.ENGLISH + .getCountry()); case LOCALE_CZECH: - return new Locale(InstabugLocale.CZECH.getCode(), InstabugLocale.CZECH.getCountry()); + return new Locale(InstabugLocale.CZECH.getCode(), InstabugLocale.CZECH.getCountry + ()); case LOCALE_FRENCH: - return new Locale(InstabugLocale.FRENCH.getCode(), InstabugLocale.FRENCH.getCountry()); + return new Locale(InstabugLocale.FRENCH.getCode(), InstabugLocale.FRENCH + .getCountry()); case LOCALE_GERMAN: - return new Locale(InstabugLocale.GERMAN.getCode(), InstabugLocale.GERMAN.getCountry()); + return new Locale(InstabugLocale.GERMAN.getCode(), InstabugLocale.GERMAN + .getCountry()); case LOCALE_ITALIAN: - return new Locale(InstabugLocale.ITALIAN.getCode(), InstabugLocale.ITALIAN.getCountry()); + return new Locale(InstabugLocale.ITALIAN.getCode(), InstabugLocale.ITALIAN + .getCountry()); case LOCALE_JAPANESE: - return new Locale(InstabugLocale.JAPANESE.getCode(), InstabugLocale.JAPANESE.getCountry()); + return new Locale(InstabugLocale.JAPANESE.getCode(), InstabugLocale.JAPANESE + .getCountry()); case LOCALE_POLISH: - return new Locale(InstabugLocale.POLISH.getCode(), InstabugLocale.POLISH.getCountry()); + return new Locale(InstabugLocale.POLISH.getCode(), InstabugLocale.POLISH + .getCountry()); case LOCALE_RUSSIAN: - return new Locale(InstabugLocale.RUSSIAN.getCode(), InstabugLocale.RUSSIAN.getCountry()); + return new Locale(InstabugLocale.RUSSIAN.getCode(), InstabugLocale.RUSSIAN + .getCountry()); case LOCALE_SPANISH: - return new Locale(InstabugLocale.SPANISH.getCode(), InstabugLocale.SPANISH.getCountry()); + return new Locale(InstabugLocale.SPANISH.getCode(), InstabugLocale.SPANISH + .getCountry()); case LOCALE_SWEDISH: - return new Locale(InstabugLocale.SWEDISH.getCode(), InstabugLocale.SWEDISH.getCountry()); + return new Locale(InstabugLocale.SWEDISH.getCode(), InstabugLocale.SWEDISH + .getCountry()); case LOCALE_TURKISH: - return new Locale(InstabugLocale.TURKISH.getCode(), InstabugLocale.TURKISH.getCountry()); + return new Locale(InstabugLocale.TURKISH.getCode(), InstabugLocale.TURKISH + .getCountry()); case LOCALE_PORTUGUESE_BRAZIL: - return new Locale(InstabugLocale.PORTUGUESE_BRAZIL.getCode(), InstabugLocale.PORTUGUESE_BRAZIL.getCountry()); + return new Locale(InstabugLocale.PORTUGUESE_BRAZIL.getCode(), InstabugLocale + .PORTUGUESE_BRAZIL.getCountry()); case LOCALE_CHINESE_SIMPLIFIED: - return new Locale(InstabugLocale.SIMPLIFIED_CHINESE.getCode(), InstabugLocale.SIMPLIFIED_CHINESE.getCountry()); + return new Locale(InstabugLocale.SIMPLIFIED_CHINESE.getCode(), InstabugLocale + .SIMPLIFIED_CHINESE.getCountry()); case LOCALE_CHINESE_TRADITIONAL: - return new Locale(InstabugLocale.TRADITIONAL_CHINESE.getCode(), InstabugLocale.TRADITIONAL_CHINESE.getCountry()); + return new Locale(InstabugLocale.TRADITIONAL_CHINESE.getCode(), InstabugLocale + .TRADITIONAL_CHINESE.getCountry()); case LOCALE_KOREAN: - return new Locale(InstabugLocale.KOREAN.getCode(), InstabugLocale.KOREAN.getCountry()); + return new Locale(InstabugLocale.KOREAN.getCode(), InstabugLocale.KOREAN + .getCountry()); default: - return new Locale(InstabugLocale.ENGLISH.getCode(), InstabugLocale.ENGLISH.getCountry()); + return new Locale(InstabugLocale.ENGLISH.getCode(), InstabugLocale.ENGLISH + .getCountry()); } } @@ -479,6 +1198,9 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { constants.put("invocationEventTwoFingersSwipe", INVOCATION_EVENT_TWO_FINGERS_SWIPE); constants.put("invocationEventFloatingButton", INVOCATION_EVENT_FLOATING_BUTTON); + constants.put("colorThemeLight", COLOR_THEME_LIGHT); + constants.put("colorThemeDark", COLOR_THEME_DARK); + constants.put("invocationModeNewBug", INVOCATION_MODE_NEW_BUG); constants.put("invocationModeNewFeedback", INVOCATION_MODE_NEW_FEEDBACK); constants.put("invocationModeNewChat", INVOCATION_MODE_NEW_CHAT); @@ -501,6 +1223,30 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule { constants.put("localeSwedish", LOCALE_SWEDISH); constants.put("localeTurkish", LOCALE_TURKISH); + constants.put("shakeHint", SHAKE_HINT); + constants.put("swipeHint", SWIPE_HINT); + constants.put("invalidEmailMessage", INVALID_EMAIL_MESSAGE); + constants.put("invalidCommentMessage", INVALID_COMMENT_MESSAGE); + constants.put("emailFieldHint", EMAIL_FIELD_HINT); + constants.put("commentFieldHintForBugReport", COMMENT_FIELD_HINT_FOR_BUG_REPORT); + constants.put("commentFieldHintForFeedback", COMMENT_FIELD_HINT_FOR_FEEDBACK); + constants.put("invocationHeader", INVOCATION_HEADER); + constants.put("talkToUs", START_CHATS); + constants.put("reportBug", REPORT_BUG); + constants.put("reportFeedback", REPORT_FEEDBACK); + constants.put("conversationsHeaderTitle", CONVERSATIONS_LIST_TITLE); + constants.put("addVoiceMessage", ADD_VOICE_MESSAGE); + constants.put("addImageFromGallery", ADD_IMAGE_FROM_GALLERY); + constants.put("addExtraScreenshot", ADD_EXTRA_SCREENSHOT); + constants.put("addVideoMessage", ADD_VIDEO); + constants.put("audioRecordingPermissionDeniedMessage", AUDIO_RECORDING_PERMISSION_DENIED); + constants.put("recordingMessageToHoldText", VOICE_MESSAGE_PRESS_AND_HOLD_TO_RECORD); + constants.put("recordingMessageToReleaseText", VOICE_MESSAGE_RELEASE_TO_ATTACH); + constants.put("thankYouText", REPORT_SUCCESSFULLY_SENT); + constants.put("video", VIDEO_PLAYER_TITLE); + constants.put("conversationTextFieldHint", CONVERSATION_TEXT_FIELD_HINT); + + return constants; } } diff --git a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativePackage.java b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativePackage.java index 28fba54..70e2f71 100644 --- a/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativePackage.java +++ b/android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativePackage.java @@ -1,4 +1,3 @@ - package com.instabug.reactlibrary; import android.app.Application; @@ -10,91 +9,46 @@ import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.ViewManager; import com.instabug.library.Instabug; import com.instabug.library.InstabugColorTheme; -import com.instabug.library.internal.module.InstabugLocale; import com.instabug.library.invocation.InstabugInvocationEvent; -import com.instabug.library.invocation.util.InstabugFloatingButtonEdge; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.Locale; public class RNInstabugReactnativePackage implements ReactPackage { - Application androidApplication; + private Application androidApplication; private String mAndroidApplicationToken; private Instabug mInstabug; private Instabug.Builder mBuilder; private InstabugInvocationEvent invocationEvent = InstabugInvocationEvent.FLOATING_BUTTON; private InstabugColorTheme instabugColorTheme = InstabugColorTheme.InstabugColorThemeLight; - public RNInstabugReactnativePackage(Instabug instabug) { - this.mInstabug = instabug; + public RNInstabugReactnativePackage(Application androidApplication) { + this.androidApplication = androidApplication; } + @Deprecated public RNInstabugReactnativePackage(String androidApplicationToken, Application application) { this(androidApplicationToken, application, "button"); } - public RNInstabugReactnativePackage(String androidApplicationToken, Application application, String invocationEventValue) { + @Deprecated + public RNInstabugReactnativePackage(String androidApplicationToken, Application application, + String invocationEventValue) { this(androidApplicationToken, application, invocationEventValue, "light"); } + @Deprecated public RNInstabugReactnativePackage(String androidApplicationToken, Application application, String invocationEventValue, String instabugColorThemeValue) { - this.androidApplication = application; - this.mAndroidApplicationToken = androidApplicationToken; - - //setting invocation event - if (invocationEventValue.equals("button")) { - this.invocationEvent = InstabugInvocationEvent.FLOATING_BUTTON; - } else if (invocationEventValue.equals("swipe")) { - this.invocationEvent = InstabugInvocationEvent.TWO_FINGER_SWIPE_LEFT; - - } else if (invocationEventValue.equals("shake")) { - this.invocationEvent = InstabugInvocationEvent.SHAKE; - - } else if (invocationEventValue.equals("screenshot")) { - this.invocationEvent = InstabugInvocationEvent.SCREENSHOT_GESTURE; - - } else if (invocationEventValue.equals("none")) { - this.invocationEvent = InstabugInvocationEvent.NONE; - - } else { - this.invocationEvent = InstabugInvocationEvent.FLOATING_BUTTON; - } - - //setting instabugColorTheme - if (instabugColorThemeValue.equals("light")) { - this.instabugColorTheme = InstabugColorTheme.InstabugColorThemeLight; - } else if (instabugColorThemeValue.equals("dark")) { - this.instabugColorTheme = InstabugColorTheme.InstabugColorThemeDark; - } else { - this.instabugColorTheme = InstabugColorTheme.InstabugColorThemeLight; - } - - - mInstabug = new Instabug.Builder(this.androidApplication, this.mAndroidApplicationToken) - .setFloatingButtonOffsetFromTop(400) - .setTheme(this.instabugColorTheme) - .setInvocationEvent(this.invocationEvent) - .setIntroMessageEnabled(false) - .setAttachmentTypesEnabled(true, true, true, true, true) - .setShouldPlayConversationSounds(true) - .setEnableInAppNotificationSound(true) - .setEnableSystemNotificationSound(false) - .setPromptOptionsEnabled(true, true, true) - .setWillSkipScreenshotAnnotation(false) - .setFloatingButtonEdge(InstabugFloatingButtonEdge.LEFT) - .setLocale(new Locale(InstabugLocale.ENGLISH.getCode(), InstabugLocale.ENGLISH.getCountry())) - .build(); } @Override public List createNativeModules(ReactApplicationContext reactContext) { List modules = new ArrayList<>(); - modules.add(new RNInstabugReactnativeModule(reactContext, this.mInstabug)); + modules.add(new RNInstabugReactnativeModule(reactContext, this.androidApplication)); return modules; } diff --git a/android/src/main/java/com/instabug/reactlibrary/utils/ArrayUtil.java b/android/src/main/java/com/instabug/reactlibrary/utils/ArrayUtil.java new file mode 100644 index 0000000..b5f2c65 --- /dev/null +++ b/android/src/main/java/com/instabug/reactlibrary/utils/ArrayUtil.java @@ -0,0 +1,133 @@ +/* + ArrayUtil exposes a set of helper methods for working with + ReadableArray (by React Native), Object[], and JSONArray. + */ + +package com.instabug.reactlibrary.utils; + +import com.facebook.react.bridge.Arguments; +import com.facebook.react.bridge.ReadableArray; +import com.facebook.react.bridge.ReadableType; +import com.facebook.react.bridge.WritableArray; + +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.json.JSONException; + +public class ArrayUtil { + + public static JSONArray toJSONArray(ReadableArray readableArray) throws JSONException { + JSONArray jsonArray = new JSONArray(); + + for (int i = 0; i < readableArray.size(); i++) { + ReadableType type = readableArray.getType(i); + + switch (type) { + case Null: + jsonArray.put(i, null); + break; + case Boolean: + jsonArray.put(i, readableArray.getBoolean(i)); + break; + case Number: + jsonArray.put(i, readableArray.getDouble(i)); + break; + case String: + jsonArray.put(i, readableArray.getString(i)); + break; + case Map: + jsonArray.put(i, MapUtil.toJSONObject(readableArray.getMap(i))); + break; + case Array: + jsonArray.put(i, ArrayUtil.toJSONArray(readableArray.getArray(i))); + break; + } + } + + return jsonArray; + } + + public static Object[] toArray(JSONArray jsonArray) throws JSONException { + Object[] array = new Object[jsonArray.length()]; + + for (int i = 0; i < jsonArray.length(); i++) { + Object value = jsonArray.get(i); + + if (value instanceof JSONObject) { + value = MapUtil.toMap((JSONObject) value); + } + if (value instanceof JSONArray) { + value = ArrayUtil.toArray((JSONArray) value); + } + + array[i] = value; + } + + return array; + } + + public static Object[] toArray(ReadableArray readableArray) { + Object[] array = new Object[readableArray.size()]; + + for (int i = 0; i < readableArray.size(); i++) { + ReadableType type = readableArray.getType(i); + + switch (type) { + case Null: + array[i] = null; + break; + case Boolean: + array[i] = readableArray.getBoolean(i); + break; + case Number: + array[i] = readableArray.getDouble(i); + break; + case String: + array[i] = readableArray.getString(i); + break; + case Map: + array[i] = MapUtil.toMap(readableArray.getMap(i)); + break; + case Array: + array[i] = ArrayUtil.toArray(readableArray.getArray(i)); + break; + } + } + + return array; + } + + public static WritableArray toWritableArray(Object[] array) { + WritableArray writableArray = Arguments.createArray(); + + for (int i = 0; i < array.length; i++) { + Object value = array[i]; + + if (value == null) { + writableArray.pushNull(); + } + if (value instanceof Boolean) { + writableArray.pushBoolean((Boolean) value); + } + if (value instanceof Double) { + writableArray.pushDouble((Double) value); + } + if (value instanceof Integer) { + writableArray.pushInt((Integer) value); + } + if (value instanceof String) { + writableArray.pushString((String) value); + } + if (value instanceof Map) { + writableArray.pushMap(MapUtil.toWritableMap((Map) value)); + } + if (value.getClass().isArray()) { + writableArray.pushArray(ArrayUtil.toWritableArray((Object[]) value)); + } + } + + return writableArray; + } +} \ No newline at end of file diff --git a/android/src/main/java/com/instabug/reactlibrary/utils/MapUtil.java b/android/src/main/java/com/instabug/reactlibrary/utils/MapUtil.java new file mode 100644 index 0000000..b6539fb --- /dev/null +++ b/android/src/main/java/com/instabug/reactlibrary/utils/MapUtil.java @@ -0,0 +1,143 @@ +/* + MapUtil exposes a set of helper methods for working with + ReadableMap (by React Native), Map, and JSONObject. + */ + +package com.instabug.reactlibrary.utils; + +import com.facebook.react.bridge.Arguments; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.bridge.ReadableMapKeySetIterator; +import com.facebook.react.bridge.ReadableType; +import com.facebook.react.bridge.WritableMap; + +import java.util.Map; +import java.util.HashMap; +import java.util.Iterator; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.json.JSONException; + +public class MapUtil { + + public static JSONObject toJSONObject(ReadableMap readableMap) throws JSONException { + JSONObject jsonObject = new JSONObject(); + + ReadableMapKeySetIterator iterator = readableMap.keySetIterator(); + + while (iterator.hasNextKey()) { + String key = iterator.nextKey(); + ReadableType type = readableMap.getType(key); + + switch (type) { + case Null: + jsonObject.put(key, null); + break; + case Boolean: + jsonObject.put(key, readableMap.getBoolean(key)); + break; + case Number: + jsonObject.put(key, readableMap.getDouble(key)); + break; + case String: + jsonObject.put(key, readableMap.getString(key)); + break; + case Map: + jsonObject.put(key, MapUtil.toJSONObject(readableMap.getMap(key))); + break; + case Array: + jsonObject.put(key, ArrayUtil.toJSONArray(readableMap.getArray(key))); + break; + } + } + + return jsonObject; + } + + public static Map toMap(JSONObject jsonObject) throws JSONException { + Map map = new HashMap<>(); + Iterator iterator = jsonObject.keys(); + + while (iterator.hasNext()) { + String key = iterator.next(); + Object value = jsonObject.get(key); + + if (value instanceof JSONObject) { + value = MapUtil.toMap((JSONObject) value); + } + if (value instanceof JSONArray) { + value = ArrayUtil.toArray((JSONArray) value); + } + + map.put(key, value); + } + + return map; + } + + public static Map toMap(ReadableMap readableMap) { + Map map = new HashMap<>(); + ReadableMapKeySetIterator iterator = readableMap.keySetIterator(); + + while (iterator.hasNextKey()) { + String key = iterator.nextKey(); + ReadableType type = readableMap.getType(key); + + switch (type) { + case Null: + map.put(key, null); + break; + case Boolean: + map.put(key, readableMap.getBoolean(key)); + break; + case Number: + map.put(key, readableMap.getDouble(key)); + break; + case String: + map.put(key, readableMap.getString(key)); + break; + case Map: + map.put(key, MapUtil.toMap(readableMap.getMap(key))); + break; + case Array: + map.put(key, ArrayUtil.toArray(readableMap.getArray(key))); + break; + } + } + + return map; + } + + public static WritableMap toWritableMap(Map map) { + WritableMap writableMap = Arguments.createMap(); + Iterator iterator = map.entrySet().iterator(); + + while (iterator.hasNext()) { + Map.Entry pair = (Map.Entry) iterator.next(); + Object value = pair.getValue(); + + if (value == null) { + writableMap.putNull((String) pair.getKey()); + } else if (value instanceof Boolean) { + writableMap.putBoolean((String) pair.getKey(), (Boolean) value); + } else if (value instanceof Double) { + writableMap.putDouble((String) pair.getKey(), (Double) value); + } else if (value instanceof Integer) { + writableMap.putInt((String) pair.getKey(), (Integer) value); + } else if (value instanceof String) { + writableMap.putString((String) pair.getKey(), (String) value); + } else if (value instanceof Map) { + writableMap.putMap((String) pair.getKey(), MapUtil.toWritableMap((Map) value)); + } else if (value.getClass() != null && value.getClass().isArray()) { + writableMap.putArray((String) pair.getKey(), ArrayUtil.toWritableArray((Object[]) + value)); + } + + iterator.remove(); + } + + return writableMap; + } +} \ No newline at end of file diff --git a/index.js b/index.js index 6a905b3..613c2c9 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,4 @@ -import {NativeModules, NativeAppEventEmitter, Platform} from 'react-native'; - +import {NativeModules, NativeAppEventEmitter, Platform} from "react-native"; let {Instabug} = NativeModules; /** @@ -19,8 +18,7 @@ module.exports = { * the SDK's UI. */ startWithToken: function (token, invocationEvent) { - if (Platform.OS === 'ios') - Instabug.startWithToken(token, invocationEvent); + Instabug.startWithToken(token, invocationEvent); }, /** @@ -96,11 +94,6 @@ module.exports = { Instabug.setUserStepsEnabled(isUserStepsEnabled); }, - /** - * A callback that gets executed before sending each bug report. - * @callback preSendingHandler - */ - /** * Sets a block of code to be executed before sending each report. * This block is executed in the background before sending each report. Could @@ -116,16 +109,11 @@ module.exports = { preSendingHandler ); - Instabug.setPreSendingHandler(preSendingHandler); } - }, - /** - * Sets a block of code to be executed just before the SDK's UI is presented. - * This block is executed on the UI thread. Could be used for performing any - * UI changes before the SDK's UI is shown. - * @callback preSendingHandler - */ + Instabug.setPreSendingHandler(preSendingHandler); + + }, /** * Sets a block of code to be executed just before the SDK's UI is presented. @@ -140,19 +128,11 @@ module.exports = { 'IBGpreInvocationHandler', preInvocationHandler ); - - Instabug.setPreInvocationHandler(preInvocationHandler); } - }, - /** - * A callback that gets executed after the SDK's UI is dismissed. - * @callback postInvocationHandler - * @param {dismissType} dismissType How the SDK was dismissed. - * @param {reportType} reportType Type of report that has been sent. Will be set - * to IBGReportTypeBug in case the SDK has been dismissed without selecting a - * report type, so you might need to check issueState before reportType - */ + Instabug.setPreInvocationHandler(preInvocationHandler); + + }, /** * Sets a block of code to be executed right after the SDK's UI is dismissed. @@ -170,9 +150,10 @@ module.exports = { postInvocationHandler(payload['dismissType'], payload['reportType']); } ); - - Instabug.setPostInvocationHandler(postInvocationHandler); } + + Instabug.setPostInvocationHandler(postInvocationHandler); + }, /** @@ -211,24 +192,15 @@ module.exports = { * bug reporting, while passing NO will disable it for both. */ setWillSkipScreenshotAnnotation: function (willSkipScreenshotAnnotation) { - if (Platform.OS === 'ios') { - Instabug.setWillSkipScreenshotAnnotation(willSkipScreenshotAnnotation); - } + Instabug.setWillSkipScreenshotAnnotation(willSkipScreenshotAnnotation); }, - /** - * return callback - * @callback messageCountCallback - * @param{number} responseCount Notifications count, or -1 incase the SDK has - * not been initialized. - */ - /** * Returns the number of unread messages the user currently has. * Use this method to get the number of unread messages the user * has, then possibly notify them about it with your own UI. * @param {messageCountCallback} messageCountCallback callback with argument - * Notifications count, or -1 incase the SDK has not been initialized. + * Notifications count, or -1 in case the SDK has not been initialized. */ getUnreadMessagesCount: function (messageCountCallback) { Instabug.getUnreadMessagesCount(messageCountCallback); @@ -263,8 +235,7 @@ module.exports = { * field is required or not. */ setEmailFieldRequired: function (isEmailFieldRequired) { - if (Platform.OS === 'ios') - Instabug.setEmailFieldRequired(isEmailFieldRequired); + Instabug.setEmailFieldRequired(isEmailFieldRequired); }, /** @@ -274,8 +245,7 @@ module.exports = { * field is required or not. */ setCommentFieldRequired: function (isCommentFieldRequired) { - if (Platform.OS === 'ios') - Instabug.setCommentFieldRequired(isCommentFieldRequired); + Instabug.setCommentFieldRequired(isCommentFieldRequired); }, /** @@ -337,8 +307,7 @@ module.exports = { * @param colorTheme */ setColorTheme: function (colorTheme) { - if (Platform.OS === 'ios') - Instabug.setColorTheme(colorTheme); + Instabug.setColorTheme(colorTheme); }, /** @@ -358,9 +327,7 @@ module.exports = { * @param {string[]} tags An array of tags to append to current tags. */ appendTags: function (tags) { - if (Platform.OS === 'ios') - Instabug.appendTags(tags); - + Instabug.appendTags(tags); }, /** @@ -391,8 +358,7 @@ module.exports = { * @param {strings} key Key of string to override. */ setStringToKey: function (string, key) { - if (Platform.OS === 'ios') - Instabug.setString(string, key); + Instabug.setString(string, key); }, /** @@ -422,11 +388,6 @@ module.exports = { Instabug.setChatNotificationEnabled(isChatNotificationEnabled); }, - /** - * A callback that gets executed when a new message is received. - * @callback onNewMessgaeHandler - */ - /** * Sets a block of code that gets executed when a new message is received. * @param {onNewMessgaeHandler} onNewMessageHandler - A callback that gets @@ -439,33 +400,11 @@ module.exports = { 'IBGonNewMessageHandler', onNewMessgaeHandler ); - - Instabug.setOnNewMessageHandler(onNewMessgaeHandler); } - }, - /** - * Enables/disables prompt options when SDK is invoked. - * When only a single option is enabled, it become the default invocation mode. - * If all options are disabled, bug reporting becomes the default invocation mode. - * By default, all three options are enabled. - * @param {boolean} isBugReportingEnabled A boolean to indicate whether bug reports - * are enabled or disabled. - * @param {boolean} isFeedbackReportingEnabled A boolean to indicate whether feedback is - * enabled or disabled. - * @param {boolean} isChatEnabled A boolean to indicate whether chat is enabled - * or disabled. - */ - setPromptOptions: function (isBugReportingEnabled, isFeedbackReportingEnabled, isChatEnabled) { - if (Platform.OS === 'ios') - Instabug.setPromptOptions(isBugReportingEnabled, isFeedbackReportingEnabled, isChatEnabled); - }, + Instabug.setOnNewMessageHandler(onNewMessgaeHandler); - /** - * return callback - * @callback isInstabugNotificationCallback - * @param {boolean} isInstabugNotification - */ + }, /** * Checks if a notification is from Instabug. @@ -482,6 +421,284 @@ module.exports = { Instabug.isInstabugNotification(dict, isInstabugNotificationCallback); }, + /** + * Sets the default value of the user's email and hides the email field from the reporting UI + * and set the user's name to be included with all reports. + * It also reset the chats on device to that email and removes user attributes, user data and completed surveys. + * @param {string} email Email address to be set as the user's email. + * @param {string} name Name of the user to be set. + */ + identifyUserWithEmail: function (email, name) { + if (Platform.OS == 'ios') { + Instabug.identifyUserWithEmail(email, name); + } else if ('android') { + Instabug.identifyUser(name, email); + } + }, + + /** + * Sets the default value of the user's email to nil and show email field and remove user name from all reports + * It also reset the chats on device and removes user attributes, user data and completed surveys. + */ + logOut: function () { + Instabug.logOut(); + }, + + /** + * Sets an array of report categories to be shown for users to select from before reporting a bug or sending + * feedback. + * Use this method to give users a list of choices of categories their bug report or feedback might be related + * to. Selected category will be shown as a tag on your dashboard. + * @param {array} titles titles to be shown in the list. + */ + setReportCategories: function (...titles) { + if (Platform.OS == 'ios') { + Instabug.setReportCategories(titles, null); + } else if (Platform.OS == 'android') { + Instabug.setReportCategories(titles); + } + }, + + /** + * Logs a user event that happens through the lifecycle of the application. + * Logged user events are going to be sent with each report, as well as at the end of a session. + * @param {string} name Event name. + */ + logUserEventWithName: function (name) { + Instabug.logUserEventWithName(name); + }, + + /** + * Logs a user event that happens through the lifecycle of the application. + * Logged user events are going to be sent with each report, as well as at the end of a session. + * @param {string} name Event name. + * @param {Object} params An optional dictionary or parameters to be associated with the event. + */ + logUserEventWithNameAndParams: function (name, params) { + Instabug.logUserEventWithNameAndParams(name, params); + }, + + /** + * Appends a log message to Instabug internal log + *

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

+ * Note: logs passed to this method are NOT printed to Logcat + * + * @param message the message + */ + logVerbose: function (message) { + if (!message)return; + if (Platform.OS === 'android') { + Instabug.log("v", message); + } else { + Instabug.logVerbose(message); + } + }, + + /** + * Appends a log message to Instabug internal log + *

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

+ * Note: logs passed to this method are NOT printed to Logcat + * + * @param message the message + */ + logInfo: function (message) { + if (!message)return; + if (Platform.OS === 'android') { + Instabug.log("i", message); + } else { + Instabug.logInfo(message); + } + }, + + /** + * Appends a log message to Instabug internal log + *

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

+ * Note: logs passed to this method are NOT printed to Logcat + * + * @param message the message + */ + logDebug: function (message) { + if (!message)return; + if (Platform.OS === 'android') { + Instabug.log("d", message); + } else { + Instabug.logDebug(message); + } + }, + + /** + * Appends a log message to Instabug internal log + *

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

+ * Note: logs passed to this method are NOT printed to Logcat + * + * @param message the message + */ + logError: function (message) { + if (!message)return; + if (Platform.OS === 'android') { + Instabug.log("e", message); + } else { + Instabug.logError(message); + } + }, + + /** + * Appends a log message to Instabug internal log + *

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

+ * Note: logs passed to this method are NOT printed to Logcat + * + * @param message the message + */ + logWarn: function (message) { + if (!message)return; + if (Platform.OS === 'android') { + Instabug.log("w", message); + } else { + Instabug.logWarn(message); + } + }, + + /** + * Sets user attribute to overwrite it's value or create a new one if it doesn't exist. + * + * @param key the attribute + * @param value the value + */ + setUserAttribute: function (key, value) { + if (!key || !value || typeof key !== "string" || typeof value !== "string") + throw new TypeError("Invalid param, Expected String"); + Instabug.setUserAttribute(key, value); + }, + + /** + * Returns the user attribute associated with a given key. + aKey + * @param {string} key The attribute key as string + * @param {userAttributeCallback} userAttributeCallback callback with argument as the desired user attribute value + */ + getUserAttribute: function (key, userAttributeCallback) { + Instabug.getUserAttribute(key, userAttributeCallback); + }, + + /** + * Removes user attribute if exists. + * + * @param key the attribute key as string + * @see #setUserAttribute(String, String) + */ + removeUserAttribute: function (key) { + if (!key || typeof key !== "string") + throw new TypeError("Invalid param, Expected String"); + Instabug.removeUserAttribute(key); + }, + + /** + * @summary Returns all user attributes. + * @param {userAttributesCallback} userAttributesCallback callback with argument A new dictionary containing all the currently set user attributes, + * or an empty dictionary if no user attributes have been set. + */ + getAllUserAttributes: function (userAttributesCallback) { + Instabug.getAllUserAttributes(userAttributesCallback); + }, + + /** + * Clears all user attributes if exists. + */ + clearAllUserAttributes: function () { + Instabug.clearAllUserAttributes(); + }, + + setViewHirearchyEnabled: function (viewHirearchyEnabled) { + Instabug.setViewHirearchyEnabled(viewHirearchyEnabled); + }, + + setSurveysEnabled: function (surveysEnabled) { + Instabug.setSurveysEnabled(surveysEnabled) + }, + + showSurveysIfAvailable: function () { + Instabug.showSurveysIfAvailable() + }, + + setWillShowSurveyHandler: function (willShowSurveyHandler) { + if (Platform.OS === 'ios') { + Instabug.addListener('IBGWillShowSurvey'); + NativeAppEventEmitter.addListener( + 'IBGWillShowSurvey', + willShowSurveyHandler + ); + } + + Instabug.setWillShowSurveyHandler(willShowSurveyHandler); + + }, + + setDidDismissSurveyHandler: function (didDismissSurveyHandler) { + if (Platform.OS === 'ios') { + Instabug.addListener('IBGDidDismissSurvey'); + NativeAppEventEmitter.addListener( + 'IBGDidDismissSurvey', + didDismissSurveyHandler + ); + } + + Instabug.setDidDismissSurveyHandler(didDismissSurveyHandler); + + }, + + /** + * Enable/Disable prompt options when SDK invoked. When only a single option is enabled it + * becomes the default + * invocation option that SDK gets invoked with and prompt options screen will not show. When + * none is enabled, Bug + * reporting becomes the default invocation option. + * + * @param {boolean} chat weather Talk to us is enable or not + * @param {boolean} bug weather Report a Problem is enable or not + * @param {boolean} feedback weather General Feedback is enable or not + * */ + setPromptOptionsEnabled: function (chat, bug, feedback) { + Instabug.setPromptOptionsEnabled(chat, bug, feedback); + }, + + /** + * Clears all Uris of the attached files. + * The URIs which added via {@link Instabug#addFileAttachment} API not the physical files. + */ + clearFileAttachment: function () { + Instabug.clearFileAttachment(); + }, + /** * The event used to invoke the feedback form * @readonly @@ -491,9 +708,10 @@ module.exports = { none: Instabug.invocationEventNone, shake: Instabug.invocationEventShake, screenshot: Instabug.invocationEventScreenshot, - twoFingersSwipe: Instabug.invocationEventTwoFingersSwipe, + twoFingersSwipe: Instabug.invocationEventTwoFingersSwipeLeft, floatingButton: Instabug.invocationEventFloatingButton }, + /** * Type of SDK dismiss * @readonly @@ -504,6 +722,7 @@ module.exports = { cancel: Instabug.dismissTypeCancel, addAttachment: Instabug.dismissTypeAddAttachment }, + /** * Type of report to be submit * @readonly @@ -513,6 +732,7 @@ module.exports = { bug: Instabug.reportTypeBug, feedback: Instabug.reportTypeFeedback }, + /** * The mode used upon invocating the SDK * @readonly @@ -525,6 +745,7 @@ module.exports = { newChat: Instabug.invocationModeNewChat, chatsList: Instabug.invocationModeChatsList }, + /** * The supported locales * @readonly @@ -548,6 +769,7 @@ module.exports = { swedish: Instabug.localeSwedish, turkish: Instabug.localeTurkish }, + /** * The color theme of the different UI elements * @readonly @@ -557,6 +779,7 @@ module.exports = { light: Instabug.colorThemeLight, dark: Instabug.colorThemeDark }, + /** * Rectangle edges * @readonly @@ -568,6 +791,7 @@ module.exports = { maxX: Instabug.rectMaxXEdge, maxY: Instabug.rectMaxYEdge }, + /** * Instabug strings * @readonly @@ -611,6 +835,7 @@ module.exports = { chatsHeaderTitle: Instabug.chatsHeaderTitle, team: Instabug.team, messageNotification: Instabug.messageNotification, - messagesNotificationAndOthers: Instabug.messagesNotificationAndOthers + messagesNotificationAndOthers: Instabug.messagesNotificationAndOthers, + conversationTextFieldHint: Instabug.conversationTextFieldHint } }; diff --git a/ios/RNInstabug/InstabugReactBridge.m b/ios/RNInstabug/InstabugReactBridge.m index a155b81..e471155 100644 --- a/ios/RNInstabug/InstabugReactBridge.m +++ b/ios/RNInstabug/InstabugReactBridge.m @@ -26,6 +26,8 @@ RCT_EXPORT_MODULE(Instabug) RCT_EXPORT_METHOD(startWithToken:(NSString *)token invocationEvent:(IBGInvocationEvent)invocationEvent) { [Instabug startWithToken:token invocationEvent:invocationEvent]; + [Instabug setCrashReportingEnabled:NO]; + [Instabug setNetworkLoggingEnabled:NO]; } RCT_EXPORT_METHOD(invoke) { @@ -204,6 +206,92 @@ RCT_EXPORT_METHOD(isInstabugNotification:(NSDictionary *)notification callback:( callBack(@[@([Instabug isInstabugNotification:notification])]); } +RCT_EXPORT_METHOD(addFileAttachment:(NSString *)fileURLString) { + [Instabug addFileAttachmentWithURL:[NSURL URLWithString:fileURLString]]; +} + +RCT_EXPORT_METHOD(clearFileAttachments) { + [Instabug clearFileAttachments]; +} + +RCT_EXPORT_METHOD(setShowEmailField:(BOOL)shouldShowEmailField) { + [Instabug setShowEmailField:shouldShowEmailField]; +} + +RCT_EXPORT_METHOD(identifyUserWithEmail:(NSString *)email name:(NSString *)name) { + [Instabug identifyUserWithEmail:email name:name]; +} + +RCT_EXPORT_METHOD(logout) { + [Instabug logOut]; +} + +RCT_EXPORT_METHOD(setPostSendingDialogEnabled:(BOOL)isPostSendingDialogEnabled) { + [Instabug setPostSendingDialogEnabled:isPostSendingDialogEnabled]; +} + +RCT_EXPORT_METHOD(setReportCategories:(NSArray *)titles iconNames:(NSArray *)names) { + [Instabug setReportCategoriesWithTitles:titles iconNames:names]; +} + +RCT_EXPORT_METHOD(setUserAttribute:(NSString *)value withKey:(NSString *)key) { + [Instabug setUserAttribute:value withKey:key]; +} + +RCT_EXPORT_METHOD(getUserAttribute:(NSString *)key callback:(RCTResponseSenderBlock)callback) { + callback(@[[Instabug userAttributeForKey:key]]); +} + +RCT_EXPORT_METHOD(removeUserAttribute:(NSString *)key) { + [Instabug removeUserAttributeForKey:key]; +} + +RCT_EXPORT_METHOD(getAllUserAttributes:(RCTResponseSenderBlock)callback) { + callback(@[[Instabug userAttributes]]); +} + +RCT_EXPORT_METHOD(clearAllUserAttributes) { + for (NSString *key in [Instabug userAttributes].allKeys) { + [Instabug removeUserAttributeForKey:key]; + } +} + +RCT_EXPORT_METHOD(setViewHierarchyEnabled:(BOOL)viewHierarchyEnabled) { + [Instabug setViewHierarchyEnabled:viewHierarchyEnabled]; +} + +RCT_EXPORT_METHOD(logUserEventWithName:(NSString *)name) { + [Instabug logUserEventWithName:name]; +} + +RCT_EXPORT_METHOD(logUserEventWithNameAndParams:(NSString *)name params:(nullable NSDictionary *)params) { + [Instabug logUserEventWithName:name params:params]; +} + +RCT_EXPORT_METHOD(log:(NSString *)log) { + [Instabug IBGLog:log]; +} + +RCT_EXPORT_METHOD(logVerbose:(NSString *)log) { + [Instabug logVerbose:log]; +} + +RCT_EXPORT_METHOD(logDebug:(NSString *)log) { + [Instabug logDebug:log]; +} + +RCT_EXPORT_METHOD(logInfo:(NSString *)log) { + [Instabug logInfo:log]; +} + +RCT_EXPORT_METHOD(logWarn:(NSString *)log) { + [Instabug logWarn:log]; +} + +RCT_EXPORT_METHOD(logError:(NSString *)log) { + [Instabug logError:log]; +} + - (NSDictionary *)constantsToExport { return @{ @"invocationEventNone" : @(IBGInvocationEventNone), @@ -287,6 +375,11 @@ RCT_EXPORT_METHOD(isInstabugNotification:(NSDictionary *)notification callback:( @"audio": @(IBGStringAudio), @"screenRecording": @(IBGStringScreenRecording), @"image": @(IBGStringImage), + @"surveyEnterYourAnswer": @(IBGStringSurveyEnterYourAnswerPlaceholder), + @"surveyNoAnswerTitle": @(kIBGStringSurveyNoAnswerTitle), + @"surveyNoAnswerMessage": @(kIBGStringSurveyNoAnswerMessage), + @"surveySubmitTitle": @(kIBGStringSurveySubmitTitle), + @"videPressRecord": @(kIBGStringVideoPressRecordTitle) }; }; diff --git a/ios/RNInstabug/RCTConvert+InstabugEnums.m b/ios/RNInstabug/RCTConvert+InstabugEnums.m index f3d7bd2..d20ba8c 100644 --- a/ios/RNInstabug/RCTConvert+InstabugEnums.m +++ b/ios/RNInstabug/RCTConvert+InstabugEnums.m @@ -107,5 +107,10 @@ RCT_ENUM_CONVERTER(IBGString, (@{ @"audio": @(IBGStringAudio), @"screenRecording": @(IBGStringScreenRecording), @"image": @(IBGStringImage), + @"surveyEnterYourAnswer": @(IBGStringSurveyEnterYourAnswerPlaceholder), + @"surveyNoAnswerTitle": @(kIBGStringSurveyNoAnswerTitle), + @"surveyNoAnswerMessage": @(kIBGStringSurveyNoAnswerMessage), + @"surveySubmitTitle": @(kIBGStringSurveySubmitTitle), + @"videPressRecord": @(kIBGStringVideoPressRecordTitle) }), IBGStringShakeHint, integerValue); @end diff --git a/package.json b/package.json index 16e97ff..2a9b232 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,6 @@ "version": "1.0.8", "description": "React Native plugin for integrating the Instabug SDK", "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, "repository": { "type": "git", "url": "git+https://github.com/Instabug/instabug-reactnative.git" @@ -26,7 +23,7 @@ "homepage": "https://github.com/Instabug/instabug-reactnative#readme", "rnpm": { "android": { - "packageInstance": "new RNInstabugReactnativePackage(\"YOUR_ANDROID_APPLICATION_TOKEN\",MainApplication.this,\"button\")" + "packageInstance": "new RNInstabugReactnativePackage(MainApplication.this)" } } }