├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── RNSecureStorage.podspec ├── android ├── README.md ├── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── li │ └── yunqi │ └── rnsecurestorage │ ├── DeviceAvailability.java │ ├── PrefsStorage.java │ ├── RNSecureStorageModule.java │ ├── RNSecureStoragePackage.java │ ├── cipherstorage │ ├── CipherStorage.java │ ├── CipherStorageFacebookConceal.java │ └── CipherStorageKeystoreAESCBC.java │ └── exceptions │ ├── CryptoFailedException.java │ ├── EmptyParameterException.java │ └── KeyStoreAccessException.java ├── example ├── .babelrc ├── .buckconfig ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .watchmanconfig ├── App.js ├── __tests__ │ └── App.js ├── android │ ├── app │ │ ├── BUCK │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── keystores │ │ ├── BUCK │ │ └── debug.keystore.properties │ └── settings.gradle ├── app.json ├── index.js ├── ios │ ├── example-tvOS │ │ └── Info.plist │ ├── example-tvOSTests │ │ └── Info.plist │ ├── example.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── example-tvOS.xcscheme │ │ │ └── example.xcscheme │ ├── example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ └── exampleTests │ │ ├── Info.plist │ │ └── exampleTests.m ├── package.json └── yarn.lock ├── index.js ├── ios ├── RNSecureStorage.h ├── RNSecureStorage.m ├── RNSecureStorage.xcodeproj │ └── project.pbxproj └── RNSecureStorage.xcworkspace │ └── contents.xcworkspacedata ├── package.json └── yarn.lock /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # OSX 3 | # 4 | .DS_Store 5 | 6 | # node.js 7 | # 8 | node_modules/ 9 | npm-debug.log 10 | yarn-error.log 11 | 12 | 13 | # Xcode 14 | # 15 | build/ 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | xcuserdata 25 | *.xccheckout 26 | *.moved-aside 27 | DerivedData 28 | *.hmap 29 | *.ipa 30 | *.xcuserstate 31 | project.xcworkspace 32 | 33 | 34 | # Android/IntelliJ 35 | # 36 | build/ 37 | .idea 38 | .gradle 39 | local.properties 40 | *.iml 41 | 42 | # BUCK 43 | buck-out/ 44 | \.buckd/ 45 | *.keystore 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Yunqi Ouyang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # react-native-secure-storage 3 | 4 | This package is based on [react-native-keychain](https://www.npmjs.com/package/react-native-keychain) and implemented a secure storage engine. It is compatiable with [redux-persist-sensitive-storage](https://www.npmjs.com/package/redux-persist-sensitive-storage) 5 | 6 | ## Getting started 7 | 8 | `$ npm install react-native-secure-storage --save` 9 | 10 | or 11 | 12 | `$ yarn add react-native-secure-storage` 13 | 14 | ### Mostly automatic installation 15 | 16 | `$ react-native link react-native-secure-storage` 17 | 18 | ### Manual installation 19 | 20 | 21 | #### iOS 22 | 23 | 1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]` 24 | 2. Go to `node_modules` ➜ `react-native-secure-storage` and add `RNSecureStorage.xcodeproj` 25 | 3. In XCode, in the project navigator, select your project. Add `libRNSecureStorage.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` 26 | 4. Run your project (`Cmd+R`)< 27 | 28 | #### Android 29 | 30 | 1. Open up `android/app/src/main/java/[...]/MainApplication.java` 31 | - Add `import li.yunqi.rnsecurestorage.RNSecureStoragePackage;` to the imports at the top of the file 32 | - Add `new RNSecureStoragePackage()` to the list returned by the `getPackages()` method 33 | 2. Append the following lines to `android/settings.gradle`: 34 | ``` 35 | include ':react-native-secure-storage' 36 | project(':react-native-secure-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-secure-storage/android') 37 | ``` 38 | 3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: 39 | ``` 40 | implementation project(':react-native-secure-storage') 41 | ``` 42 | 43 | 44 | ## Usage 45 | ```javascript 46 | import SecureStorage, { ACCESS_CONTROL, ACCESSIBLE, AUTHENTICATION_TYPE } from 'react-native-secure-storage' 47 | 48 | async() => { 49 | const config = { 50 | accessControl: ACCESS_CONTROL.BIOMETRY_ANY_OR_DEVICE_PASSCODE, 51 | accessible: ACCESSIBLE.WHEN_UNLOCKED, 52 | authenticationPrompt: 'auth with yourself', 53 | service: 'example', 54 | authenticateType: AUTHENTICATION_TYPE.BIOMETRICS, 55 | } 56 | const key = 'someKey' 57 | await SecureStorage.setItem(key, 'some value', config) 58 | const got = await SecureStorage.getItem(key, config) 59 | console.log(got) 60 | } 61 | ``` 62 | 63 | ### Methods 64 | 65 | This library has now implemented `getItem`, `setItem`, `removeItem` and `getAllKeys` methods of `AsyncStorage` from [React Native](http://facebook.github.io/react-native/). It doesn't support callback and replaced the `callback` param with an `option` param. 66 | 67 | In addition, this library has a `getSupportedBiometryType()` method which Returns one of `BIOMETRY_TYPE` indicating which biometry type the device supports, and a `canCheckAuthentication([{ authenticationType }])` method which checks whether the specified authenticationType is available. 68 | 69 | ### Options 70 | 71 | | Key | Platform | Description | Default | 72 | |---|---|---|---| 73 | |**`accessControl`**|iOS only|This dictates how a keychain item may be used, see possible values in `SecureStorage.ACCESS_CONTROL`. |*None*| 74 | |**`accessible`**|iOS only|This dictates when a keychain item is accessible, see possible values in `SecureStorage.ACCESSIBLE`. |*`SecureStorage.ACCESSIBLE.WHEN_UNLOCKED`*| 75 | |**`accessGroup`**|iOS only|In which App Group to share the keychain. Requires additional setup with entitlements. |*None*| 76 | |**`authenticationPrompt`**|iOS only|What to prompt the user when unlocking the keychain with biometry or device password. |`Authenticate to retrieve secret data`| 77 | |**`authenticationType`**|iOS only|Policies specifying which forms of authentication are acceptable. |`SecureStorage.AUTHENTICATION_TYPE.DEVICE_PASSCODE_OR_BIOMETRICS`| 78 | |**`service`**|All|Qualifier for the service. |*App bundle ID*| 79 | 80 | #### `SecureStorage.ACCESS_CONTROL` enum 81 | 82 | | Key | Description | 83 | |-----|-------------| 84 | |**`USER_PRESENCE`**|Constraint to access an item with either Touch ID or passcode.| 85 | |**`BIOMETRY_ANY`**|Constraint to access an item with Touch ID for any enrolled fingers.| 86 | |**`BIOMETRY_CURRENT_SET`**|Constraint to access an item with Touch ID for currently enrolled fingers.| 87 | |**`DEVICE_PASSCODE`**|Constraint to access an item with a passcode.| 88 | |**`APPLICATION_PASSWORD`**|Constraint to use an application-provided password for data encryption key generation.| 89 | |**`BIOMETRY_ANY_OR_DEVICE_PASSCODE`**|Constraint to access an item with Touch ID for any enrolled fingers or passcode.| 90 | |**`BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE`**|Constraint to access an item with Touch ID for currently enrolled fingers or passcode.| 91 | 92 | #### `SecureStorage.ACCESSIBLE` enum 93 | 94 | | Key | Description | 95 | |-----|-------------| 96 | |**`WHEN_UNLOCKED`**|The data in the keychain item can be accessed only while the device is unlocked by the user.| 97 | |**`AFTER_FIRST_UNLOCK`**|The data in the keychain item cannot be accessed after a restart until the device has been unlocked once by the user.| 98 | |**`ALWAYS`**|The data in the keychain item can always be accessed regardless of whether the device is locked.| 99 | |**`WHEN_PASSCODE_SET_THIS_DEVICE_ONLY`**|The data in the keychain can only be accessed when the device is unlocked. Only available if a passcode is set on the device. Items with this attribute never migrate to a new device.| 100 | |**`WHEN_UNLOCKED_THIS_DEVICE_ONLY`**|The data in the keychain item can be accessed only while the device is unlocked by the user. Items with this attribute do not migrate to a new device.| 101 | |**`AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY`**|The data in the keychain item cannot be accessed after a restart until the device has been unlocked once by the user. Items with this attribute never migrate to a new device.| 102 | |**`ALWAYS_THIS_DEVICE_ONLY`**|The data in the keychain item can always be accessed regardless of whether the device is locked. Items with this attribute never migrate to a new device.| 103 | 104 | #### `SecureStorage.AUTHENTICATION_TYPE` enum 105 | 106 | | Key | Description | 107 | |-----|-------------| 108 | |**`DEVICE_PASSCODE_OR_BIOMETRICS`**|Device owner is going to be authenticated by biometry or device passcode.| 109 | |**`BIOMETRICS`**|Device owner is going to be authenticated using a biometric method (Touch ID or Face ID).| 110 | 111 | #### `SecureStorage.BIOMETRY_TYPE` enum 112 | 113 | | Key | Description | 114 | |-----|-------------| 115 | |**`TOUCH_ID`**|Device supports authentication with Touch ID.| 116 | |**`FACE_ID`**|Device supports authentication with Face ID.| 117 | |**`FINGERPRINT`**|Device supports authentication with Android Fingerprint.| 118 | 119 | 120 | -------------------------------------------------------------------------------- /RNSecureStorage.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "RNSecureStorage" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = <<-DESC 10 | RNSecureStorage 11 | DESC 12 | s.homepage = "https://github.com/oyyq99999/react-native-secure-storage" 13 | s.license = "MIT" 14 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 15 | s.author = { "Yunqi Ouyang" => "oyyq9999999@163.com" } 16 | s.platform = :ios, "7.0" 17 | s.source = { :git => "https://github.com/oyyq99999/react-native-secure-storage.git", :tag => "#{s.version}" } 18 | 19 | s.source_files = "ios/**/*.{h,m}" 20 | s.requires_arc = true 21 | 22 | s.dependency "React" 23 | #s.dependency "others" 24 | end 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/README.md: -------------------------------------------------------------------------------- 1 | 2 | README 3 | ====== 4 | 5 | If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: 6 | 7 | 1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed 8 | 2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK 9 | ``` 10 | ndk.dir=/Users/{key}/Library/Android/sdk/ndk-bundle 11 | sdk.dir=/Users/{key}/Library/Android/sdk 12 | ``` 13 | 3. Delete the `maven` folder 14 | 4. Run `sudo ./gradlew installArchives` 15 | 5. Verify that latest set of generated files is in the maven folder with the correct version number 16 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | buildscript { 3 | repositories { 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | // Matches the RN Hello World template 9 | // https://github.com/facebook/react-native/blob/1e8f3b11027fe0a7514b4fc97d0798d3c64bc895/local-cli/templates/HelloWorld/android/build.gradle#L8 10 | classpath 'com.android.tools.build:gradle:2.3.3' 11 | } 12 | } 13 | 14 | apply plugin: 'com.android.library' 15 | apply plugin: 'maven' 16 | 17 | android { 18 | compileSdkVersion 26 19 | buildToolsVersion "26.0.3" 20 | 21 | defaultConfig { 22 | minSdkVersion 16 23 | targetSdkVersion 26 24 | versionCode 1 25 | versionName "1.0" 26 | } 27 | lintOptions { 28 | abortOnError false 29 | } 30 | } 31 | 32 | repositories { 33 | maven { 34 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 35 | // Matches the RN Hello World template 36 | // https://github.com/facebook/react-native/blob/1e8f3b11027fe0a7514b4fc97d0798d3c64bc895/local-cli/templates/HelloWorld/android/build.gradle#L21 37 | url "$projectDir/../node_modules/react-native/android" 38 | } 39 | mavenCentral() 40 | } 41 | 42 | dependencies { 43 | compile 'com.facebook.react:react-native:+' 44 | compile 'com.facebook.conceal:conceal:1.1.3@aar' 45 | } 46 | 47 | def configureReactNativePom(def pom) { 48 | def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text) 49 | 50 | pom.project { 51 | name packageJson.title 52 | artifactId packageJson.name 53 | version = packageJson.version 54 | group = "li.yunqi.rnsecurestorage" 55 | description packageJson.description 56 | url packageJson.repository.baseUrl 57 | 58 | licenses { 59 | license { 60 | name packageJson.license 61 | url packageJson.repository.baseUrl + '/blob/master/' + packageJson.licenseFilename 62 | distribution 'repo' 63 | } 64 | } 65 | 66 | developers { 67 | developer { 68 | id packageJson.author.username 69 | name packageJson.author.name 70 | } 71 | } 72 | } 73 | } 74 | 75 | afterEvaluate { project -> 76 | 77 | task androidJavadoc(type: Javadoc) { 78 | source = android.sourceSets.main.java.srcDirs 79 | classpath += files(android.bootClasspath) 80 | classpath += files(project.getConfigurations().getByName('compile').asList()) 81 | include '**/*.java' 82 | } 83 | 84 | task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { 85 | classifier = 'javadoc' 86 | from androidJavadoc.destinationDir 87 | } 88 | 89 | task androidSourcesJar(type: Jar) { 90 | classifier = 'sources' 91 | from android.sourceSets.main.java.srcDirs 92 | include '**/*.java' 93 | } 94 | 95 | android.libraryVariants.all { variant -> 96 | def name = variant.name.capitalize() 97 | task "jar${name}"(type: Jar, dependsOn: variant.javaCompile) { 98 | from variant.javaCompile.destinationDir 99 | } 100 | } 101 | 102 | artifacts { 103 | archives androidSourcesJar 104 | archives androidJavadocJar 105 | } 106 | 107 | task installArchives(type: Upload) { 108 | configuration = configurations.archives 109 | repositories.mavenDeployer { 110 | // Deploy to react-native-event-bridge/maven, ready to publish to npm 111 | repository url: "file://${projectDir}/../android/maven" 112 | 113 | configureReactNativePom pom 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oyyq99999/react-native-secure-storage/7e7e329ef5319da895722c9e2f2474a93522340a/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Mar 26 12:20:59 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/java/li/yunqi/rnsecurestorage/DeviceAvailability.java: -------------------------------------------------------------------------------- 1 | package li.yunqi.rnsecurestorage; 2 | 3 | import android.content.Context; 4 | import android.hardware.fingerprint.FingerprintManager; 5 | import android.os.Build; 6 | 7 | /** 8 | * Created by ouyangyunqi on 2018/3/26. 9 | */ 10 | 11 | class DeviceAvailability { 12 | 13 | public static boolean isFingerprintAuthAvailable(Context context) { 14 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 15 | FingerprintManager fingerprintManager = 16 | (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE); 17 | return fingerprintManager.isHardwareDetected() && 18 | fingerprintManager.hasEnrolledFingerprints(); 19 | } 20 | return false; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /android/src/main/java/li/yunqi/rnsecurestorage/PrefsStorage.java: -------------------------------------------------------------------------------- 1 | package li.yunqi.rnsecurestorage; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | import android.support.annotation.NonNull; 6 | import android.util.Base64; 7 | 8 | import com.facebook.react.bridge.ReactApplicationContext; 9 | 10 | import java.util.ArrayList; 11 | import java.util.Map; 12 | 13 | import li.yunqi.rnsecurestorage.cipherstorage.CipherStorage.EncryptionResult; 14 | import li.yunqi.rnsecurestorage.cipherstorage.CipherStorageFacebookConceal; 15 | 16 | /** 17 | * Created by ouyangyunqi on 2018/3/26. 18 | */ 19 | 20 | public class PrefsStorage { 21 | 22 | public static final String SECURE_STORAGE_DATA = "RN_SECURE_STORAGE"; 23 | 24 | public static class ResultSet { 25 | public final String cipherStorageName; 26 | public final byte[] valueBytes; 27 | 28 | public ResultSet(String cipherStorageName, byte[] valueBytes) { 29 | this.cipherStorageName = cipherStorageName; 30 | this.valueBytes = valueBytes; 31 | } 32 | } 33 | 34 | private final SharedPreferences prefs; 35 | 36 | public PrefsStorage(ReactApplicationContext reactContext, String service) { 37 | this.prefs = reactContext.getSharedPreferences(getSharedPreferenceName(service), Context.MODE_PRIVATE); 38 | } 39 | 40 | public void storeEncryptedEntry(@NonNull EncryptionResult encryptionResult) { 41 | String key = encryptionResult.key; 42 | String cipherStorageName = encryptionResult.cipherStorage.getCipherStorageName(); 43 | 44 | prefs.edit() 45 | .putString(key, cipherStorageName + ":" + Base64.encodeToString(encryptionResult.value, Base64.DEFAULT)) 46 | .apply(); 47 | } 48 | 49 | public ResultSet getEncryptedEntry(@NonNull String key) { 50 | String value = prefs.getString(key, null); 51 | if (value == null) { 52 | return null; 53 | } 54 | 55 | String[] split = value.split(":", 2); 56 | if (split.length < 2) { 57 | return null; 58 | } 59 | String cipherStorageName = split[0]; 60 | byte[] valueBytes = getBytesForValue(split[1]); 61 | 62 | if (cipherStorageName == null || cipherStorageName.isEmpty()) { 63 | // If the CipherStorage name is not found, we assume it is because the entry was written by an older version of this library. The older version used Facebook Conceal, so we default to that. 64 | cipherStorageName = CipherStorageFacebookConceal.CIPHER_STORAGE_NAME; 65 | } 66 | return new ResultSet(cipherStorageName, valueBytes); 67 | } 68 | 69 | public String[] getAllKeys() { 70 | Map allEntries = prefs.getAll(); 71 | ArrayList keyList = new ArrayList<>(); 72 | keyList.addAll(allEntries.keySet()); 73 | String[] keys = new String[keyList.size()]; 74 | keyList.toArray(keys); 75 | return keys; 76 | } 77 | 78 | public void removeEntry(@NonNull String key) { 79 | prefs.edit().remove(key).apply(); 80 | } 81 | 82 | private String getSharedPreferenceName(String service) { 83 | return SECURE_STORAGE_DATA + "_" + service; 84 | } 85 | 86 | private byte[] getBytesForValue(String b64) { 87 | return Base64.decode(b64, Base64.DEFAULT); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /android/src/main/java/li/yunqi/rnsecurestorage/RNSecureStorageModule.java: -------------------------------------------------------------------------------- 1 | package li.yunqi.rnsecurestorage; 2 | 3 | import android.os.Build; 4 | import android.support.annotation.NonNull; 5 | import android.util.Log; 6 | 7 | import com.facebook.react.bridge.Promise; 8 | import com.facebook.react.bridge.ReactApplicationContext; 9 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 10 | import com.facebook.react.bridge.ReactMethod; 11 | import com.facebook.react.bridge.WritableArray; 12 | import com.facebook.react.bridge.WritableNativeArray; 13 | 14 | import java.util.HashMap; 15 | import java.util.Map; 16 | 17 | import li.yunqi.rnsecurestorage.PrefsStorage.ResultSet; 18 | import li.yunqi.rnsecurestorage.cipherstorage.CipherStorage; 19 | import li.yunqi.rnsecurestorage.cipherstorage.CipherStorage.DecryptionResult; 20 | import li.yunqi.rnsecurestorage.cipherstorage.CipherStorage.EncryptionResult; 21 | import li.yunqi.rnsecurestorage.cipherstorage.CipherStorageFacebookConceal; 22 | import li.yunqi.rnsecurestorage.cipherstorage.CipherStorageKeystoreAESCBC; 23 | import li.yunqi.rnsecurestorage.exceptions.CryptoFailedException; 24 | import li.yunqi.rnsecurestorage.exceptions.EmptyParameterException; 25 | 26 | public class RNSecureStorageModule extends ReactContextBaseJavaModule { 27 | 28 | public static final String E_EMPTY_PARAMETERS = "E_EMPTY_PARAMETERS"; 29 | public static final String E_CRYPTO_FAILED = "E_CRYPTO_FAILED"; 30 | public static final String E_KEYSTORE_ACCESS_ERROR = "E_KEYSTORE_ACCESS_ERROR"; 31 | public static final String E_SUPPORTED_BIOMETRY_ERROR = "E_SUPPORTED_BIOMETRY_ERROR"; 32 | public static final String SECURE_STORAGE_MODULE = "RNSecureStorage"; 33 | public static final String FINGERPRINT_SUPPORTED_NAME = "Fingerprint"; 34 | public static final String DEFAULT_SERVICE = "shared_preferences"; 35 | 36 | private final Map cipherStorageMap = new HashMap<>(); 37 | 38 | public RNSecureStorageModule(ReactApplicationContext reactContext) { 39 | super(reactContext); 40 | 41 | addCipherStorageToMap(new CipherStorageFacebookConceal(reactContext)); 42 | addCipherStorageToMap(new CipherStorageKeystoreAESCBC()); 43 | } 44 | 45 | @ReactMethod 46 | public void setItem(String key, String value, String service, Promise promise) { 47 | try { 48 | if (key == null || key.isEmpty() || value == null) { 49 | throw new EmptyParameterException("you passed empty or null key/value"); 50 | } 51 | service = getDefaultServiceIfNull(service); 52 | final PrefsStorage prefsStorage = new PrefsStorage(getReactApplicationContext(), service); 53 | 54 | CipherStorage currentCipherStorage = getCipherStorageForCurrentAPILevel(); 55 | 56 | EncryptionResult result = currentCipherStorage.encrypt(service, key, value); 57 | prefsStorage.storeEncryptedEntry(result); 58 | 59 | promise.resolve(true); 60 | } catch (EmptyParameterException e) { 61 | Log.e(SECURE_STORAGE_MODULE, e.getMessage()); 62 | promise.reject(E_EMPTY_PARAMETERS, e); 63 | } catch (CryptoFailedException e) { 64 | Log.e(SECURE_STORAGE_MODULE, e.getMessage()); 65 | promise.reject(E_CRYPTO_FAILED, e); 66 | } 67 | } 68 | 69 | @ReactMethod 70 | public void getItem(String key, String service, Promise promise) { 71 | try { 72 | service = getDefaultServiceIfNull(service); 73 | final PrefsStorage prefsStorage = new PrefsStorage(getReactApplicationContext(), service); 74 | 75 | CipherStorage currentCipherStorage = getCipherStorageForCurrentAPILevel(); 76 | 77 | final DecryptionResult decryptionResult; 78 | ResultSet resultSet = prefsStorage.getEncryptedEntry(key); 79 | if (resultSet == null) { 80 | Log.e(SECURE_STORAGE_MODULE, "No entry found for service: " + service); 81 | promise.resolve(null); 82 | return; 83 | } 84 | 85 | if (resultSet.cipherStorageName.equals(currentCipherStorage.getCipherStorageName())) { 86 | // The encrypted data is encrypted using the current CipherStorage, so we just decrypt and return 87 | decryptionResult = currentCipherStorage.decrypt(service, key, resultSet.valueBytes); 88 | } 89 | else { 90 | // The encrypted data is encrypted using an older CipherStorage, so we need to decrypt the data first, then encrypt it using the current CipherStorage, then store it again and return 91 | CipherStorage oldCipherStorage = getCipherStorageByName(resultSet.cipherStorageName); 92 | // decrypt using the older cipher storage 93 | decryptionResult = oldCipherStorage.decrypt(service, key, resultSet.valueBytes); 94 | // encrypt using the current cipher storage 95 | EncryptionResult encryptionResult = currentCipherStorage.encrypt(service, key, decryptionResult.value); 96 | // store the encryption result 97 | prefsStorage.storeEncryptedEntry(encryptionResult); 98 | } 99 | 100 | promise.resolve(decryptionResult.value); 101 | } catch (CryptoFailedException e) { 102 | Log.e(SECURE_STORAGE_MODULE, e.getMessage()); 103 | promise.reject(E_CRYPTO_FAILED, e); 104 | } 105 | } 106 | 107 | @ReactMethod 108 | public void removeItem(String key, String service, Promise promise) { 109 | try { 110 | service = getDefaultServiceIfNull(service); 111 | final PrefsStorage prefsStorage = new PrefsStorage(getReactApplicationContext(), service); 112 | prefsStorage.removeEntry(key); 113 | 114 | promise.resolve(true); 115 | } catch (Exception e) { 116 | Log.e(SECURE_STORAGE_MODULE, e.getMessage()); 117 | promise.reject(E_KEYSTORE_ACCESS_ERROR, e); 118 | } 119 | } 120 | 121 | @ReactMethod 122 | public void getAllKeys(String service, Promise promise) { 123 | try { 124 | service = getDefaultServiceIfNull(service); 125 | final PrefsStorage prefsStorage = new PrefsStorage(getReactApplicationContext(), service); 126 | String[] allKeys = prefsStorage.getAllKeys(); 127 | WritableArray keyArray = new WritableNativeArray(); 128 | for (String key : allKeys) { 129 | keyArray.pushString(key); 130 | } 131 | promise.resolve(keyArray); 132 | return; 133 | } catch (Exception e) { 134 | Log.e(SECURE_STORAGE_MODULE, e.getMessage()); 135 | promise.reject(E_KEYSTORE_ACCESS_ERROR, e); 136 | } 137 | } 138 | 139 | @ReactMethod 140 | public void getSupportedBiometryType(Promise promise) { 141 | try { 142 | boolean fingerprintAuthAvailable = isFingerprintAuthAvailable(); 143 | if (fingerprintAuthAvailable) { 144 | promise.resolve(FINGERPRINT_SUPPORTED_NAME); 145 | } else { 146 | promise.resolve(null); 147 | } 148 | } catch (Exception e) { 149 | Log.e(SECURE_STORAGE_MODULE, e.getMessage()); 150 | promise.reject(E_SUPPORTED_BIOMETRY_ERROR, e); 151 | } 152 | } 153 | 154 | @Override 155 | public String getName() { 156 | return SECURE_STORAGE_MODULE; 157 | } 158 | 159 | // The "Current" CipherStorage is the cipherStorage with the highest API level that is lower than or equal to the current API level 160 | private CipherStorage getCipherStorageForCurrentAPILevel() throws CryptoFailedException { 161 | int currentAPILevel = Build.VERSION.SDK_INT; 162 | CipherStorage currentCipherStorage = null; 163 | for (CipherStorage cipherStorage : cipherStorageMap.values()) { 164 | int cipherStorageAPILevel = cipherStorage.getMinSupportedApiLevel(); 165 | // Is the cipherStorage supported on the current API level? 166 | boolean isSupported = (cipherStorageAPILevel <= currentAPILevel); 167 | // Is the API level better than the one we previously selected (if any)? 168 | if (isSupported && (currentCipherStorage == null || cipherStorageAPILevel > currentCipherStorage.getMinSupportedApiLevel())) { 169 | currentCipherStorage = cipherStorage; 170 | } 171 | } 172 | if (currentCipherStorage == null) { 173 | throw new CryptoFailedException("Unsupported Android SDK " + Build.VERSION.SDK_INT); 174 | } 175 | return currentCipherStorage; 176 | } 177 | 178 | private boolean isFingerprintAuthAvailable() { 179 | return DeviceAvailability.isFingerprintAuthAvailable(getCurrentActivity()); 180 | } 181 | 182 | private void addCipherStorageToMap(CipherStorage cipherStorage) { 183 | cipherStorageMap.put(cipherStorage.getCipherStorageName(), cipherStorage); 184 | } 185 | 186 | private CipherStorage getCipherStorageByName(String cipherStorageName) { 187 | return cipherStorageMap.get(cipherStorageName); 188 | } 189 | 190 | @NonNull 191 | private String getDefaultServiceIfNull(String service) { 192 | return service == null ? DEFAULT_SERVICE : service; 193 | } 194 | } -------------------------------------------------------------------------------- /android/src/main/java/li/yunqi/rnsecurestorage/RNSecureStoragePackage.java: -------------------------------------------------------------------------------- 1 | package li.yunqi.rnsecurestorage; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.NativeModule; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.uimanager.ViewManager; 11 | import com.facebook.react.bridge.JavaScriptModule; 12 | 13 | public class RNSecureStoragePackage implements ReactPackage { 14 | 15 | @Override 16 | public List createNativeModules(ReactApplicationContext reactContext) { 17 | return Arrays.asList(new RNSecureStorageModule(reactContext)); 18 | } 19 | 20 | // Deprecated from RN 0.47 21 | public List> createJSModules() { 22 | return Collections.emptyList(); 23 | } 24 | 25 | @Override 26 | public List createViewManagers(ReactApplicationContext reactContext) { 27 | return Collections.emptyList(); 28 | } 29 | } -------------------------------------------------------------------------------- /android/src/main/java/li/yunqi/rnsecurestorage/cipherstorage/CipherStorage.java: -------------------------------------------------------------------------------- 1 | package li.yunqi.rnsecurestorage.cipherstorage; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import li.yunqi.rnsecurestorage.exceptions.CryptoFailedException; 6 | 7 | /** 8 | * Created by ouyangyunqi on 2018/3/26. 9 | */ 10 | 11 | public interface CipherStorage { 12 | 13 | abstract class CipherResult { 14 | public final String key; 15 | public final T value; 16 | 17 | public CipherResult(String key, T value) { 18 | this.key = key; 19 | this.value = value; 20 | } 21 | } 22 | 23 | class EncryptionResult extends CipherResult { 24 | public CipherStorage cipherStorage; 25 | 26 | public EncryptionResult(String key, byte[] value, CipherStorage cipherStorage) { 27 | super(key, value); 28 | this.cipherStorage = cipherStorage; 29 | } 30 | } 31 | 32 | class DecryptionResult extends CipherResult { 33 | public DecryptionResult(String key, String value) { 34 | super(key, value); 35 | } 36 | } 37 | 38 | String charsetName = "UTF-8"; 39 | 40 | EncryptionResult encrypt(@NonNull String service, @NonNull String key, @NonNull String value) throws CryptoFailedException; 41 | 42 | DecryptionResult decrypt(@NonNull String service, @NonNull String key, @NonNull byte[] valueBytes) throws CryptoFailedException; 43 | 44 | String getCipherStorageName(); 45 | 46 | int getMinSupportedApiLevel(); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /android/src/main/java/li/yunqi/rnsecurestorage/cipherstorage/CipherStorageFacebookConceal.java: -------------------------------------------------------------------------------- 1 | package li.yunqi.rnsecurestorage.cipherstorage; 2 | 3 | import android.os.Build; 4 | import android.support.annotation.NonNull; 5 | 6 | import com.facebook.android.crypto.keychain.AndroidConceal; 7 | import com.facebook.android.crypto.keychain.SharedPrefsBackedKeyChain; 8 | import com.facebook.crypto.Crypto; 9 | import com.facebook.crypto.CryptoConfig; 10 | import com.facebook.crypto.Entity; 11 | import com.facebook.crypto.keychain.KeyChain; 12 | import com.facebook.react.bridge.ReactApplicationContext; 13 | 14 | import li.yunqi.rnsecurestorage.exceptions.CryptoFailedException; 15 | 16 | /** 17 | * Created by ouyangyunqi on 2018/3/26. 18 | */ 19 | 20 | public class CipherStorageFacebookConceal implements CipherStorage { 21 | 22 | public static final String CIPHER_STORAGE_NAME = "FacebookConceal"; 23 | public static final String SECURE_STORAGE = "RN_SECURE_STORAGE"; 24 | 25 | private final Crypto crypto; 26 | 27 | public CipherStorageFacebookConceal(ReactApplicationContext reactContext) { 28 | KeyChain keyChain = new SharedPrefsBackedKeyChain(reactContext, CryptoConfig.KEY_256); 29 | this.crypto = AndroidConceal.get().createDefaultCrypto(keyChain); 30 | } 31 | 32 | @Override 33 | public EncryptionResult encrypt(@NonNull String service, @NonNull String key, @NonNull String value) throws CryptoFailedException { 34 | if (!crypto.isAvailable()) { 35 | throw new CryptoFailedException("Crypto is missing"); 36 | } 37 | Entity valueEntity = createEntity(service, key); 38 | 39 | try { 40 | byte[] encryptedValue = crypto.encrypt(value.getBytes(charsetName), valueEntity); 41 | 42 | return new EncryptionResult(key, encryptedValue, this); 43 | } catch (Exception e) { 44 | throw new CryptoFailedException("Encryption failed for service " + service, e); 45 | } 46 | } 47 | 48 | @Override 49 | public DecryptionResult decrypt(@NonNull String service, @NonNull String key, @NonNull byte[] value) throws CryptoFailedException { 50 | if (!crypto.isAvailable()) { 51 | throw new CryptoFailedException("Crypto is missing"); 52 | } 53 | Entity valueEntity = createEntity(service, key); 54 | 55 | try { 56 | byte[] decryptedValue = crypto.decrypt(value, valueEntity); 57 | 58 | return new DecryptionResult(key, new String(decryptedValue, charsetName)); 59 | } catch (Exception e) { 60 | throw new CryptoFailedException("Decryption failed for service " + service, e); 61 | } 62 | } 63 | 64 | @Override 65 | public String getCipherStorageName() { 66 | return CIPHER_STORAGE_NAME; 67 | } 68 | 69 | @Override 70 | public int getMinSupportedApiLevel() { 71 | return Build.VERSION_CODES.JELLY_BEAN; 72 | } 73 | 74 | private Entity createEntity(String service, String key) { 75 | String prefix = getEntityPrefix(service); 76 | return Entity.create(prefix + ":" + key); 77 | } 78 | 79 | private String getEntityPrefix(String service) { 80 | return SECURE_STORAGE + "_" + service; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /android/src/main/java/li/yunqi/rnsecurestorage/cipherstorage/CipherStorageKeystoreAESCBC.java: -------------------------------------------------------------------------------- 1 | package li.yunqi.rnsecurestorage.cipherstorage; 2 | 3 | import android.annotation.TargetApi; 4 | import android.os.Build; 5 | import android.security.keystore.KeyGenParameterSpec; 6 | import android.security.keystore.KeyProperties; 7 | import android.support.annotation.NonNull; 8 | 9 | import java.io.ByteArrayInputStream; 10 | import java.io.ByteArrayOutputStream; 11 | import java.io.IOException; 12 | import java.security.InvalidAlgorithmParameterException; 13 | import java.security.Key; 14 | import java.security.KeyStore; 15 | import java.security.KeyStoreException; 16 | import java.security.NoSuchAlgorithmException; 17 | import java.security.NoSuchProviderException; 18 | import java.security.UnrecoverableKeyException; 19 | import java.security.cert.CertificateException; 20 | import java.security.spec.AlgorithmParameterSpec; 21 | 22 | import javax.crypto.Cipher; 23 | import javax.crypto.CipherInputStream; 24 | import javax.crypto.CipherOutputStream; 25 | import javax.crypto.KeyGenerator; 26 | import javax.crypto.spec.IvParameterSpec; 27 | 28 | import li.yunqi.rnsecurestorage.exceptions.CryptoFailedException; 29 | import li.yunqi.rnsecurestorage.exceptions.KeyStoreAccessException; 30 | 31 | /** 32 | * Created by ouyangyunqi on 2018/3/26. 33 | */ 34 | 35 | public class CipherStorageKeystoreAESCBC implements CipherStorage { 36 | 37 | public static final String CIPHER_STORAGE_NAME = "KeystoreAESCBC"; 38 | public static final String DEFAULT_SERVICE = "RN_SECURE_STORAGE_DEFAULT_ALIAS"; 39 | public static final String KEYSTORE_TYPE = "AndroidKeyStore"; 40 | public static final String ENCRYPTION_ALGORITHM = KeyProperties.KEY_ALGORITHM_AES; 41 | public static final String ENCRYPTION_BLOCK_MODE = KeyProperties.BLOCK_MODE_CBC; 42 | public static final String ENCRYPTION_PADDING = KeyProperties.ENCRYPTION_PADDING_PKCS7; 43 | public static final String ENCRYPTION_TRANSFORMATION = 44 | ENCRYPTION_ALGORITHM + "/" + 45 | ENCRYPTION_BLOCK_MODE + "/" + 46 | ENCRYPTION_PADDING; 47 | public static final int ENCRYPTION_KEY_SIZE = 256; 48 | 49 | @TargetApi(Build.VERSION_CODES.M) 50 | @Override 51 | public EncryptionResult encrypt(@NonNull String service, @NonNull String itemKey, @NonNull String value) throws CryptoFailedException { 52 | service = getDefaultServiceIfEmpty(service); 53 | 54 | try { 55 | KeyStore keyStore = getKeyStoreAndLoad(); 56 | 57 | if (!keyStore.containsAlias(service)) { 58 | AlgorithmParameterSpec spec; 59 | spec = new KeyGenParameterSpec.Builder( 60 | service, 61 | KeyProperties.PURPOSE_DECRYPT | KeyProperties.PURPOSE_ENCRYPT) 62 | .setBlockModes(ENCRYPTION_BLOCK_MODE) 63 | .setEncryptionPaddings(ENCRYPTION_PADDING) 64 | .setRandomizedEncryptionRequired(true) 65 | //.setUserAuthenticationRequired(true) // Will throw InvalidAlgorithmParameterException if there is no fingerprint enrolled on the device 66 | .setKeySize(ENCRYPTION_KEY_SIZE) 67 | .build(); 68 | 69 | KeyGenerator generator = KeyGenerator.getInstance(ENCRYPTION_ALGORITHM, KEYSTORE_TYPE); 70 | generator.init(spec); 71 | 72 | generator.generateKey(); 73 | } 74 | 75 | Key key = keyStore.getKey(service, null); 76 | 77 | byte[] encryptedValue = encryptString(key, service, value); 78 | 79 | return new EncryptionResult(itemKey, encryptedValue, this); 80 | } catch (NoSuchAlgorithmException | InvalidAlgorithmParameterException | NoSuchProviderException | UnrecoverableKeyException e) { 81 | throw new CryptoFailedException("Could not encrypt data for service " + service, e); 82 | } catch (KeyStoreException | KeyStoreAccessException e) { 83 | throw new CryptoFailedException("Could not access Keystore for service " + service, e); 84 | } 85 | } 86 | 87 | @Override 88 | public DecryptionResult decrypt(@NonNull String service, @NonNull String itemKey, @NonNull byte[] valueBytes) throws CryptoFailedException { 89 | service = getDefaultServiceIfEmpty(service); 90 | 91 | try { 92 | KeyStore keyStore = getKeyStoreAndLoad(); 93 | 94 | Key key = keyStore.getKey(service, null); 95 | String decryptedValue = decryptBytes(key, valueBytes); 96 | 97 | return new DecryptionResult(itemKey, decryptedValue); 98 | } catch (KeyStoreException | UnrecoverableKeyException | NoSuchAlgorithmException e) { 99 | throw new CryptoFailedException("Could not get key from Keystore", e); 100 | } catch (KeyStoreAccessException e) { 101 | throw new CryptoFailedException("Could not access Keystore", e); 102 | } 103 | } 104 | 105 | @Override 106 | public String getCipherStorageName() { 107 | return CIPHER_STORAGE_NAME; 108 | } 109 | 110 | @Override 111 | public int getMinSupportedApiLevel() { 112 | return Build.VERSION_CODES.M; 113 | } 114 | 115 | private byte[] encryptString(Key key, String service, String value) throws CryptoFailedException { 116 | try { 117 | Cipher cipher = Cipher.getInstance(ENCRYPTION_TRANSFORMATION); 118 | cipher.init(Cipher.ENCRYPT_MODE, key); 119 | ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 120 | // write initialization vector to the beginning of the stream 121 | byte[] iv = cipher.getIV(); 122 | outputStream.write(iv, 0, iv.length); 123 | // encrypt the value using a CipherOutputStream 124 | CipherOutputStream cipherOutputStream = new CipherOutputStream(outputStream, cipher); 125 | cipherOutputStream.write(value.getBytes(charsetName)); 126 | cipherOutputStream.close(); 127 | return outputStream.toByteArray(); 128 | } catch (Exception e) { 129 | throw new CryptoFailedException("Could not encrypt value for service " + service, e); 130 | } 131 | } 132 | 133 | private String decryptBytes(Key key, byte[] bytes) throws CryptoFailedException { 134 | try { 135 | Cipher cipher = Cipher.getInstance(ENCRYPTION_TRANSFORMATION); 136 | ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes); 137 | // read the initialization vector from the beginning of the stream 138 | IvParameterSpec ivParams = readIvFromStream(inputStream); 139 | cipher.init(Cipher.DECRYPT_MODE, key, ivParams); 140 | // decrypt the bytes using a CipherInputStream 141 | CipherInputStream cipherInputStream = new CipherInputStream( 142 | inputStream, cipher); 143 | ByteArrayOutputStream output = new ByteArrayOutputStream(); 144 | byte[] buffer = new byte[1024]; 145 | while (true) { 146 | int n = cipherInputStream.read(buffer, 0, buffer.length); 147 | if (n <= 0) { 148 | break; 149 | } 150 | output.write(buffer, 0, n); 151 | } 152 | return new String(output.toByteArray(), charsetName); 153 | } catch (Exception e) { 154 | throw new CryptoFailedException("Could not decrypt bytes", e); 155 | } 156 | } 157 | 158 | private IvParameterSpec readIvFromStream(ByteArrayInputStream inputStream) { 159 | byte[] iv = new byte[16]; 160 | inputStream.read(iv, 0, iv.length); 161 | return new IvParameterSpec(iv); 162 | } 163 | 164 | private KeyStore getKeyStoreAndLoad() throws KeyStoreException, KeyStoreAccessException { 165 | try { 166 | KeyStore keyStore = KeyStore.getInstance(KEYSTORE_TYPE); 167 | keyStore.load(null); 168 | return keyStore; 169 | } catch (NoSuchAlgorithmException | CertificateException | IOException e) { 170 | throw new KeyStoreAccessException("Could not access Keystore", e); 171 | } 172 | } 173 | 174 | @NonNull 175 | private String getDefaultServiceIfEmpty(@NonNull String service) { 176 | return service.isEmpty() ? DEFAULT_SERVICE : service; 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /android/src/main/java/li/yunqi/rnsecurestorage/exceptions/CryptoFailedException.java: -------------------------------------------------------------------------------- 1 | package li.yunqi.rnsecurestorage.exceptions; 2 | 3 | /** 4 | * Created by ouyangyunqi on 2018/3/26. 5 | */ 6 | 7 | public class CryptoFailedException extends Exception { 8 | 9 | public CryptoFailedException(String message) { 10 | super(message); 11 | } 12 | 13 | public CryptoFailedException(String message, Throwable t) { 14 | super(message, t); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /android/src/main/java/li/yunqi/rnsecurestorage/exceptions/EmptyParameterException.java: -------------------------------------------------------------------------------- 1 | package li.yunqi.rnsecurestorage.exceptions; 2 | 3 | /** 4 | * Created by ouyangyunqi on 2018/3/26. 5 | */ 6 | 7 | public class EmptyParameterException extends Exception { 8 | 9 | public EmptyParameterException(String message) { 10 | super(message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /android/src/main/java/li/yunqi/rnsecurestorage/exceptions/KeyStoreAccessException.java: -------------------------------------------------------------------------------- 1 | package li.yunqi.rnsecurestorage.exceptions; 2 | 3 | /** 4 | * Created by ouyangyunqi on 2018/3/26. 5 | */ 6 | 7 | public class KeyStoreAccessException extends Exception { 8 | 9 | public KeyStoreAccessException(String message, Throwable t) { 10 | super(message, t); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } 4 | -------------------------------------------------------------------------------- /example/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | .*/Libraries/polyfills/.* 18 | 19 | ; Ignore metro 20 | .*/node_modules/metro/.* 21 | 22 | [include] 23 | 24 | [libs] 25 | node_modules/react-native/Libraries/react-native/react-native-interface.js 26 | node_modules/react-native/flow/ 27 | node_modules/react-native/flow-github/ 28 | 29 | [options] 30 | emoji=true 31 | 32 | module.system=haste 33 | 34 | munge_underscores=true 35 | 36 | 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' 37 | 38 | module.file_ext=.js 39 | module.file_ext=.jsx 40 | module.file_ext=.json 41 | module.file_ext=.native.js 42 | 43 | suppress_type=$FlowIssue 44 | suppress_type=$FlowFixMe 45 | suppress_type=$FlowFixMeProps 46 | suppress_type=$FlowFixMeState 47 | 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 50 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 51 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 52 | 53 | [version] 54 | ^0.65.0 55 | -------------------------------------------------------------------------------- /example/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | -------------------------------------------------------------------------------- /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/App.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | Platform, 10 | StyleSheet, 11 | Text, 12 | Alert, 13 | View 14 | } from 'react-native'; 15 | import SecureStorage, { ACCESS_CONTROL, ACCESSIBLE, AUTHENTICATION_TYPE } from 'react-native-secure-storage' 16 | 17 | const instructions = Platform.select({ 18 | ios: 'Press Cmd+R to reload,\n' + 19 | 'Cmd+D or shake for dev menu', 20 | android: 'Double tap R on your keyboard to reload,\n' + 21 | 'Shake or press menu button for dev menu', 22 | }); 23 | 24 | type Props = {}; 25 | export default class App extends Component { 26 | async componentDidMount() { 27 | const config = { 28 | accessControl: ACCESS_CONTROL.BIOMETRY_ANY_OR_DEVICE_PASSCODE, 29 | accessible: ACCESSIBLE.WHEN_UNLOCKED, 30 | accessGroup: null, 31 | authenticationPrompt: 'auth with yourself', 32 | service: 'example', 33 | authenticateType: AUTHENTICATION_TYPE.BIOMETRICS, 34 | } 35 | const key = 'key' 36 | await SecureStorage.setItem(key, 'vvvalue', config) 37 | // await SecureStorage.setItem(key + '1', 'vvvaaa1lue', config) 38 | // await SecureStorage.setItem(key + '2', 'value', config) 39 | // await SecureStorage.removeItem(key, config) 40 | const got = await SecureStorage.getItem(key, config) 41 | // const got = await SecureStorage.getAllKeys(config) 42 | // const got = await SecureStorage.canCheckAuthentication(config) 43 | Alert.alert(JSON.stringify(got)) 44 | // Alert.alert(JSON.stringify(await SecureStorage.getSupportedBiometryType())) 45 | } 46 | render() { 47 | return ( 48 | 49 | 50 | Welcome to React Native! 51 | 52 | 53 | To get started, edit App.js 54 | 55 | 56 | {instructions} 57 | 58 | 59 | ); 60 | } 61 | } 62 | 63 | const styles = StyleSheet.create({ 64 | container: { 65 | flex: 1, 66 | justifyContent: 'center', 67 | alignItems: 'center', 68 | backgroundColor: '#F5FCFF', 69 | }, 70 | welcome: { 71 | fontSize: 20, 72 | textAlign: 'center', 73 | margin: 10, 74 | }, 75 | instructions: { 76 | textAlign: 'center', 77 | color: '#333333', 78 | marginBottom: 5, 79 | }, 80 | }); 81 | -------------------------------------------------------------------------------- /example/__tests__/App.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import App from '../App'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create( 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /example/android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | lib_deps = [] 12 | 13 | for jarfile in glob(['libs/*.jar']): 14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] 15 | lib_deps.append(':' + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | 21 | for aarfile in glob(['libs/*.aar']): 22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] 23 | lib_deps.append(':' + name) 24 | android_prebuilt_aar( 25 | name = name, 26 | aar = aarfile, 27 | ) 28 | 29 | android_library( 30 | name = "all-libs", 31 | exported_deps = lib_deps, 32 | ) 33 | 34 | android_library( 35 | name = "app-code", 36 | srcs = glob([ 37 | "src/main/java/**/*.java", 38 | ]), 39 | deps = [ 40 | ":all-libs", 41 | ":build_config", 42 | ":res", 43 | ], 44 | ) 45 | 46 | android_build_config( 47 | name = "build_config", 48 | package = "com.example", 49 | ) 50 | 51 | android_resource( 52 | name = "res", 53 | package = "com.example", 54 | res = "src/main/res", 55 | ) 56 | 57 | android_binary( 58 | name = "app", 59 | keystore = "//android/keystores:debug", 60 | manifest = "src/main/AndroidManifest.xml", 61 | package_type = "debug", 62 | deps = [ 63 | ":app-code", 64 | ], 65 | ) 66 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 37 | * // for example: to disable dev mode in the staging build type (if configured) 38 | * devDisabledInStaging: true, 39 | * // The configuration property can be in the following formats 40 | * // 'devDisabledIn${productFlavor}${buildType}' 41 | * // 'devDisabledIn${buildType}' 42 | * 43 | * // the root of your project, i.e. where "package.json" lives 44 | * root: "../../", 45 | * 46 | * // where to put the JS bundle asset in debug mode 47 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 48 | * 49 | * // where to put the JS bundle asset in release mode 50 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 51 | * 52 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 53 | * // require('./image.png')), in debug mode 54 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 55 | * 56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 57 | * // require('./image.png')), in release mode 58 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 59 | * 60 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 61 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 62 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 63 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 64 | * // for example, you might want to remove it from here. 65 | * inputExcludes: ["android/**", "ios/**"], 66 | * 67 | * // override which node gets called and with what additional arguments 68 | * nodeExecutableAndArgs: ["node"], 69 | * 70 | * // supply additional arguments to the packager 71 | * extraPackagerArgs: [] 72 | * ] 73 | */ 74 | 75 | project.ext.react = [ 76 | entryFile: "index.js" 77 | ] 78 | 79 | apply from: "../../node_modules/react-native/react.gradle" 80 | 81 | /** 82 | * Set this to true to create two separate APKs instead of one: 83 | * - An APK that only works on ARM devices 84 | * - An APK that only works on x86 devices 85 | * The advantage is the size of the APK is reduced by about 4MB. 86 | * Upload all the APKs to the Play Store and people will download 87 | * the correct one based on the CPU architecture of their device. 88 | */ 89 | def enableSeparateBuildPerCPUArchitecture = false 90 | 91 | /** 92 | * Run Proguard to shrink the Java bytecode in release builds. 93 | */ 94 | def enableProguardInReleaseBuilds = false 95 | 96 | android { 97 | compileSdkVersion 23 98 | buildToolsVersion "23.0.1" 99 | 100 | defaultConfig { 101 | applicationId "com.example" 102 | minSdkVersion 16 103 | targetSdkVersion 22 104 | versionCode 1 105 | versionName "1.0" 106 | ndk { 107 | abiFilters "armeabi-v7a", "x86" 108 | } 109 | } 110 | splits { 111 | abi { 112 | reset() 113 | enable enableSeparateBuildPerCPUArchitecture 114 | universalApk false // If true, also generate a universal APK 115 | include "armeabi-v7a", "x86" 116 | } 117 | } 118 | buildTypes { 119 | release { 120 | minifyEnabled enableProguardInReleaseBuilds 121 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 122 | } 123 | } 124 | // applicationVariants are e.g. debug, release 125 | applicationVariants.all { variant -> 126 | variant.outputs.each { output -> 127 | // For each separate APK per architecture, set a unique version code as described here: 128 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 129 | def versionCodes = ["armeabi-v7a":1, "x86":2] 130 | def abi = output.getFilter(OutputFile.ABI) 131 | if (abi != null) { // null for the universal-debug, universal-release variants 132 | output.versionCodeOverride = 133 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 134 | } 135 | } 136 | } 137 | } 138 | 139 | dependencies { 140 | compile project(':react-native-secure-storage') 141 | compile fileTree(dir: "libs", include: ["*.jar"]) 142 | compile "com.android.support:appcompat-v7:23.0.1" 143 | compile "com.facebook.react:react-native:+" // From node_modules 144 | } 145 | 146 | // Run this once to be able to run the application with BUCK 147 | // puts all compile dependencies into folder libs for BUCK to use 148 | task copyDownloadableDepsToLibs(type: Copy) { 149 | from configurations.compile 150 | into 'libs' 151 | } 152 | -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # TextLayoutBuilder uses a non-public Android constructor within StaticLayout. 54 | # See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details. 55 | -dontwarn android.text.StaticLayout 56 | 57 | # okhttp 58 | 59 | -keepattributes Signature 60 | -keepattributes *Annotation* 61 | -keep class okhttp3.** { *; } 62 | -keep interface okhttp3.** { *; } 63 | -dontwarn okhttp3.** 64 | 65 | # okio 66 | 67 | -keep class sun.misc.Unsafe { *; } 68 | -dontwarn java.nio.file.* 69 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 70 | -dontwarn okio.** 71 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "example"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.react.ReactApplication; 6 | import li.yunqi.rnsecurestorage.RNSecureStoragePackage; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.shell.MainReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | 15 | public class MainApplication extends Application implements ReactApplication { 16 | 17 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | return Arrays.asList( 26 | new MainReactPackage(), 27 | new RNSecureStoragePackage() 28 | ); 29 | } 30 | 31 | @Override 32 | protected String getJSMainModuleName() { 33 | return "index"; 34 | } 35 | }; 36 | 37 | @Override 38 | public ReactNativeHost getReactNativeHost() { 39 | return mReactNativeHost; 40 | } 41 | 42 | @Override 43 | public void onCreate() { 44 | super.onCreate(); 45 | SoLoader.init(this, /* native exopackage */ false); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oyyq99999/react-native-secure-storage/7e7e329ef5319da895722c9e2f2474a93522340a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oyyq99999/react-native-secure-storage/7e7e329ef5319da895722c9e2f2474a93522340a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oyyq99999/react-native-secure-storage/7e7e329ef5319da895722c9e2f2474a93522340a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oyyq99999/react-native-secure-storage/7e7e329ef5319da895722c9e2f2474a93522340a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | example 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.3' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oyyq99999/react-native-secure-storage/7e7e329ef5319da895722c9e2f2474a93522340a/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 6 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /example/android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = "debug", 3 | properties = "debug.keystore.properties", 4 | store = "debug.keystore", 5 | visibility = [ 6 | "PUBLIC", 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /example/android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example' 2 | include ':react-native-secure-storage' 3 | project(':react-native-secure-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-secure-storage/android') 4 | 5 | include ':app' 6 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "displayName": "example" 4 | } -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './App'; 3 | 4 | AppRegistry.registerComponent('example', () => App); 5 | -------------------------------------------------------------------------------- /example/ios/example-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /example/ios/example-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 15 | 00E356F31AD99517003FC87E /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; }; 16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 23 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 25 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 26 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 27 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 28 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 29 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; 30 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; 31 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; 32 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; 33 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; 34 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; 35 | 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; }; 36 | 2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; }; 37 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 38 | 79F1962345684CB68D65900A /* libRNSecureStorage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BE059DC93FA41479E126CB6 /* libRNSecureStorage.a */; }; 39 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 40 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; 41 | /* End PBXBuildFile section */ 42 | 43 | /* Begin PBXContainerItemProxy section */ 44 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 47 | proxyType = 2; 48 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 49 | remoteInfo = RCTActionSheet; 50 | }; 51 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 52 | isa = PBXContainerItemProxy; 53 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 54 | proxyType = 2; 55 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 56 | remoteInfo = RCTGeolocation; 57 | }; 58 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 59 | isa = PBXContainerItemProxy; 60 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 61 | proxyType = 2; 62 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 63 | remoteInfo = RCTImage; 64 | }; 65 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 66 | isa = PBXContainerItemProxy; 67 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 68 | proxyType = 2; 69 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 70 | remoteInfo = RCTNetwork; 71 | }; 72 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 73 | isa = PBXContainerItemProxy; 74 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 75 | proxyType = 2; 76 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 77 | remoteInfo = RCTVibration; 78 | }; 79 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 80 | isa = PBXContainerItemProxy; 81 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 82 | proxyType = 1; 83 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 84 | remoteInfo = example; 85 | }; 86 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 87 | isa = PBXContainerItemProxy; 88 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 89 | proxyType = 2; 90 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 91 | remoteInfo = RCTSettings; 92 | }; 93 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 94 | isa = PBXContainerItemProxy; 95 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 96 | proxyType = 2; 97 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 98 | remoteInfo = RCTWebSocket; 99 | }; 100 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 101 | isa = PBXContainerItemProxy; 102 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 103 | proxyType = 2; 104 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 105 | remoteInfo = React; 106 | }; 107 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { 108 | isa = PBXContainerItemProxy; 109 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 110 | proxyType = 1; 111 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; 112 | remoteInfo = "example-tvOS"; 113 | }; 114 | 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 115 | isa = PBXContainerItemProxy; 116 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 117 | proxyType = 2; 118 | remoteGlobalIDString = ADD01A681E09402E00F6D226; 119 | remoteInfo = "RCTBlob-tvOS"; 120 | }; 121 | 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 122 | isa = PBXContainerItemProxy; 123 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 124 | proxyType = 2; 125 | remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; 126 | remoteInfo = fishhook; 127 | }; 128 | 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 129 | isa = PBXContainerItemProxy; 130 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 131 | proxyType = 2; 132 | remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; 133 | remoteInfo = "fishhook-tvOS"; 134 | }; 135 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { 136 | isa = PBXContainerItemProxy; 137 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 138 | proxyType = 2; 139 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; 140 | remoteInfo = "RCTImage-tvOS"; 141 | }; 142 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { 143 | isa = PBXContainerItemProxy; 144 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 145 | proxyType = 2; 146 | remoteGlobalIDString = 2D2A28471D9B043800D4039D; 147 | remoteInfo = "RCTLinking-tvOS"; 148 | }; 149 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 150 | isa = PBXContainerItemProxy; 151 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 152 | proxyType = 2; 153 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D; 154 | remoteInfo = "RCTNetwork-tvOS"; 155 | }; 156 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 157 | isa = PBXContainerItemProxy; 158 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 159 | proxyType = 2; 160 | remoteGlobalIDString = 2D2A28611D9B046600D4039D; 161 | remoteInfo = "RCTSettings-tvOS"; 162 | }; 163 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { 164 | isa = PBXContainerItemProxy; 165 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 166 | proxyType = 2; 167 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D; 168 | remoteInfo = "RCTText-tvOS"; 169 | }; 170 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { 171 | isa = PBXContainerItemProxy; 172 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 173 | proxyType = 2; 174 | remoteGlobalIDString = 2D2A28881D9B049200D4039D; 175 | remoteInfo = "RCTWebSocket-tvOS"; 176 | }; 177 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { 178 | isa = PBXContainerItemProxy; 179 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 180 | proxyType = 2; 181 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D; 182 | remoteInfo = "React-tvOS"; 183 | }; 184 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { 185 | isa = PBXContainerItemProxy; 186 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 187 | proxyType = 2; 188 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA; 189 | remoteInfo = yoga; 190 | }; 191 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { 192 | isa = PBXContainerItemProxy; 193 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 194 | proxyType = 2; 195 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA; 196 | remoteInfo = "yoga-tvOS"; 197 | }; 198 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { 199 | isa = PBXContainerItemProxy; 200 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 201 | proxyType = 2; 202 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; 203 | remoteInfo = cxxreact; 204 | }; 205 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 206 | isa = PBXContainerItemProxy; 207 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 208 | proxyType = 2; 209 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; 210 | remoteInfo = "cxxreact-tvOS"; 211 | }; 212 | 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 213 | isa = PBXContainerItemProxy; 214 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 215 | proxyType = 2; 216 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; 217 | remoteInfo = jschelpers; 218 | }; 219 | 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 220 | isa = PBXContainerItemProxy; 221 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 222 | proxyType = 2; 223 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; 224 | remoteInfo = "jschelpers-tvOS"; 225 | }; 226 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 227 | isa = PBXContainerItemProxy; 228 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 229 | proxyType = 2; 230 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 231 | remoteInfo = RCTAnimation; 232 | }; 233 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 234 | isa = PBXContainerItemProxy; 235 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 236 | proxyType = 2; 237 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D; 238 | remoteInfo = "RCTAnimation-tvOS"; 239 | }; 240 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 241 | isa = PBXContainerItemProxy; 242 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 243 | proxyType = 2; 244 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 245 | remoteInfo = RCTLinking; 246 | }; 247 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 248 | isa = PBXContainerItemProxy; 249 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 250 | proxyType = 2; 251 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 252 | remoteInfo = RCTText; 253 | }; 254 | ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = { 255 | isa = PBXContainerItemProxy; 256 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 257 | proxyType = 2; 258 | remoteGlobalIDString = 358F4ED71D1E81A9004DF814; 259 | remoteInfo = RCTBlob; 260 | }; 261 | B9E60C3E2064DAFA009D698E /* PBXContainerItemProxy */ = { 262 | isa = PBXContainerItemProxy; 263 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 264 | proxyType = 2; 265 | remoteGlobalIDString = EBF21BDC1FC498900052F4D5; 266 | remoteInfo = jsinspector; 267 | }; 268 | B9E60C402064DAFA009D698E /* PBXContainerItemProxy */ = { 269 | isa = PBXContainerItemProxy; 270 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 271 | proxyType = 2; 272 | remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5; 273 | remoteInfo = "jsinspector-tvOS"; 274 | }; 275 | B9E60C422064DAFA009D698E /* PBXContainerItemProxy */ = { 276 | isa = PBXContainerItemProxy; 277 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 278 | proxyType = 2; 279 | remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7; 280 | remoteInfo = "third-party"; 281 | }; 282 | B9E60C442064DAFA009D698E /* PBXContainerItemProxy */ = { 283 | isa = PBXContainerItemProxy; 284 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 285 | proxyType = 2; 286 | remoteGlobalIDString = 3D383D3C1EBD27B6005632C8; 287 | remoteInfo = "third-party-tvOS"; 288 | }; 289 | B9E60C462064DAFA009D698E /* PBXContainerItemProxy */ = { 290 | isa = PBXContainerItemProxy; 291 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 292 | proxyType = 2; 293 | remoteGlobalIDString = 139D7E881E25C6D100323FB7; 294 | remoteInfo = "double-conversion"; 295 | }; 296 | B9E60C482064DAFA009D698E /* PBXContainerItemProxy */ = { 297 | isa = PBXContainerItemProxy; 298 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 299 | proxyType = 2; 300 | remoteGlobalIDString = 3D383D621EBD27B9005632C8; 301 | remoteInfo = "double-conversion-tvOS"; 302 | }; 303 | B9E60C4A2064DAFA009D698E /* PBXContainerItemProxy */ = { 304 | isa = PBXContainerItemProxy; 305 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 306 | proxyType = 2; 307 | remoteGlobalIDString = 9936F3131F5F2E4B0010BF04; 308 | remoteInfo = privatedata; 309 | }; 310 | B9E60C4C2064DAFA009D698E /* PBXContainerItemProxy */ = { 311 | isa = PBXContainerItemProxy; 312 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 313 | proxyType = 2; 314 | remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04; 315 | remoteInfo = "privatedata-tvOS"; 316 | }; 317 | B9E60C512064DAFB009D698E /* PBXContainerItemProxy */ = { 318 | isa = PBXContainerItemProxy; 319 | containerPortal = 8D242ABFB822420B8547848A /* RNSecureStorage.xcodeproj */; 320 | proxyType = 2; 321 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 322 | remoteInfo = RNSecureStorage; 323 | }; 324 | /* End PBXContainerItemProxy section */ 325 | 326 | /* Begin PBXFileReference section */ 327 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 328 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 329 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 330 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 331 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 332 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 333 | 00E356EE1AD99517003FC87E /* exampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = exampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 334 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 335 | 00E356F21AD99517003FC87E /* exampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = exampleTests.m; sourceTree = ""; }; 336 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 337 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 338 | 13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 339 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = ""; }; 340 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = ""; }; 341 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 342 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = ""; }; 343 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = ""; }; 344 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = ""; }; 345 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 346 | 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 347 | 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "example-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 348 | 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; }; 349 | 5BE059DC93FA41479E126CB6 /* libRNSecureStorage.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSecureStorage.a; sourceTree = ""; }; 350 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 351 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 352 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 353 | 8D242ABFB822420B8547848A /* RNSecureStorage.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSecureStorage.xcodeproj; path = "../node_modules/react-native-secure-storage/ios/RNSecureStorage.xcodeproj"; sourceTree = ""; }; 354 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; }; 355 | /* End PBXFileReference section */ 356 | 357 | /* Begin PBXFrameworksBuildPhase section */ 358 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 359 | isa = PBXFrameworksBuildPhase; 360 | buildActionMask = 2147483647; 361 | files = ( 362 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, 363 | ); 364 | runOnlyForDeploymentPostprocessing = 0; 365 | }; 366 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 367 | isa = PBXFrameworksBuildPhase; 368 | buildActionMask = 2147483647; 369 | files = ( 370 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */, 371 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 372 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 373 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 374 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 375 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 376 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 377 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 378 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 379 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 380 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 381 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 382 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 383 | 79F1962345684CB68D65900A /* libRNSecureStorage.a in Frameworks */, 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | }; 387 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { 388 | isa = PBXFrameworksBuildPhase; 389 | buildActionMask = 2147483647; 390 | files = ( 391 | 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */, 392 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */, 393 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, 394 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, 395 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, 396 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, 397 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, 398 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, 399 | ); 400 | runOnlyForDeploymentPostprocessing = 0; 401 | }; 402 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { 403 | isa = PBXFrameworksBuildPhase; 404 | buildActionMask = 2147483647; 405 | files = ( 406 | ); 407 | runOnlyForDeploymentPostprocessing = 0; 408 | }; 409 | /* End PBXFrameworksBuildPhase section */ 410 | 411 | /* Begin PBXGroup section */ 412 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 413 | isa = PBXGroup; 414 | children = ( 415 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 416 | ); 417 | name = Products; 418 | sourceTree = ""; 419 | }; 420 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 421 | isa = PBXGroup; 422 | children = ( 423 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 424 | ); 425 | name = Products; 426 | sourceTree = ""; 427 | }; 428 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 429 | isa = PBXGroup; 430 | children = ( 431 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 432 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, 433 | ); 434 | name = Products; 435 | sourceTree = ""; 436 | }; 437 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 438 | isa = PBXGroup; 439 | children = ( 440 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 441 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, 442 | ); 443 | name = Products; 444 | sourceTree = ""; 445 | }; 446 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 447 | isa = PBXGroup; 448 | children = ( 449 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 450 | ); 451 | name = Products; 452 | sourceTree = ""; 453 | }; 454 | 00E356EF1AD99517003FC87E /* exampleTests */ = { 455 | isa = PBXGroup; 456 | children = ( 457 | 00E356F21AD99517003FC87E /* exampleTests.m */, 458 | 00E356F01AD99517003FC87E /* Supporting Files */, 459 | ); 460 | path = exampleTests; 461 | sourceTree = ""; 462 | }; 463 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 464 | isa = PBXGroup; 465 | children = ( 466 | 00E356F11AD99517003FC87E /* Info.plist */, 467 | ); 468 | name = "Supporting Files"; 469 | sourceTree = ""; 470 | }; 471 | 139105B71AF99BAD00B5F7CC /* Products */ = { 472 | isa = PBXGroup; 473 | children = ( 474 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 475 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, 476 | ); 477 | name = Products; 478 | sourceTree = ""; 479 | }; 480 | 139FDEE71B06529A00C62182 /* Products */ = { 481 | isa = PBXGroup; 482 | children = ( 483 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 484 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, 485 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */, 486 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */, 487 | ); 488 | name = Products; 489 | sourceTree = ""; 490 | }; 491 | 13B07FAE1A68108700A75B9A /* example */ = { 492 | isa = PBXGroup; 493 | children = ( 494 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 495 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 496 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 497 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 498 | 13B07FB61A68108700A75B9A /* Info.plist */, 499 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 500 | 13B07FB71A68108700A75B9A /* main.m */, 501 | ); 502 | name = example; 503 | sourceTree = ""; 504 | }; 505 | 146834001AC3E56700842450 /* Products */ = { 506 | isa = PBXGroup; 507 | children = ( 508 | 146834041AC3E56700842450 /* libReact.a */, 509 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */, 510 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, 511 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, 512 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, 513 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, 514 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, 515 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, 516 | B9E60C3F2064DAFA009D698E /* libjsinspector.a */, 517 | B9E60C412064DAFA009D698E /* libjsinspector-tvOS.a */, 518 | B9E60C432064DAFA009D698E /* libthird-party.a */, 519 | B9E60C452064DAFA009D698E /* libthird-party.a */, 520 | B9E60C472064DAFA009D698E /* libdouble-conversion.a */, 521 | B9E60C492064DAFA009D698E /* libdouble-conversion.a */, 522 | B9E60C4B2064DAFA009D698E /* libprivatedata.a */, 523 | B9E60C4D2064DAFA009D698E /* libprivatedata-tvOS.a */, 524 | ); 525 | name = Products; 526 | sourceTree = ""; 527 | }; 528 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 529 | isa = PBXGroup; 530 | children = ( 531 | 2D16E6891FA4F8E400B85C8A /* libReact.a */, 532 | ); 533 | name = Frameworks; 534 | sourceTree = ""; 535 | }; 536 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = { 537 | isa = PBXGroup; 538 | children = ( 539 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, 540 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */, 541 | ); 542 | name = Products; 543 | sourceTree = ""; 544 | }; 545 | 78C398B11ACF4ADC00677621 /* Products */ = { 546 | isa = PBXGroup; 547 | children = ( 548 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 549 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, 550 | ); 551 | name = Products; 552 | sourceTree = ""; 553 | }; 554 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 555 | isa = PBXGroup; 556 | children = ( 557 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 558 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 559 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 560 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */, 561 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 562 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 563 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 564 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 565 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 566 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 567 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 568 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 569 | 8D242ABFB822420B8547848A /* RNSecureStorage.xcodeproj */, 570 | ); 571 | name = Libraries; 572 | sourceTree = ""; 573 | }; 574 | 832341B11AAA6A8300B99B32 /* Products */ = { 575 | isa = PBXGroup; 576 | children = ( 577 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 578 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, 579 | ); 580 | name = Products; 581 | sourceTree = ""; 582 | }; 583 | 83CBB9F61A601CBA00E9B192 = { 584 | isa = PBXGroup; 585 | children = ( 586 | 13B07FAE1A68108700A75B9A /* example */, 587 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 588 | 00E356EF1AD99517003FC87E /* exampleTests */, 589 | 83CBBA001A601CBA00E9B192 /* Products */, 590 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 591 | B9E60C172064DAF8009D698E /* Recovered References */, 592 | ); 593 | indentWidth = 2; 594 | sourceTree = ""; 595 | tabWidth = 2; 596 | usesTabs = 0; 597 | }; 598 | 83CBBA001A601CBA00E9B192 /* Products */ = { 599 | isa = PBXGroup; 600 | children = ( 601 | 13B07F961A680F5B00A75B9A /* example.app */, 602 | 00E356EE1AD99517003FC87E /* exampleTests.xctest */, 603 | 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */, 604 | 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */, 605 | ); 606 | name = Products; 607 | sourceTree = ""; 608 | }; 609 | ADBDB9201DFEBF0600ED6528 /* Products */ = { 610 | isa = PBXGroup; 611 | children = ( 612 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */, 613 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */, 614 | ); 615 | name = Products; 616 | sourceTree = ""; 617 | }; 618 | B9E60C172064DAF8009D698E /* Recovered References */ = { 619 | isa = PBXGroup; 620 | children = ( 621 | 5BE059DC93FA41479E126CB6 /* libRNSecureStorage.a */, 622 | ); 623 | name = "Recovered References"; 624 | sourceTree = ""; 625 | }; 626 | B9E60C4E2064DAFB009D698E /* Products */ = { 627 | isa = PBXGroup; 628 | children = ( 629 | B9E60C522064DAFB009D698E /* libRNSecureStorage.a */, 630 | ); 631 | name = Products; 632 | sourceTree = ""; 633 | }; 634 | /* End PBXGroup section */ 635 | 636 | /* Begin PBXNativeTarget section */ 637 | 00E356ED1AD99517003FC87E /* exampleTests */ = { 638 | isa = PBXNativeTarget; 639 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */; 640 | buildPhases = ( 641 | 00E356EA1AD99517003FC87E /* Sources */, 642 | 00E356EB1AD99517003FC87E /* Frameworks */, 643 | 00E356EC1AD99517003FC87E /* Resources */, 644 | ); 645 | buildRules = ( 646 | ); 647 | dependencies = ( 648 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 649 | ); 650 | name = exampleTests; 651 | productName = exampleTests; 652 | productReference = 00E356EE1AD99517003FC87E /* exampleTests.xctest */; 653 | productType = "com.apple.product-type.bundle.unit-test"; 654 | }; 655 | 13B07F861A680F5B00A75B9A /* example */ = { 656 | isa = PBXNativeTarget; 657 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */; 658 | buildPhases = ( 659 | 13B07F871A680F5B00A75B9A /* Sources */, 660 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 661 | 13B07F8E1A680F5B00A75B9A /* Resources */, 662 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 663 | ); 664 | buildRules = ( 665 | ); 666 | dependencies = ( 667 | ); 668 | name = example; 669 | productName = "Hello World"; 670 | productReference = 13B07F961A680F5B00A75B9A /* example.app */; 671 | productType = "com.apple.product-type.application"; 672 | }; 673 | 2D02E47A1E0B4A5D006451C7 /* example-tvOS */ = { 674 | isa = PBXNativeTarget; 675 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOS" */; 676 | buildPhases = ( 677 | 2D02E4771E0B4A5D006451C7 /* Sources */, 678 | 2D02E4781E0B4A5D006451C7 /* Frameworks */, 679 | 2D02E4791E0B4A5D006451C7 /* Resources */, 680 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, 681 | ); 682 | buildRules = ( 683 | ); 684 | dependencies = ( 685 | ); 686 | name = "example-tvOS"; 687 | productName = "example-tvOS"; 688 | productReference = 2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */; 689 | productType = "com.apple.product-type.application"; 690 | }; 691 | 2D02E48F1E0B4A5D006451C7 /* example-tvOSTests */ = { 692 | isa = PBXNativeTarget; 693 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOSTests" */; 694 | buildPhases = ( 695 | 2D02E48C1E0B4A5D006451C7 /* Sources */, 696 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 697 | 2D02E48E1E0B4A5D006451C7 /* Resources */, 698 | ); 699 | buildRules = ( 700 | ); 701 | dependencies = ( 702 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, 703 | ); 704 | name = "example-tvOSTests"; 705 | productName = "example-tvOSTests"; 706 | productReference = 2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */; 707 | productType = "com.apple.product-type.bundle.unit-test"; 708 | }; 709 | /* End PBXNativeTarget section */ 710 | 711 | /* Begin PBXProject section */ 712 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 713 | isa = PBXProject; 714 | attributes = { 715 | LastUpgradeCheck = 610; 716 | ORGANIZATIONNAME = Facebook; 717 | TargetAttributes = { 718 | 00E356ED1AD99517003FC87E = { 719 | CreatedOnToolsVersion = 6.2; 720 | TestTargetID = 13B07F861A680F5B00A75B9A; 721 | }; 722 | 2D02E47A1E0B4A5D006451C7 = { 723 | CreatedOnToolsVersion = 8.2.1; 724 | ProvisioningStyle = Automatic; 725 | }; 726 | 2D02E48F1E0B4A5D006451C7 = { 727 | CreatedOnToolsVersion = 8.2.1; 728 | ProvisioningStyle = Automatic; 729 | TestTargetID = 2D02E47A1E0B4A5D006451C7; 730 | }; 731 | }; 732 | }; 733 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */; 734 | compatibilityVersion = "Xcode 3.2"; 735 | developmentRegion = English; 736 | hasScannedForEncodings = 0; 737 | knownRegions = ( 738 | en, 739 | Base, 740 | ); 741 | mainGroup = 83CBB9F61A601CBA00E9B192; 742 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 743 | projectDirPath = ""; 744 | projectReferences = ( 745 | { 746 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 747 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 748 | }, 749 | { 750 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; 751 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 752 | }, 753 | { 754 | ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */; 755 | ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 756 | }, 757 | { 758 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 759 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 760 | }, 761 | { 762 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 763 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 764 | }, 765 | { 766 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 767 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 768 | }, 769 | { 770 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 771 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 772 | }, 773 | { 774 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 775 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 776 | }, 777 | { 778 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 779 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 780 | }, 781 | { 782 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 783 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 784 | }, 785 | { 786 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 787 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 788 | }, 789 | { 790 | ProductGroup = 146834001AC3E56700842450 /* Products */; 791 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 792 | }, 793 | { 794 | ProductGroup = B9E60C4E2064DAFB009D698E /* Products */; 795 | ProjectRef = 8D242ABFB822420B8547848A /* RNSecureStorage.xcodeproj */; 796 | }, 797 | ); 798 | projectRoot = ""; 799 | targets = ( 800 | 13B07F861A680F5B00A75B9A /* example */, 801 | 00E356ED1AD99517003FC87E /* exampleTests */, 802 | 2D02E47A1E0B4A5D006451C7 /* example-tvOS */, 803 | 2D02E48F1E0B4A5D006451C7 /* example-tvOSTests */, 804 | ); 805 | }; 806 | /* End PBXProject section */ 807 | 808 | /* Begin PBXReferenceProxy section */ 809 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 810 | isa = PBXReferenceProxy; 811 | fileType = archive.ar; 812 | path = libRCTActionSheet.a; 813 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 814 | sourceTree = BUILT_PRODUCTS_DIR; 815 | }; 816 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 817 | isa = PBXReferenceProxy; 818 | fileType = archive.ar; 819 | path = libRCTGeolocation.a; 820 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 821 | sourceTree = BUILT_PRODUCTS_DIR; 822 | }; 823 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 824 | isa = PBXReferenceProxy; 825 | fileType = archive.ar; 826 | path = libRCTImage.a; 827 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 828 | sourceTree = BUILT_PRODUCTS_DIR; 829 | }; 830 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 831 | isa = PBXReferenceProxy; 832 | fileType = archive.ar; 833 | path = libRCTNetwork.a; 834 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 835 | sourceTree = BUILT_PRODUCTS_DIR; 836 | }; 837 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 838 | isa = PBXReferenceProxy; 839 | fileType = archive.ar; 840 | path = libRCTVibration.a; 841 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 842 | sourceTree = BUILT_PRODUCTS_DIR; 843 | }; 844 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 845 | isa = PBXReferenceProxy; 846 | fileType = archive.ar; 847 | path = libRCTSettings.a; 848 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 849 | sourceTree = BUILT_PRODUCTS_DIR; 850 | }; 851 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 852 | isa = PBXReferenceProxy; 853 | fileType = archive.ar; 854 | path = libRCTWebSocket.a; 855 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 856 | sourceTree = BUILT_PRODUCTS_DIR; 857 | }; 858 | 146834041AC3E56700842450 /* libReact.a */ = { 859 | isa = PBXReferenceProxy; 860 | fileType = archive.ar; 861 | path = libReact.a; 862 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 863 | sourceTree = BUILT_PRODUCTS_DIR; 864 | }; 865 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = { 866 | isa = PBXReferenceProxy; 867 | fileType = archive.ar; 868 | path = "libRCTBlob-tvOS.a"; 869 | remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */; 870 | sourceTree = BUILT_PRODUCTS_DIR; 871 | }; 872 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = { 873 | isa = PBXReferenceProxy; 874 | fileType = archive.ar; 875 | path = libfishhook.a; 876 | remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */; 877 | sourceTree = BUILT_PRODUCTS_DIR; 878 | }; 879 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = { 880 | isa = PBXReferenceProxy; 881 | fileType = archive.ar; 882 | path = "libfishhook-tvOS.a"; 883 | remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */; 884 | sourceTree = BUILT_PRODUCTS_DIR; 885 | }; 886 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { 887 | isa = PBXReferenceProxy; 888 | fileType = archive.ar; 889 | path = "libRCTImage-tvOS.a"; 890 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; 891 | sourceTree = BUILT_PRODUCTS_DIR; 892 | }; 893 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { 894 | isa = PBXReferenceProxy; 895 | fileType = archive.ar; 896 | path = "libRCTLinking-tvOS.a"; 897 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; 898 | sourceTree = BUILT_PRODUCTS_DIR; 899 | }; 900 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { 901 | isa = PBXReferenceProxy; 902 | fileType = archive.ar; 903 | path = "libRCTNetwork-tvOS.a"; 904 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; 905 | sourceTree = BUILT_PRODUCTS_DIR; 906 | }; 907 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { 908 | isa = PBXReferenceProxy; 909 | fileType = archive.ar; 910 | path = "libRCTSettings-tvOS.a"; 911 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; 912 | sourceTree = BUILT_PRODUCTS_DIR; 913 | }; 914 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { 915 | isa = PBXReferenceProxy; 916 | fileType = archive.ar; 917 | path = "libRCTText-tvOS.a"; 918 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; 919 | sourceTree = BUILT_PRODUCTS_DIR; 920 | }; 921 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { 922 | isa = PBXReferenceProxy; 923 | fileType = archive.ar; 924 | path = "libRCTWebSocket-tvOS.a"; 925 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; 926 | sourceTree = BUILT_PRODUCTS_DIR; 927 | }; 928 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = { 929 | isa = PBXReferenceProxy; 930 | fileType = archive.ar; 931 | path = libReact.a; 932 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; 933 | sourceTree = BUILT_PRODUCTS_DIR; 934 | }; 935 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { 936 | isa = PBXReferenceProxy; 937 | fileType = archive.ar; 938 | path = libyoga.a; 939 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; 940 | sourceTree = BUILT_PRODUCTS_DIR; 941 | }; 942 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { 943 | isa = PBXReferenceProxy; 944 | fileType = archive.ar; 945 | path = libyoga.a; 946 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; 947 | sourceTree = BUILT_PRODUCTS_DIR; 948 | }; 949 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { 950 | isa = PBXReferenceProxy; 951 | fileType = archive.ar; 952 | path = libcxxreact.a; 953 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; 954 | sourceTree = BUILT_PRODUCTS_DIR; 955 | }; 956 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { 957 | isa = PBXReferenceProxy; 958 | fileType = archive.ar; 959 | path = libcxxreact.a; 960 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; 961 | sourceTree = BUILT_PRODUCTS_DIR; 962 | }; 963 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { 964 | isa = PBXReferenceProxy; 965 | fileType = archive.ar; 966 | path = libjschelpers.a; 967 | remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; 968 | sourceTree = BUILT_PRODUCTS_DIR; 969 | }; 970 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { 971 | isa = PBXReferenceProxy; 972 | fileType = archive.ar; 973 | path = libjschelpers.a; 974 | remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; 975 | sourceTree = BUILT_PRODUCTS_DIR; 976 | }; 977 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 978 | isa = PBXReferenceProxy; 979 | fileType = archive.ar; 980 | path = libRCTAnimation.a; 981 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 982 | sourceTree = BUILT_PRODUCTS_DIR; 983 | }; 984 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 985 | isa = PBXReferenceProxy; 986 | fileType = archive.ar; 987 | path = libRCTAnimation.a; 988 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 989 | sourceTree = BUILT_PRODUCTS_DIR; 990 | }; 991 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 992 | isa = PBXReferenceProxy; 993 | fileType = archive.ar; 994 | path = libRCTLinking.a; 995 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 996 | sourceTree = BUILT_PRODUCTS_DIR; 997 | }; 998 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 999 | isa = PBXReferenceProxy; 1000 | fileType = archive.ar; 1001 | path = libRCTText.a; 1002 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 1003 | sourceTree = BUILT_PRODUCTS_DIR; 1004 | }; 1005 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = { 1006 | isa = PBXReferenceProxy; 1007 | fileType = archive.ar; 1008 | path = libRCTBlob.a; 1009 | remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */; 1010 | sourceTree = BUILT_PRODUCTS_DIR; 1011 | }; 1012 | B9E60C3F2064DAFA009D698E /* libjsinspector.a */ = { 1013 | isa = PBXReferenceProxy; 1014 | fileType = archive.ar; 1015 | path = libjsinspector.a; 1016 | remoteRef = B9E60C3E2064DAFA009D698E /* PBXContainerItemProxy */; 1017 | sourceTree = BUILT_PRODUCTS_DIR; 1018 | }; 1019 | B9E60C412064DAFA009D698E /* libjsinspector-tvOS.a */ = { 1020 | isa = PBXReferenceProxy; 1021 | fileType = archive.ar; 1022 | path = "libjsinspector-tvOS.a"; 1023 | remoteRef = B9E60C402064DAFA009D698E /* PBXContainerItemProxy */; 1024 | sourceTree = BUILT_PRODUCTS_DIR; 1025 | }; 1026 | B9E60C432064DAFA009D698E /* libthird-party.a */ = { 1027 | isa = PBXReferenceProxy; 1028 | fileType = archive.ar; 1029 | path = "libthird-party.a"; 1030 | remoteRef = B9E60C422064DAFA009D698E /* PBXContainerItemProxy */; 1031 | sourceTree = BUILT_PRODUCTS_DIR; 1032 | }; 1033 | B9E60C452064DAFA009D698E /* libthird-party.a */ = { 1034 | isa = PBXReferenceProxy; 1035 | fileType = archive.ar; 1036 | path = "libthird-party.a"; 1037 | remoteRef = B9E60C442064DAFA009D698E /* PBXContainerItemProxy */; 1038 | sourceTree = BUILT_PRODUCTS_DIR; 1039 | }; 1040 | B9E60C472064DAFA009D698E /* libdouble-conversion.a */ = { 1041 | isa = PBXReferenceProxy; 1042 | fileType = archive.ar; 1043 | path = "libdouble-conversion.a"; 1044 | remoteRef = B9E60C462064DAFA009D698E /* PBXContainerItemProxy */; 1045 | sourceTree = BUILT_PRODUCTS_DIR; 1046 | }; 1047 | B9E60C492064DAFA009D698E /* libdouble-conversion.a */ = { 1048 | isa = PBXReferenceProxy; 1049 | fileType = archive.ar; 1050 | path = "libdouble-conversion.a"; 1051 | remoteRef = B9E60C482064DAFA009D698E /* PBXContainerItemProxy */; 1052 | sourceTree = BUILT_PRODUCTS_DIR; 1053 | }; 1054 | B9E60C4B2064DAFA009D698E /* libprivatedata.a */ = { 1055 | isa = PBXReferenceProxy; 1056 | fileType = archive.ar; 1057 | path = libprivatedata.a; 1058 | remoteRef = B9E60C4A2064DAFA009D698E /* PBXContainerItemProxy */; 1059 | sourceTree = BUILT_PRODUCTS_DIR; 1060 | }; 1061 | B9E60C4D2064DAFA009D698E /* libprivatedata-tvOS.a */ = { 1062 | isa = PBXReferenceProxy; 1063 | fileType = archive.ar; 1064 | path = "libprivatedata-tvOS.a"; 1065 | remoteRef = B9E60C4C2064DAFA009D698E /* PBXContainerItemProxy */; 1066 | sourceTree = BUILT_PRODUCTS_DIR; 1067 | }; 1068 | B9E60C522064DAFB009D698E /* libRNSecureStorage.a */ = { 1069 | isa = PBXReferenceProxy; 1070 | fileType = archive.ar; 1071 | path = libRNSecureStorage.a; 1072 | remoteRef = B9E60C512064DAFB009D698E /* PBXContainerItemProxy */; 1073 | sourceTree = BUILT_PRODUCTS_DIR; 1074 | }; 1075 | /* End PBXReferenceProxy section */ 1076 | 1077 | /* Begin PBXResourcesBuildPhase section */ 1078 | 00E356EC1AD99517003FC87E /* Resources */ = { 1079 | isa = PBXResourcesBuildPhase; 1080 | buildActionMask = 2147483647; 1081 | files = ( 1082 | ); 1083 | runOnlyForDeploymentPostprocessing = 0; 1084 | }; 1085 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 1086 | isa = PBXResourcesBuildPhase; 1087 | buildActionMask = 2147483647; 1088 | files = ( 1089 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 1090 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 1091 | ); 1092 | runOnlyForDeploymentPostprocessing = 0; 1093 | }; 1094 | 2D02E4791E0B4A5D006451C7 /* Resources */ = { 1095 | isa = PBXResourcesBuildPhase; 1096 | buildActionMask = 2147483647; 1097 | files = ( 1098 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, 1099 | ); 1100 | runOnlyForDeploymentPostprocessing = 0; 1101 | }; 1102 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = { 1103 | isa = PBXResourcesBuildPhase; 1104 | buildActionMask = 2147483647; 1105 | files = ( 1106 | ); 1107 | runOnlyForDeploymentPostprocessing = 0; 1108 | }; 1109 | /* End PBXResourcesBuildPhase section */ 1110 | 1111 | /* Begin PBXShellScriptBuildPhase section */ 1112 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 1113 | isa = PBXShellScriptBuildPhase; 1114 | buildActionMask = 2147483647; 1115 | files = ( 1116 | ); 1117 | inputPaths = ( 1118 | ); 1119 | name = "Bundle React Native code and images"; 1120 | outputPaths = ( 1121 | ); 1122 | runOnlyForDeploymentPostprocessing = 0; 1123 | shellPath = /bin/sh; 1124 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 1125 | }; 1126 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { 1127 | isa = PBXShellScriptBuildPhase; 1128 | buildActionMask = 2147483647; 1129 | files = ( 1130 | ); 1131 | inputPaths = ( 1132 | ); 1133 | name = "Bundle React Native Code And Images"; 1134 | outputPaths = ( 1135 | ); 1136 | runOnlyForDeploymentPostprocessing = 0; 1137 | shellPath = /bin/sh; 1138 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 1139 | }; 1140 | /* End PBXShellScriptBuildPhase section */ 1141 | 1142 | /* Begin PBXSourcesBuildPhase section */ 1143 | 00E356EA1AD99517003FC87E /* Sources */ = { 1144 | isa = PBXSourcesBuildPhase; 1145 | buildActionMask = 2147483647; 1146 | files = ( 1147 | 00E356F31AD99517003FC87E /* exampleTests.m in Sources */, 1148 | ); 1149 | runOnlyForDeploymentPostprocessing = 0; 1150 | }; 1151 | 13B07F871A680F5B00A75B9A /* Sources */ = { 1152 | isa = PBXSourcesBuildPhase; 1153 | buildActionMask = 2147483647; 1154 | files = ( 1155 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 1156 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 1157 | ); 1158 | runOnlyForDeploymentPostprocessing = 0; 1159 | }; 1160 | 2D02E4771E0B4A5D006451C7 /* Sources */ = { 1161 | isa = PBXSourcesBuildPhase; 1162 | buildActionMask = 2147483647; 1163 | files = ( 1164 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, 1165 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, 1166 | ); 1167 | runOnlyForDeploymentPostprocessing = 0; 1168 | }; 1169 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = { 1170 | isa = PBXSourcesBuildPhase; 1171 | buildActionMask = 2147483647; 1172 | files = ( 1173 | 2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */, 1174 | ); 1175 | runOnlyForDeploymentPostprocessing = 0; 1176 | }; 1177 | /* End PBXSourcesBuildPhase section */ 1178 | 1179 | /* Begin PBXTargetDependency section */ 1180 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 1181 | isa = PBXTargetDependency; 1182 | target = 13B07F861A680F5B00A75B9A /* example */; 1183 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 1184 | }; 1185 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { 1186 | isa = PBXTargetDependency; 1187 | target = 2D02E47A1E0B4A5D006451C7 /* example-tvOS */; 1188 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; 1189 | }; 1190 | /* End PBXTargetDependency section */ 1191 | 1192 | /* Begin PBXVariantGroup section */ 1193 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 1194 | isa = PBXVariantGroup; 1195 | children = ( 1196 | 13B07FB21A68108700A75B9A /* Base */, 1197 | ); 1198 | name = LaunchScreen.xib; 1199 | path = example; 1200 | sourceTree = ""; 1201 | }; 1202 | /* End PBXVariantGroup section */ 1203 | 1204 | /* Begin XCBuildConfiguration section */ 1205 | 00E356F61AD99517003FC87E /* Debug */ = { 1206 | isa = XCBuildConfiguration; 1207 | buildSettings = { 1208 | BUNDLE_LOADER = "$(TEST_HOST)"; 1209 | GCC_PREPROCESSOR_DEFINITIONS = ( 1210 | "DEBUG=1", 1211 | "$(inherited)", 1212 | ); 1213 | HEADER_SEARCH_PATHS = ( 1214 | "$(inherited)", 1215 | "$(SRCROOT)/../node_modules/react-native-secure-storage/ios/**", 1216 | ); 1217 | INFOPLIST_FILE = exampleTests/Info.plist; 1218 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1219 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1220 | LIBRARY_SEARCH_PATHS = ( 1221 | "$(inherited)", 1222 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1223 | ); 1224 | OTHER_LDFLAGS = ( 1225 | "-ObjC", 1226 | "-lc++", 1227 | ); 1228 | PRODUCT_NAME = "$(TARGET_NAME)"; 1229 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example"; 1230 | }; 1231 | name = Debug; 1232 | }; 1233 | 00E356F71AD99517003FC87E /* Release */ = { 1234 | isa = XCBuildConfiguration; 1235 | buildSettings = { 1236 | BUNDLE_LOADER = "$(TEST_HOST)"; 1237 | COPY_PHASE_STRIP = NO; 1238 | HEADER_SEARCH_PATHS = ( 1239 | "$(inherited)", 1240 | "$(SRCROOT)/../node_modules/react-native-secure-storage/ios/**", 1241 | ); 1242 | INFOPLIST_FILE = exampleTests/Info.plist; 1243 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1244 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1245 | LIBRARY_SEARCH_PATHS = ( 1246 | "$(inherited)", 1247 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1248 | ); 1249 | OTHER_LDFLAGS = ( 1250 | "-ObjC", 1251 | "-lc++", 1252 | ); 1253 | PRODUCT_NAME = "$(TARGET_NAME)"; 1254 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example"; 1255 | }; 1256 | name = Release; 1257 | }; 1258 | 13B07F941A680F5B00A75B9A /* Debug */ = { 1259 | isa = XCBuildConfiguration; 1260 | buildSettings = { 1261 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1262 | CURRENT_PROJECT_VERSION = 1; 1263 | DEAD_CODE_STRIPPING = NO; 1264 | HEADER_SEARCH_PATHS = ( 1265 | "$(inherited)", 1266 | "$(SRCROOT)/../node_modules/react-native-secure-storage/ios/**", 1267 | ); 1268 | INFOPLIST_FILE = example/Info.plist; 1269 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1270 | OTHER_LDFLAGS = ( 1271 | "$(inherited)", 1272 | "-ObjC", 1273 | "-lc++", 1274 | ); 1275 | PRODUCT_NAME = example; 1276 | VERSIONING_SYSTEM = "apple-generic"; 1277 | }; 1278 | name = Debug; 1279 | }; 1280 | 13B07F951A680F5B00A75B9A /* Release */ = { 1281 | isa = XCBuildConfiguration; 1282 | buildSettings = { 1283 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1284 | CURRENT_PROJECT_VERSION = 1; 1285 | HEADER_SEARCH_PATHS = ( 1286 | "$(inherited)", 1287 | "$(SRCROOT)/../node_modules/react-native-secure-storage/ios/**", 1288 | ); 1289 | INFOPLIST_FILE = example/Info.plist; 1290 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1291 | OTHER_LDFLAGS = ( 1292 | "$(inherited)", 1293 | "-ObjC", 1294 | "-lc++", 1295 | ); 1296 | PRODUCT_NAME = example; 1297 | VERSIONING_SYSTEM = "apple-generic"; 1298 | }; 1299 | name = Release; 1300 | }; 1301 | 2D02E4971E0B4A5E006451C7 /* Debug */ = { 1302 | isa = XCBuildConfiguration; 1303 | buildSettings = { 1304 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1305 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1306 | CLANG_ANALYZER_NONNULL = YES; 1307 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1308 | CLANG_WARN_INFINITE_RECURSION = YES; 1309 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1310 | DEBUG_INFORMATION_FORMAT = dwarf; 1311 | ENABLE_TESTABILITY = YES; 1312 | GCC_NO_COMMON_BLOCKS = YES; 1313 | HEADER_SEARCH_PATHS = ( 1314 | "$(inherited)", 1315 | "$(SRCROOT)/../node_modules/react-native-secure-storage/ios/**", 1316 | ); 1317 | INFOPLIST_FILE = "example-tvOS/Info.plist"; 1318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1319 | LIBRARY_SEARCH_PATHS = ( 1320 | "$(inherited)", 1321 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1322 | ); 1323 | OTHER_LDFLAGS = ( 1324 | "-ObjC", 1325 | "-lc++", 1326 | ); 1327 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOS"; 1328 | PRODUCT_NAME = "$(TARGET_NAME)"; 1329 | SDKROOT = appletvos; 1330 | TARGETED_DEVICE_FAMILY = 3; 1331 | TVOS_DEPLOYMENT_TARGET = 9.2; 1332 | }; 1333 | name = Debug; 1334 | }; 1335 | 2D02E4981E0B4A5E006451C7 /* Release */ = { 1336 | isa = XCBuildConfiguration; 1337 | buildSettings = { 1338 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1339 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1340 | CLANG_ANALYZER_NONNULL = YES; 1341 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1342 | CLANG_WARN_INFINITE_RECURSION = YES; 1343 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1344 | COPY_PHASE_STRIP = NO; 1345 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1346 | GCC_NO_COMMON_BLOCKS = YES; 1347 | HEADER_SEARCH_PATHS = ( 1348 | "$(inherited)", 1349 | "$(SRCROOT)/../node_modules/react-native-secure-storage/ios/**", 1350 | ); 1351 | INFOPLIST_FILE = "example-tvOS/Info.plist"; 1352 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1353 | LIBRARY_SEARCH_PATHS = ( 1354 | "$(inherited)", 1355 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1356 | ); 1357 | OTHER_LDFLAGS = ( 1358 | "-ObjC", 1359 | "-lc++", 1360 | ); 1361 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOS"; 1362 | PRODUCT_NAME = "$(TARGET_NAME)"; 1363 | SDKROOT = appletvos; 1364 | TARGETED_DEVICE_FAMILY = 3; 1365 | TVOS_DEPLOYMENT_TARGET = 9.2; 1366 | }; 1367 | name = Release; 1368 | }; 1369 | 2D02E4991E0B4A5E006451C7 /* Debug */ = { 1370 | isa = XCBuildConfiguration; 1371 | buildSettings = { 1372 | BUNDLE_LOADER = "$(TEST_HOST)"; 1373 | CLANG_ANALYZER_NONNULL = YES; 1374 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1375 | CLANG_WARN_INFINITE_RECURSION = YES; 1376 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1377 | DEBUG_INFORMATION_FORMAT = dwarf; 1378 | ENABLE_TESTABILITY = YES; 1379 | GCC_NO_COMMON_BLOCKS = YES; 1380 | INFOPLIST_FILE = "example-tvOSTests/Info.plist"; 1381 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1382 | LIBRARY_SEARCH_PATHS = ( 1383 | "$(inherited)", 1384 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1385 | ); 1386 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOSTests"; 1387 | PRODUCT_NAME = "$(TARGET_NAME)"; 1388 | SDKROOT = appletvos; 1389 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example-tvOS.app/example-tvOS"; 1390 | TVOS_DEPLOYMENT_TARGET = 10.1; 1391 | }; 1392 | name = Debug; 1393 | }; 1394 | 2D02E49A1E0B4A5E006451C7 /* Release */ = { 1395 | isa = XCBuildConfiguration; 1396 | buildSettings = { 1397 | BUNDLE_LOADER = "$(TEST_HOST)"; 1398 | CLANG_ANALYZER_NONNULL = YES; 1399 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1400 | CLANG_WARN_INFINITE_RECURSION = YES; 1401 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1402 | COPY_PHASE_STRIP = NO; 1403 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1404 | GCC_NO_COMMON_BLOCKS = YES; 1405 | INFOPLIST_FILE = "example-tvOSTests/Info.plist"; 1406 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1407 | LIBRARY_SEARCH_PATHS = ( 1408 | "$(inherited)", 1409 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 1410 | ); 1411 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.example-tvOSTests"; 1412 | PRODUCT_NAME = "$(TARGET_NAME)"; 1413 | SDKROOT = appletvos; 1414 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example-tvOS.app/example-tvOS"; 1415 | TVOS_DEPLOYMENT_TARGET = 10.1; 1416 | }; 1417 | name = Release; 1418 | }; 1419 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 1420 | isa = XCBuildConfiguration; 1421 | buildSettings = { 1422 | ALWAYS_SEARCH_USER_PATHS = NO; 1423 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1424 | CLANG_CXX_LIBRARY = "libc++"; 1425 | CLANG_ENABLE_MODULES = YES; 1426 | CLANG_ENABLE_OBJC_ARC = YES; 1427 | CLANG_WARN_BOOL_CONVERSION = YES; 1428 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1429 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1430 | CLANG_WARN_EMPTY_BODY = YES; 1431 | CLANG_WARN_ENUM_CONVERSION = YES; 1432 | CLANG_WARN_INT_CONVERSION = YES; 1433 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1434 | CLANG_WARN_UNREACHABLE_CODE = YES; 1435 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1436 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1437 | COPY_PHASE_STRIP = NO; 1438 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1439 | GCC_C_LANGUAGE_STANDARD = gnu99; 1440 | GCC_DYNAMIC_NO_PIC = NO; 1441 | GCC_OPTIMIZATION_LEVEL = 0; 1442 | GCC_PREPROCESSOR_DEFINITIONS = ( 1443 | "DEBUG=1", 1444 | "$(inherited)", 1445 | ); 1446 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 1447 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1448 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1449 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1450 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1451 | GCC_WARN_UNUSED_FUNCTION = YES; 1452 | GCC_WARN_UNUSED_VARIABLE = YES; 1453 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1454 | MTL_ENABLE_DEBUG_INFO = YES; 1455 | ONLY_ACTIVE_ARCH = YES; 1456 | SDKROOT = iphoneos; 1457 | }; 1458 | name = Debug; 1459 | }; 1460 | 83CBBA211A601CBA00E9B192 /* Release */ = { 1461 | isa = XCBuildConfiguration; 1462 | buildSettings = { 1463 | ALWAYS_SEARCH_USER_PATHS = NO; 1464 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1465 | CLANG_CXX_LIBRARY = "libc++"; 1466 | CLANG_ENABLE_MODULES = YES; 1467 | CLANG_ENABLE_OBJC_ARC = YES; 1468 | CLANG_WARN_BOOL_CONVERSION = YES; 1469 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1470 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1471 | CLANG_WARN_EMPTY_BODY = YES; 1472 | CLANG_WARN_ENUM_CONVERSION = YES; 1473 | CLANG_WARN_INT_CONVERSION = YES; 1474 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1475 | CLANG_WARN_UNREACHABLE_CODE = YES; 1476 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1477 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1478 | COPY_PHASE_STRIP = YES; 1479 | ENABLE_NS_ASSERTIONS = NO; 1480 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1481 | GCC_C_LANGUAGE_STANDARD = gnu99; 1482 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1483 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1484 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1485 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1486 | GCC_WARN_UNUSED_FUNCTION = YES; 1487 | GCC_WARN_UNUSED_VARIABLE = YES; 1488 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1489 | MTL_ENABLE_DEBUG_INFO = NO; 1490 | SDKROOT = iphoneos; 1491 | VALIDATE_PRODUCT = YES; 1492 | }; 1493 | name = Release; 1494 | }; 1495 | /* End XCBuildConfiguration section */ 1496 | 1497 | /* Begin XCConfigurationList section */ 1498 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */ = { 1499 | isa = XCConfigurationList; 1500 | buildConfigurations = ( 1501 | 00E356F61AD99517003FC87E /* Debug */, 1502 | 00E356F71AD99517003FC87E /* Release */, 1503 | ); 1504 | defaultConfigurationIsVisible = 0; 1505 | defaultConfigurationName = Release; 1506 | }; 1507 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = { 1508 | isa = XCConfigurationList; 1509 | buildConfigurations = ( 1510 | 13B07F941A680F5B00A75B9A /* Debug */, 1511 | 13B07F951A680F5B00A75B9A /* Release */, 1512 | ); 1513 | defaultConfigurationIsVisible = 0; 1514 | defaultConfigurationName = Release; 1515 | }; 1516 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOS" */ = { 1517 | isa = XCConfigurationList; 1518 | buildConfigurations = ( 1519 | 2D02E4971E0B4A5E006451C7 /* Debug */, 1520 | 2D02E4981E0B4A5E006451C7 /* Release */, 1521 | ); 1522 | defaultConfigurationIsVisible = 0; 1523 | defaultConfigurationName = Release; 1524 | }; 1525 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "example-tvOSTests" */ = { 1526 | isa = XCConfigurationList; 1527 | buildConfigurations = ( 1528 | 2D02E4991E0B4A5E006451C7 /* Debug */, 1529 | 2D02E49A1E0B4A5E006451C7 /* Release */, 1530 | ); 1531 | defaultConfigurationIsVisible = 0; 1532 | defaultConfigurationName = Release; 1533 | }; 1534 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = { 1535 | isa = XCConfigurationList; 1536 | buildConfigurations = ( 1537 | 83CBBA201A601CBA00E9B192 /* Debug */, 1538 | 83CBBA211A601CBA00E9B192 /* Release */, 1539 | ); 1540 | defaultConfigurationIsVisible = 0; 1541 | defaultConfigurationName = Release; 1542 | }; 1543 | /* End XCConfigurationList section */ 1544 | }; 1545 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 1546 | } 1547 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"example" 25 | initialProperties:nil 26 | launchOptions:launchOptions]; 27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 28 | 29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 30 | UIViewController *rootViewController = [UIViewController new]; 31 | rootViewController.view = rootView; 32 | self.window.rootViewController = rootViewController; 33 | [self.window makeKeyAndVisible]; 34 | return YES; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /example/ios/example/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UIViewControllerBasedStatusBarAppearance 40 | 41 | NSLocationWhenInUseUsageDescription 42 | 43 | NSAppTransportSecurity 44 | 45 | 46 | NSExceptionDomains 47 | 48 | localhost 49 | 50 | NSExceptionAllowsInsecureHTTPLoads 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /example/ios/example/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /example/ios/exampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ios/exampleTests/exampleTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface exampleTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation exampleTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node node_modules/react-native/local-cli/cli.js start", 7 | "test": "jest" 8 | }, 9 | "dependencies": { 10 | "react": "^16.3.0-alpha.1", 11 | "react-native": "0.54.2", 12 | "react-native-secure-storage": "0.*" 13 | }, 14 | "devDependencies": { 15 | "babel-jest": "22.4.3", 16 | "babel-preset-react-native": "4.0.0", 17 | "jest": "22.4.3", 18 | "react-test-renderer": "^16.3.0-alpha.1" 19 | }, 20 | "jest": { 21 | "preset": "react-native" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 2 | import { NativeModules, Platform } from 'react-native'; 3 | 4 | const { RNSecureStorage } = NativeModules; 5 | 6 | export const ACCESSIBLE = { 7 | WHEN_UNLOCKED: 'AccessibleWhenUnlocked', 8 | AFTER_FIRST_UNLOCK: 'AccessibleAfterFirstUnlock', 9 | ALWAYS: 'AccessibleAlways', 10 | WHEN_PASSCODE_SET_THIS_DEVICE_ONLY: 'AccessibleWhenPasscodeSetThisDeviceOnly', 11 | WHEN_UNLOCKED_THIS_DEVICE_ONLY: 'AccessibleWhenUnlockedThisDeviceOnly', 12 | AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY: 13 | 'AccessibleAfterFirstUnlockThisDeviceOnly', 14 | ALWAYS_THIS_DEVICE_ONLY: 'AccessibleAlwaysThisDeviceOnly', 15 | }; 16 | 17 | export const ACCESS_CONTROL = { 18 | USER_PRESENCE: 'UserPresence', 19 | BIOMETRY_ANY: 'BiometryAny', 20 | BIOMETRY_CURRENT_SET: 'BiometryCurrentSet', 21 | DEVICE_PASSCODE: 'DevicePasscode', 22 | APPLICATION_PASSWORD: 'ApplicationPassword', 23 | BIOMETRY_ANY_OR_DEVICE_PASSCODE: 'BiometryAnyOrDevicePasscode', 24 | BIOMETRY_CURRENT_SET_OR_DEVICE_PASSCODE: 'BiometryCurrentSetOrDevicePasscode', 25 | }; 26 | 27 | export const AUTHENTICATION_TYPE = { 28 | DEVICE_PASSCODE_OR_BIOMETRICS: 'AuthenticationWithBiometricsDevicePasscode', 29 | BIOMETRICS: 'AuthenticationWithBiometrics', 30 | }; 31 | 32 | export const BIOMETRY_TYPE = { 33 | TOUCH_ID: 'TouchID', 34 | FACE_ID: 'FaceID', 35 | FINGERPRINT: 'Fingerprint', 36 | }; 37 | 38 | const isAndroid = Platform.OS === 'android' 39 | 40 | const defaultOptions = { 41 | accessControl: null, 42 | accessible: ACCESSIBLE.WHEN_UNLOCKED, 43 | accessGroup: null, 44 | authenticationPrompt: 'Authenticate to retrieve secret data', 45 | service: null, 46 | authenticateType: AUTHENTICATION_TYPE.DEVICE_PASSCODE_OR_BIOMETRICS, 47 | } 48 | 49 | export default { 50 | getItem(key, options) { 51 | const finalOptions = { 52 | ...defaultOptions, 53 | ...options, 54 | } 55 | if (isAndroid) { 56 | return RNSecureStorage.getItem(key, finalOptions.service) 57 | } 58 | return RNSecureStorage.getItem(key, finalOptions) 59 | }, 60 | setItem(key, value, options) { 61 | const finalOptions = { 62 | ...defaultOptions, 63 | ...options, 64 | } 65 | if (isAndroid) { 66 | return RNSecureStorage.setItem(key, value, finalOptions.service) 67 | } 68 | return RNSecureStorage.setItem(key, value, finalOptions) 69 | }, 70 | removeItem(key, options) { 71 | const finalOptions = { 72 | ...defaultOptions, 73 | ...options, 74 | } 75 | if (isAndroid) { 76 | return RNSecureStorage.removeItem(key, finalOptions.service) 77 | } 78 | return RNSecureStorage.removeItem(key, finalOptions) 79 | }, 80 | getAllKeys(options) { 81 | const finalOptions = { 82 | ...defaultOptions, 83 | ...options, 84 | } 85 | if (isAndroid) { 86 | return RNSecureStorage.getAllKeys(finalOptions.service) 87 | } 88 | return RNSecureStorage.getAllKeys(finalOptions) 89 | }, 90 | getSupportedBiometryType() { 91 | return RNSecureStorage.getSupportedBiometryType() 92 | }, 93 | canCheckAuthentication(options) { 94 | const finalOptions = { 95 | ...defaultOptions, 96 | ...options, 97 | } 98 | if (isAndroid) { 99 | return RNSecureStorage.getSupportedBiometryType() !== null 100 | } 101 | return RNSecureStorage.canCheckAuthentication(options) 102 | }, 103 | } 104 | -------------------------------------------------------------------------------- /ios/RNSecureStorage.h: -------------------------------------------------------------------------------- 1 | 2 | #if __has_include() 3 | #import 4 | #else 5 | #import "RCTBridgeModule.h" 6 | #endif 7 | 8 | @interface RNSecureStorage : NSObject 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /ios/RNSecureStorage.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "RNSecureStorage.h" 3 | 4 | #import 5 | 6 | @implementation RNSecureStorage 7 | 8 | - (dispatch_queue_t)methodQueue 9 | { 10 | return dispatch_get_main_queue(); 11 | } 12 | RCT_EXPORT_MODULE() 13 | 14 | // Messages from the comments in 15 | NSString *messageForError(NSError *error) 16 | { 17 | switch (error.code) { 18 | case errSecUnimplemented: 19 | return @"Function or operation not implemented."; 20 | 21 | case errSecIO: 22 | return @"I/O error."; 23 | 24 | case errSecOpWr: 25 | return @"File already open with with write permission."; 26 | 27 | case errSecParam: 28 | return @"One or more parameters passed to a function were not valid."; 29 | 30 | case errSecAllocate: 31 | return @"Failed to allocate memory."; 32 | 33 | case errSecUserCanceled: 34 | return @"User canceled the operation."; 35 | 36 | case errSecBadReq: 37 | return @"Bad parameter or invalid state for operation."; 38 | 39 | case errSecNotAvailable: 40 | return @"No keychain is available. You may need to restart your computer."; 41 | 42 | case errSecDuplicateItem: 43 | return @"The specified item already exists in the keychain."; 44 | 45 | case errSecItemNotFound: 46 | return @"The specified item could not be found in the keychain."; 47 | 48 | case errSecInteractionNotAllowed: 49 | return @"User interaction is not allowed."; 50 | 51 | case errSecDecode: 52 | return @"Unable to decode the provided data."; 53 | 54 | case errSecAuthFailed: 55 | return @"The user name or passphrase you entered is not correct."; 56 | 57 | case errSecMissingEntitlement: 58 | return @"Internal error when a required entitlement isn't present."; 59 | 60 | default: 61 | return error.localizedDescription; 62 | } 63 | } 64 | 65 | NSString *codeForError(NSError *error) 66 | { 67 | return [NSString stringWithFormat:@"%li", (long)error.code]; 68 | } 69 | 70 | void rejectWithError(RCTPromiseRejectBlock reject, NSError *error) 71 | { 72 | return reject(codeForError(error), messageForError(error), nil); 73 | } 74 | 75 | bool isNotNull(NSDictionary *options, NSString *key) 76 | { 77 | return (options && options[key] != nil && options[key] != (id)[NSNull null]); 78 | } 79 | 80 | CFStringRef accessibleValue(NSDictionary *options) 81 | { 82 | if (isNotNull(options, @"accessible")) { 83 | NSDictionary *keyMap = @{ 84 | @"AccessibleWhenUnlocked": (__bridge NSString *)kSecAttrAccessibleWhenUnlocked, 85 | @"AccessibleAfterFirstUnlock": (__bridge NSString *)kSecAttrAccessibleAfterFirstUnlock, 86 | @"AccessibleAlways": (__bridge NSString *)kSecAttrAccessibleAlways, 87 | @"AccessibleWhenPasscodeSetThisDeviceOnly": (__bridge NSString *)kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly, 88 | @"AccessibleWhenUnlockedThisDeviceOnly": (__bridge NSString *)kSecAttrAccessibleWhenUnlockedThisDeviceOnly, 89 | @"AccessibleAfterFirstUnlockThisDeviceOnly": (__bridge NSString *)kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly, 90 | @"AccessibleAlwaysThisDeviceOnly": (__bridge NSString *)kSecAttrAccessibleAlwaysThisDeviceOnly 91 | }; 92 | NSString *result = keyMap[options[@"accessible"]]; 93 | if (result) { 94 | return (__bridge CFStringRef)result; 95 | } 96 | } 97 | return kSecAttrAccessibleAfterFirstUnlock; 98 | } 99 | 100 | NSString *serviceValue(NSDictionary *options) 101 | { 102 | if (isNotNull(options, @"service")) { 103 | return options[@"service"]; 104 | } 105 | return [[NSBundle mainBundle] bundleIdentifier]; 106 | } 107 | 108 | NSString *accessGroupValue(NSDictionary *options) 109 | { 110 | if (isNotNull(options, @"accessGroup")) { 111 | return options[@"accessGroup"]; 112 | } 113 | return nil; 114 | } 115 | 116 | #pragma mark - Proposed functionality - Helpers 117 | 118 | #define kAuthenticationType @"authenticationType" 119 | #define kAuthenticationTypeBiometrics @"AuthenticationWithBiometrics" 120 | 121 | #define kAccessControlType @"accessControl" 122 | #define kAccessControlUserPresence @"UserPresence" 123 | #define kAccessControlBiometryAny @"BiometryAny" 124 | #define kAccessControlBiometryCurrentSet @"BiometryCurrentSet" 125 | #define kAccessControlDevicePasscode @"DevicePasscode" 126 | #define kAccessControlApplicationPassword @"ApplicationPassword" 127 | #define kAccessControlBiometryAnyOrDevicePasscode @"BiometryAnyOrDevicePasscode" 128 | #define kAccessControlBiometryCurrentSetOrDevicePasscode @"BiometryCurrentSetOrDevicePasscode" 129 | 130 | #define kBiometryTypeTouchID @"TouchID" 131 | #define kBiometryTypeFaceID @"FaceID" 132 | 133 | #define kAuthenticationPromptMessage @"authenticationPrompt" 134 | 135 | LAPolicy authPolicy(NSDictionary *options) 136 | { 137 | if (options && options[kAuthenticationType]) { 138 | if ([ options[kAuthenticationType] isEqualToString:kAuthenticationTypeBiometrics ]) { 139 | return LAPolicyDeviceOwnerAuthenticationWithBiometrics; 140 | } 141 | } 142 | return LAPolicyDeviceOwnerAuthentication; 143 | } 144 | 145 | SecAccessControlCreateFlags accessControlValue(NSDictionary *options) 146 | { 147 | if (options && options[kAccessControlType] && [options[kAccessControlType] isKindOfClass:[NSString class]]) { 148 | if ([options[kAccessControlType] isEqualToString: kAccessControlUserPresence]) { 149 | return kSecAccessControlUserPresence; 150 | } 151 | else if ([options[kAccessControlType] isEqualToString: kAccessControlBiometryAny]) { 152 | return kSecAccessControlTouchIDAny; 153 | } 154 | else if ([options[kAccessControlType] isEqualToString: kAccessControlBiometryCurrentSet]) { 155 | return kSecAccessControlTouchIDCurrentSet; 156 | } 157 | else if ([options[kAccessControlType] isEqualToString: kAccessControlDevicePasscode]) { 158 | return kSecAccessControlDevicePasscode; 159 | } 160 | else if ([options[kAccessControlType] isEqualToString: kAccessControlBiometryAnyOrDevicePasscode]) { 161 | return kSecAccessControlTouchIDAny|kSecAccessControlOr|kSecAccessControlDevicePasscode; 162 | } 163 | else if ([options[kAccessControlType] isEqualToString: kAccessControlBiometryCurrentSetOrDevicePasscode]) { 164 | return kSecAccessControlTouchIDCurrentSet|kSecAccessControlOr|kSecAccessControlDevicePasscode; 165 | } 166 | else if ([options[kAccessControlType] isEqualToString: kAccessControlApplicationPassword]) { 167 | return kSecAccessControlApplicationPassword; 168 | } 169 | } 170 | return 0; 171 | } 172 | 173 | RCT_EXPORT_METHOD(setItem:(NSString *)key value:(NSString *)value options:(NSDictionary *)options resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 174 | { 175 | NSString *service = serviceValue(options); 176 | NSDictionary *attributes = @{ 177 | (__bridge NSString *)kSecClass: (__bridge id)(kSecClassGenericPassword), 178 | (__bridge NSString *)kSecAttrService: service, 179 | (__bridge NSString *)kSecAttrAccount: key, 180 | (__bridge NSString *)kSecValueData: [value dataUsingEncoding:NSUTF8StringEncoding], 181 | }; 182 | [self deleteItemForKey:key inService:service]; 183 | [self insertKeychainEntry:attributes withOptions:options resolver:resolve rejecter:reject]; 184 | } 185 | 186 | RCT_EXPORT_METHOD(getItem:(NSString *)key options:(NSDictionary *)options resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 187 | { 188 | NSString *service = serviceValue(options); 189 | NSString *authenticationPrompt = @"Authenticate to retrieve secret data"; 190 | if (options && options[kAuthenticationPromptMessage]) { 191 | authenticationPrompt = options[kAuthenticationPromptMessage]; 192 | } 193 | NSDictionary *query = @{ 194 | (__bridge NSString *)kSecClass: (__bridge id)(kSecClassGenericPassword), 195 | (__bridge NSString *)kSecAttrService: service, 196 | (__bridge NSString *)kSecAttrAccount: key, 197 | (__bridge NSString *)kSecReturnAttributes: (__bridge id)kCFBooleanTrue, 198 | (__bridge NSString *)kSecReturnData: (__bridge id)kCFBooleanTrue, 199 | (__bridge NSString *)kSecUseOperationPrompt: authenticationPrompt, 200 | }; 201 | 202 | // Look up service in the keychain 203 | NSDictionary *found = nil; 204 | CFTypeRef foundTypeRef = NULL; 205 | OSStatus osStatus = SecItemCopyMatching((__bridge CFDictionaryRef) query, (CFTypeRef*)&foundTypeRef); 206 | 207 | if (osStatus != noErr && osStatus != errSecItemNotFound) { 208 | NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:osStatus userInfo:nil]; 209 | return rejectWithError(reject, error); 210 | } 211 | 212 | found = (__bridge NSDictionary*)(foundTypeRef); 213 | if (!found) { 214 | return resolve(nil); 215 | } 216 | NSString *value = [[NSString alloc] initWithData:[found objectForKey:(__bridge id)(kSecValueData)] encoding:NSUTF8StringEncoding]; 217 | return resolve(value); 218 | } 219 | 220 | RCT_EXPORT_METHOD(removeItem:(NSString *)key options:(NSDictionary *)options resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 221 | { 222 | NSString *service = serviceValue(options); 223 | 224 | OSStatus osStatus = [self deleteItemForKey:key inService:service]; 225 | 226 | if (osStatus != noErr && osStatus != errSecItemNotFound) { 227 | NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:osStatus userInfo:nil]; 228 | return rejectWithError(reject, error); 229 | } 230 | 231 | return resolve(@(YES)); 232 | } 233 | 234 | RCT_EXPORT_METHOD(getAllKeys:(NSDictionary *)options resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 235 | { 236 | NSString *service = serviceValue(options); 237 | NSString *authenticationPrompt = @"Authenticate to retrieve secret data"; 238 | if (options && options[kAuthenticationPromptMessage]) { 239 | authenticationPrompt = options[kAuthenticationPromptMessage]; 240 | } 241 | 242 | NSMutableArray* finalResult = [[NSMutableArray alloc] init]; 243 | NSMutableDictionary* query = [NSMutableDictionary dictionaryWithDictionary:@{ 244 | (__bridge NSString *)kSecClass: (__bridge id)(kSecClassGenericPassword), 245 | (__bridge NSString *)kSecAttrService: service, 246 | (__bridge NSString *)kSecReturnAttributes: (__bridge id)kCFBooleanTrue, 247 | (__bridge NSString *)kSecMatchLimit: (__bridge NSString *)kSecMatchLimitAll, 248 | (__bridge NSString *)kSecReturnData: (__bridge id)kCFBooleanTrue, 249 | (__bridge NSString *)kSecUseOperationPrompt: authenticationPrompt, 250 | }]; 251 | 252 | CFTypeRef result = NULL; 253 | OSStatus osStatus = SecItemCopyMatching((__bridge CFDictionaryRef)query, &result); 254 | 255 | if (osStatus != noErr && osStatus != errSecItemNotFound) { 256 | NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:osStatus userInfo:nil]; 257 | return rejectWithError(reject, error); 258 | } 259 | 260 | if (result != NULL) { 261 | for (NSDictionary* item in (__bridge id)result) { 262 | [finalResult addObject:(NSString*)[item objectForKey:(__bridge id)(kSecAttrAccount)]]; 263 | } 264 | } 265 | return resolve(finalResult); 266 | } 267 | 268 | RCT_EXPORT_METHOD(canCheckAuthentication:(NSDictionary *)options resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 269 | { 270 | LAPolicy policyToEvaluate = authPolicy(options); 271 | 272 | NSError *aerr = nil; 273 | BOOL canBeProtected = [[LAContext new] canEvaluatePolicy:policyToEvaluate error:&aerr]; 274 | 275 | if (aerr || !canBeProtected) { 276 | return resolve(@(NO)); 277 | } else { 278 | return resolve(@(YES)); 279 | } 280 | } 281 | 282 | RCT_EXPORT_METHOD(getSupportedBiometryType:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) 283 | { 284 | NSError *aerr = nil; 285 | LAContext *context = [LAContext new]; 286 | BOOL canBeProtected = [context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&aerr]; 287 | 288 | if (!aerr && canBeProtected) { 289 | if (@available(iOS 11, *)) { 290 | if (context.biometryType == LABiometryTypeFaceID) { 291 | return resolve(kBiometryTypeFaceID); 292 | } 293 | } 294 | return resolve(kBiometryTypeTouchID); 295 | } 296 | 297 | return resolve([NSNull null]); 298 | } 299 | 300 | - (OSStatus)deleteItemForKey:(NSString *)key inService:(NSString *)service 301 | { 302 | NSDictionary *query = @{ 303 | (__bridge NSString *)kSecClass: (__bridge id)(kSecClassGenericPassword), 304 | (__bridge NSString *)kSecAttrService: service, 305 | (__bridge NSString *)kSecAttrAccount: key, 306 | (__bridge NSString *)kSecReturnAttributes: (__bridge id)kCFBooleanTrue, 307 | (__bridge NSString *)kSecReturnData: (__bridge id)kCFBooleanFalse, 308 | }; 309 | 310 | return SecItemDelete((__bridge CFDictionaryRef) query); 311 | } 312 | 313 | - (void)insertKeychainEntry:(NSDictionary *)attributes withOptions:(NSDictionary * __nullable)options resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject 314 | { 315 | NSString *accessGroup = accessGroupValue(options); 316 | CFStringRef accessible = accessibleValue(options); 317 | SecAccessControlCreateFlags accessControl = accessControlValue(options); 318 | 319 | NSMutableDictionary *mAttributes = attributes.mutableCopy; 320 | 321 | if (accessControl) { 322 | NSError *aerr = nil; 323 | BOOL canAuthenticate = [[LAContext new] canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:&aerr]; 324 | if (aerr || !canAuthenticate) { 325 | return rejectWithError(reject, aerr); 326 | } 327 | 328 | CFErrorRef error = NULL; 329 | SecAccessControlRef sacRef = SecAccessControlCreateWithFlags(kCFAllocatorDefault, 330 | accessible, 331 | accessControl, 332 | &error); 333 | 334 | if (error) { 335 | return rejectWithError(reject, aerr); 336 | } 337 | mAttributes[(__bridge NSString *)kSecAttrAccessControl] = (__bridge id)sacRef; 338 | } else { 339 | mAttributes[(__bridge NSString *)kSecAttrAccessible] = (__bridge id)accessible; 340 | } 341 | 342 | if (accessGroup != nil) { 343 | mAttributes[(__bridge NSString *)kSecAttrAccessGroup] = accessGroup; 344 | } 345 | 346 | attributes = [NSDictionary dictionaryWithDictionary:mAttributes]; 347 | 348 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 349 | OSStatus osStatus = SecItemAdd((__bridge CFDictionaryRef) attributes, NULL); 350 | 351 | dispatch_async(dispatch_get_main_queue(), ^{ 352 | if (osStatus != noErr && osStatus != errSecItemNotFound) { 353 | NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:osStatus userInfo:nil]; 354 | return rejectWithError(reject, error); 355 | } else { 356 | return resolve(@(YES)); 357 | } 358 | }); 359 | }); 360 | 361 | } 362 | 363 | @end 364 | 365 | -------------------------------------------------------------------------------- /ios/RNSecureStorage.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B3E7B58A1CC2AC0600A0062D /* RNSecureStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNSecureStorage.m */; }; 11 | /* End PBXBuildFile section */ 12 | 13 | /* Begin PBXCopyFilesBuildPhase section */ 14 | 58B511D91A9E6C8500147676 /* CopyFiles */ = { 15 | isa = PBXCopyFilesBuildPhase; 16 | buildActionMask = 2147483647; 17 | dstPath = "include/$(PRODUCT_NAME)"; 18 | dstSubfolderSpec = 16; 19 | files = ( 20 | ); 21 | runOnlyForDeploymentPostprocessing = 0; 22 | }; 23 | /* End PBXCopyFilesBuildPhase section */ 24 | 25 | /* Begin PBXFileReference section */ 26 | 134814201AA4EA6300B7C361 /* libRNSecureStorage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNSecureStorage.a; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | B3E7B5881CC2AC0600A0062D /* RNSecureStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNSecureStorage.h; sourceTree = ""; }; 28 | B3E7B5891CC2AC0600A0062D /* RNSecureStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNSecureStorage.m; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 58B511D81A9E6C8500147676 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | 134814211AA4EA7D00B7C361 /* Products */ = { 43 | isa = PBXGroup; 44 | children = ( 45 | 134814201AA4EA6300B7C361 /* libRNSecureStorage.a */, 46 | ); 47 | name = Products; 48 | sourceTree = ""; 49 | }; 50 | 289A75F81F7D1C4500E34F27 /* Frameworks */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | ); 54 | name = Frameworks; 55 | sourceTree = ""; 56 | }; 57 | 58B511D21A9E6C8500147676 = { 58 | isa = PBXGroup; 59 | children = ( 60 | B3E7B5881CC2AC0600A0062D /* RNSecureStorage.h */, 61 | B3E7B5891CC2AC0600A0062D /* RNSecureStorage.m */, 62 | 134814211AA4EA7D00B7C361 /* Products */, 63 | 289A75F81F7D1C4500E34F27 /* Frameworks */, 64 | ); 65 | sourceTree = ""; 66 | }; 67 | /* End PBXGroup section */ 68 | 69 | /* Begin PBXNativeTarget section */ 70 | 58B511DA1A9E6C8500147676 /* RNSecureStorage */ = { 71 | isa = PBXNativeTarget; 72 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNSecureStorage" */; 73 | buildPhases = ( 74 | 58B511D71A9E6C8500147676 /* Sources */, 75 | 58B511D81A9E6C8500147676 /* Frameworks */, 76 | 58B511D91A9E6C8500147676 /* CopyFiles */, 77 | ); 78 | buildRules = ( 79 | ); 80 | dependencies = ( 81 | ); 82 | name = RNSecureStorage; 83 | productName = RCTDataManager; 84 | productReference = 134814201AA4EA6300B7C361 /* libRNSecureStorage.a */; 85 | productType = "com.apple.product-type.library.static"; 86 | }; 87 | /* End PBXNativeTarget section */ 88 | 89 | /* Begin PBXProject section */ 90 | 58B511D31A9E6C8500147676 /* Project object */ = { 91 | isa = PBXProject; 92 | attributes = { 93 | LastUpgradeCheck = 0920; 94 | ORGANIZATIONNAME = Facebook; 95 | TargetAttributes = { 96 | 58B511DA1A9E6C8500147676 = { 97 | CreatedOnToolsVersion = 6.1.1; 98 | }; 99 | }; 100 | }; 101 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNSecureStorage" */; 102 | compatibilityVersion = "Xcode 3.2"; 103 | developmentRegion = English; 104 | hasScannedForEncodings = 0; 105 | knownRegions = ( 106 | en, 107 | ); 108 | mainGroup = 58B511D21A9E6C8500147676; 109 | productRefGroup = 58B511D21A9E6C8500147676; 110 | projectDirPath = ""; 111 | projectRoot = ""; 112 | targets = ( 113 | 58B511DA1A9E6C8500147676 /* RNSecureStorage */, 114 | ); 115 | }; 116 | /* End PBXProject section */ 117 | 118 | /* Begin PBXSourcesBuildPhase section */ 119 | 58B511D71A9E6C8500147676 /* Sources */ = { 120 | isa = PBXSourcesBuildPhase; 121 | buildActionMask = 2147483647; 122 | files = ( 123 | B3E7B58A1CC2AC0600A0062D /* RNSecureStorage.m in Sources */, 124 | ); 125 | runOnlyForDeploymentPostprocessing = 0; 126 | }; 127 | /* End PBXSourcesBuildPhase section */ 128 | 129 | /* Begin XCBuildConfiguration section */ 130 | 58B511ED1A9E6C8500147676 /* Debug */ = { 131 | isa = XCBuildConfiguration; 132 | buildSettings = { 133 | ALWAYS_SEARCH_USER_PATHS = NO; 134 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 135 | CLANG_CXX_LIBRARY = "libc++"; 136 | CLANG_ENABLE_MODULES = YES; 137 | CLANG_ENABLE_OBJC_ARC = YES; 138 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 139 | CLANG_WARN_BOOL_CONVERSION = YES; 140 | CLANG_WARN_COMMA = YES; 141 | CLANG_WARN_CONSTANT_CONVERSION = YES; 142 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 143 | CLANG_WARN_EMPTY_BODY = YES; 144 | CLANG_WARN_ENUM_CONVERSION = YES; 145 | CLANG_WARN_INFINITE_RECURSION = YES; 146 | CLANG_WARN_INT_CONVERSION = YES; 147 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 148 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 149 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 150 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 151 | CLANG_WARN_STRICT_PROTOTYPES = YES; 152 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 153 | CLANG_WARN_UNREACHABLE_CODE = YES; 154 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 155 | COPY_PHASE_STRIP = NO; 156 | ENABLE_STRICT_OBJC_MSGSEND = YES; 157 | ENABLE_TESTABILITY = YES; 158 | GCC_C_LANGUAGE_STANDARD = gnu99; 159 | GCC_DYNAMIC_NO_PIC = NO; 160 | GCC_NO_COMMON_BLOCKS = YES; 161 | GCC_OPTIMIZATION_LEVEL = 0; 162 | GCC_PREPROCESSOR_DEFINITIONS = ( 163 | "DEBUG=1", 164 | "$(inherited)", 165 | ); 166 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 167 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 168 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 169 | GCC_WARN_UNDECLARED_SELECTOR = YES; 170 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 171 | GCC_WARN_UNUSED_FUNCTION = YES; 172 | GCC_WARN_UNUSED_VARIABLE = YES; 173 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 174 | MTL_ENABLE_DEBUG_INFO = YES; 175 | ONLY_ACTIVE_ARCH = YES; 176 | SDKROOT = iphoneos; 177 | }; 178 | name = Debug; 179 | }; 180 | 58B511EE1A9E6C8500147676 /* Release */ = { 181 | isa = XCBuildConfiguration; 182 | buildSettings = { 183 | ALWAYS_SEARCH_USER_PATHS = NO; 184 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 185 | CLANG_CXX_LIBRARY = "libc++"; 186 | CLANG_ENABLE_MODULES = YES; 187 | CLANG_ENABLE_OBJC_ARC = YES; 188 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 189 | CLANG_WARN_BOOL_CONVERSION = YES; 190 | CLANG_WARN_COMMA = YES; 191 | CLANG_WARN_CONSTANT_CONVERSION = YES; 192 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 193 | CLANG_WARN_EMPTY_BODY = YES; 194 | CLANG_WARN_ENUM_CONVERSION = YES; 195 | CLANG_WARN_INFINITE_RECURSION = YES; 196 | CLANG_WARN_INT_CONVERSION = YES; 197 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 198 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 199 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 200 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 201 | CLANG_WARN_STRICT_PROTOTYPES = YES; 202 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 203 | CLANG_WARN_UNREACHABLE_CODE = YES; 204 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 205 | COPY_PHASE_STRIP = YES; 206 | ENABLE_NS_ASSERTIONS = NO; 207 | ENABLE_STRICT_OBJC_MSGSEND = YES; 208 | GCC_C_LANGUAGE_STANDARD = gnu99; 209 | GCC_NO_COMMON_BLOCKS = YES; 210 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 211 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 212 | GCC_WARN_UNDECLARED_SELECTOR = YES; 213 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 214 | GCC_WARN_UNUSED_FUNCTION = YES; 215 | GCC_WARN_UNUSED_VARIABLE = YES; 216 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 217 | MTL_ENABLE_DEBUG_INFO = NO; 218 | SDKROOT = iphoneos; 219 | VALIDATE_PRODUCT = YES; 220 | }; 221 | name = Release; 222 | }; 223 | 58B511F01A9E6C8500147676 /* Debug */ = { 224 | isa = XCBuildConfiguration; 225 | buildSettings = { 226 | HEADER_SEARCH_PATHS = ( 227 | "$(inherited)", 228 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 229 | "$(SRCROOT)/../../../React/**", 230 | "$(SRCROOT)/../../react-native/React/**", 231 | ); 232 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 233 | OTHER_LDFLAGS = "-ObjC"; 234 | PRODUCT_NAME = RNSecureStorage; 235 | SKIP_INSTALL = YES; 236 | }; 237 | name = Debug; 238 | }; 239 | 58B511F11A9E6C8500147676 /* Release */ = { 240 | isa = XCBuildConfiguration; 241 | buildSettings = { 242 | HEADER_SEARCH_PATHS = ( 243 | "$(inherited)", 244 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 245 | "$(SRCROOT)/../../../React/**", 246 | "$(SRCROOT)/../../react-native/React/**", 247 | ); 248 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 249 | OTHER_LDFLAGS = "-ObjC"; 250 | PRODUCT_NAME = RNSecureStorage; 251 | SKIP_INSTALL = YES; 252 | }; 253 | name = Release; 254 | }; 255 | /* End XCBuildConfiguration section */ 256 | 257 | /* Begin XCConfigurationList section */ 258 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNSecureStorage" */ = { 259 | isa = XCConfigurationList; 260 | buildConfigurations = ( 261 | 58B511ED1A9E6C8500147676 /* Debug */, 262 | 58B511EE1A9E6C8500147676 /* Release */, 263 | ); 264 | defaultConfigurationIsVisible = 0; 265 | defaultConfigurationName = Release; 266 | }; 267 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNSecureStorage" */ = { 268 | isa = XCConfigurationList; 269 | buildConfigurations = ( 270 | 58B511F01A9E6C8500147676 /* Debug */, 271 | 58B511F11A9E6C8500147676 /* Release */, 272 | ); 273 | defaultConfigurationIsVisible = 0; 274 | defaultConfigurationName = Release; 275 | }; 276 | /* End XCConfigurationList section */ 277 | }; 278 | rootObject = 58B511D31A9E6C8500147676 /* Project object */; 279 | } 280 | -------------------------------------------------------------------------------- /ios/RNSecureStorage.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-secure-storage", 3 | "title": "React Native Secure Storage", 4 | "version": "0.1.2", 5 | "description": "A secure AsyncStorage partial implementation", 6 | "main": "index.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/oyyq99999/react-native-secure-storage.git", 13 | "baseUrl": "https://github.com/oyyq99999/react-native-secure-storage" 14 | }, 15 | "keywords": [ 16 | "react-native", 17 | "react-native-component", 18 | "mobile", 19 | "ios", 20 | "android", 21 | "keychain", 22 | "secure" 23 | ], 24 | "author": { 25 | "name": "Yunqi Ouyang", 26 | "email": "oyyq9999999@163.com" 27 | }, 28 | "license": "MIT", 29 | "licenseFilename": "LICENSE", 30 | "readmeFilename": "README.md", 31 | "peerDependencies": { 32 | "react": ">=16.0.0-alpha.6", 33 | "react-native": ">=0.44.1" 34 | }, 35 | "devDependencies": { 36 | "react": "16.0.0-alpha.6", 37 | "react-native": "^0.44.1" 38 | } 39 | } 40 | --------------------------------------------------------------------------------