浏览代码

add example app for iOS and Android

Yonah Forst 8 年前
父节点
当前提交
04a42dd234
共有 39 个文件被更改,包括 2193 次插入0 次删除
  1. 6
    0
      Example/.buckconfig
  2. 41
    0
      Example/.flowconfig
  3. 41
    0
      Example/.gitignore
  4. 1
    0
      Example/.watchmanconfig
  5. 137
    0
      Example/Example.js
  6. 66
    0
      Example/android/app/BUCK
  7. 140
    0
      Example/android/app/build.gradle
  8. 66
    0
      Example/android/app/proguard-rules.pro
  9. 37
    0
      Example/android/app/src/main/AndroidManifest.xml
  10. 16
    0
      Example/android/app/src/main/java/com/example/MainActivity.java
  11. 37
    0
      Example/android/app/src/main/java/com/example/MainApplication.java
  12. 二进制
      Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  13. 二进制
      Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  14. 二进制
      Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  15. 二进制
      Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  16. 4
    0
      Example/android/app/src/main/res/values/strings.xml
  17. 8
    0
      Example/android/app/src/main/res/values/styles.xml
  18. 24
    0
      Example/android/build.gradle
  19. 20
    0
      Example/android/gradle.properties
  20. 二进制
      Example/android/gradle/wrapper/gradle-wrapper.jar
  21. 5
    0
      Example/android/gradle/wrapper/gradle-wrapper.properties
  22. 164
    0
      Example/android/gradlew
  23. 90
    0
      Example/android/gradlew.bat
  24. 8
    0
      Example/android/keystores/BUCK
  25. 4
    0
      Example/android/keystores/debug.keystore.properties
  26. 5
    0
      Example/android/settings.gradle
  27. 14
    0
      Example/index.android.js
  28. 14
    0
      Example/index.ios.js
  29. 816
    0
      Example/ios/Example.xcodeproj/project.pbxproj
  30. 112
    0
      Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme
  31. 16
    0
      Example/ios/Example/AppDelegate.h
  32. 37
    0
      Example/ios/Example/AppDelegate.m
  33. 42
    0
      Example/ios/Example/Base.lproj/LaunchScreen.xib
  34. 38
    0
      Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json
  35. 59
    0
      Example/ios/Example/Info.plist
  36. 18
    0
      Example/ios/Example/main.m
  37. 70
    0
      Example/ios/ExampleTests/ExampleTests.m
  38. 24
    0
      Example/ios/ExampleTests/Info.plist
  39. 13
    0
      Example/package.json

+ 6
- 0
Example/.buckconfig 查看文件

@@ -0,0 +1,6 @@
1
+
2
+[android]
3
+  target = Google Inc.:Google APIs:23
4
+
5
+[maven_repositories]
6
+  central = https://repo1.maven.org/maven2

+ 41
- 0
Example/.flowconfig 查看文件

@@ -0,0 +1,41 @@
1
+[ignore]
2
+
3
+# We fork some components by platform.
4
+.*/*.android.js
5
+
6
+# Ignore templates with `@flow` in header
7
+.*/local-cli/generator.*
8
+
9
+# Ignore malformed json
10
+.*/node_modules/y18n/test/.*\.json
11
+
12
+[include]
13
+
14
+[libs]
15
+node_modules/react-native/Libraries/react-native/react-native-interface.js
16
+node_modules/react-native/flow
17
+flow/
18
+
19
+[options]
20
+module.system=haste
21
+
22
+esproposal.class_static_fields=enable
23
+esproposal.class_instance_fields=enable
24
+
25
+experimental.strict_type_args=true
26
+
27
+munge_underscores=true
28
+
29
+module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
30
+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'
31
+
32
+suppress_type=$FlowIssue
33
+suppress_type=$FlowFixMe
34
+suppress_type=$FixMe
35
+
36
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
37
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
38
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
39
+
40
+[version]
41
+^0.27.0

+ 41
- 0
Example/.gitignore 查看文件

@@ -0,0 +1,41 @@
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/IJ
26
+#
27
+*.iml
28
+.idea
29
+.gradle
30
+local.properties
31
+
32
+# node.js
33
+#
34
+node_modules/
35
+npm-debug.log
36
+
37
+# BUCK
38
+buck-out/
39
+\.buckd/
40
+android/app/libs
41
+android/keystores/debug.keystore

+ 1
- 0
Example/.watchmanconfig 查看文件

@@ -0,0 +1 @@
1
+{}

+ 137
- 0
Example/Example.js 查看文件

@@ -0,0 +1,137 @@
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
+  StyleSheet,
10
+  TouchableHighlight,
11
+  Text,
12
+  View,
13
+  Alert,
14
+  AppState,
15
+} from 'react-native';
16
+
17
+import Permissions from 'react-native-permissions'
18
+
19
+export default class Example extends Component {
20
+  state = {
21
+    types: [],
22
+    status: {},
23
+  }
24
+
25
+  componentDidMount() {
26
+    let types = Permissions.getPermissionTypes()
27
+    this.setState({ types })
28
+    this._updatePermissions(types)
29
+    AppState.addEventListener('change', this._handleAppStateChange.bind(this));
30
+  }
31
+
32
+  componentWillUnmount() {
33
+    AppState.removeEventListener('change', this._handleAppStateChange.bind(this));
34
+  }
35
+
36
+  //update permissions when app comes back from settings
37
+  _handleAppStateChange(appState) {
38
+    if (appState == 'active') {
39
+      this._updatePermissions(this.state.types)
40
+    }
41
+  }
42
+
43
+  _updatePermissions(types) {
44
+    Permissions.checkMultiplePermissions(types)
45
+      .then(status => this.setState({ status }))
46
+  }
47
+
48
+  _requestPermission(permission) {
49
+    Permissions.requestPermission(permission)
50
+      .then(res => {
51
+        this.setState({
52
+          status: {...this.state.status, [permission]: res}
53
+        })
54
+        if (res != 'authorized') {
55
+          Alert.alert(
56
+            'Whoops!',
57
+            "There was a problem getting your permission. Please enable it from settings.",
58
+            [
59
+              {text: 'Cancel', style: 'cancel'},
60
+              {text: 'Open Settings', onPress: Permissions.openSettings },
61
+            ]
62
+          )
63
+        }
64
+      }).catch(e => console.warn(e))
65
+  }
66
+
67
+  render() {
68
+    return (
69
+      <View style={styles.container}>
70
+        {this.state.types.map(p => (
71
+          <TouchableHighlight 
72
+            style={[styles.button, styles[this.state.status[p]]]}
73
+            key={p}
74
+            onPress={this._requestPermission.bind(this, p)}>
75
+            <View>
76
+              <Text style={styles.text}>
77
+                {p}
78
+              </Text>
79
+              <Text style={styles.subtext}>
80
+                {this.state.status[p]}
81
+              </Text>
82
+            </View>
83
+          </TouchableHighlight>
84
+          )
85
+        )}
86
+        <TouchableHighlight 
87
+          style={styles.openSettings}
88
+          onPress={Permissions.openSettings}>
89
+          <Text style={styles.text}>Open settings</Text>
90
+        </TouchableHighlight>
91
+
92
+        <Text>Note: microphone permissions may not work on iOS simulator. Also, toggling permissions from the settings menu may cause the app to crash. This is normal on iOS. Google "ios crash permission change"</Text>
93
+      </View>
94
+    );
95
+  }
96
+}
97
+
98
+const styles = StyleSheet.create({
99
+  container: {
100
+    flex: 1,
101
+    justifyContent: 'center',
102
+    backgroundColor: '#F5FCFF',
103
+    padding: 10,
104
+  },
105
+  text: {
106
+    textAlign: 'center',
107
+    fontWeight: 'bold',
108
+  },
109
+  subtext: {
110
+    textAlign: 'center',
111
+  },
112
+  button: {
113
+    margin: 5,
114
+    borderColor: 'black',
115
+    borderWidth: 3,
116
+    overflow: 'hidden',
117
+  },
118
+  buttonInner: {
119
+    flexDirection: 'column',
120
+  },
121
+  undetermined: {
122
+    backgroundColor: '#E0E0E0',
123
+  },
124
+  authorized: {
125
+    backgroundColor: '#C5E1A5',
126
+  },
127
+  denied: {
128
+    backgroundColor: '#ef9a9a',
129
+  },
130
+  restricted: {
131
+    backgroundColor: '#FFAB91'
132
+  },
133
+  openSettings: {
134
+    padding: 10,
135
+    alignSelf: 'flex-end',
136
+  }
137
+})

+ 66
- 0
Example/android/app/BUCK 查看文件

@@ -0,0 +1,66 @@
1
+import re
2
+
3
+# To learn about Buck see [Docs](https://buckbuild.com/).
4
+# To run your application with Buck:
5
+# - install Buck
6
+# - `npm start` - to start the packager
7
+# - `cd android`
8
+# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
9
+# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
10
+# - `buck install -r android/app` - compile, install and run application
11
+#
12
+
13
+lib_deps = []
14
+for jarfile in glob(['libs/*.jar']):
15
+  name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
16
+  lib_deps.append(':' + name)
17
+  prebuilt_jar(
18
+    name = name,
19
+    binary_jar = jarfile,
20
+  )
21
+
22
+for aarfile in glob(['libs/*.aar']):
23
+  name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
24
+  lib_deps.append(':' + name)
25
+  android_prebuilt_aar(
26
+    name = name,
27
+    aar = aarfile,
28
+  )
29
+
30
+android_library(
31
+  name = 'all-libs',
32
+  exported_deps = lib_deps
33
+)
34
+
35
+android_library(
36
+  name = 'app-code',
37
+  srcs = glob([
38
+    'src/main/java/**/*.java',
39
+  ]),
40
+  deps = [
41
+    ':all-libs',
42
+    ':build_config',
43
+    ':res',
44
+  ],
45
+)
46
+
47
+android_build_config(
48
+  name = 'build_config',
49
+  package = 'com.example',
50
+)
51
+
52
+android_resource(
53
+  name = 'res',
54
+  res = 'src/main/res',
55
+  package = 'com.example',
56
+)
57
+
58
+android_binary(
59
+  name = 'app',
60
+  package_type = 'debug',
61
+  manifest = 'src/main/AndroidManifest.xml',
62
+  keystore = '//android/keystores:debug',
63
+  deps = [
64
+    ':app-code',
65
+  ],
66
+)

+ 140
- 0
Example/android/app/build.gradle 查看文件

@@ -0,0 +1,140 @@
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
+ *   // the root of your project, i.e. where "package.json" lives
37
+ *   root: "../../",
38
+ *
39
+ *   // where to put the JS bundle asset in debug mode
40
+ *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
41
+ *
42
+ *   // where to put the JS bundle asset in release mode
43
+ *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
44
+ *
45
+ *   // where to put drawable resources / React Native assets, e.g. the ones you use via
46
+ *   // require('./image.png')), in debug mode
47
+ *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
48
+ *
49
+ *   // where to put drawable resources / React Native assets, e.g. the ones you use via
50
+ *   // require('./image.png')), in release mode
51
+ *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
52
+ *
53
+ *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
54
+ *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
55
+ *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
56
+ *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
57
+ *   // for example, you might want to remove it from here.
58
+ *   inputExcludes: ["android/**", "ios/**"],
59
+ *
60
+ *   // override which node gets called and with what additional arguments
61
+ *   nodeExecutableAndArgs: ["node"]
62
+ *
63
+ *   // supply additional arguments to the packager
64
+ *   extraPackagerArgs: []
65
+ * ]
66
+ */
67
+
68
+apply from: "../../node_modules/react-native/react.gradle"
69
+
70
+/**
71
+ * Set this to true to create two separate APKs instead of one:
72
+ *   - An APK that only works on ARM devices
73
+ *   - An APK that only works on x86 devices
74
+ * The advantage is the size of the APK is reduced by about 4MB.
75
+ * Upload all the APKs to the Play Store and people will download
76
+ * the correct one based on the CPU architecture of their device.
77
+ */
78
+def enableSeparateBuildPerCPUArchitecture = false
79
+
80
+/**
81
+ * Run Proguard to shrink the Java bytecode in release builds.
82
+ */
83
+def enableProguardInReleaseBuilds = false
84
+
85
+android {
86
+    compileSdkVersion 23
87
+    buildToolsVersion "23.0.1"
88
+
89
+    defaultConfig {
90
+        applicationId "com.example"
91
+        minSdkVersion 22
92
+        targetSdkVersion 23
93
+        versionCode 1
94
+        versionName "1.0"
95
+        ndk {
96
+            abiFilters "armeabi-v7a", "x86"
97
+        }
98
+    }
99
+    splits {
100
+        abi {
101
+            reset()
102
+            enable enableSeparateBuildPerCPUArchitecture
103
+            universalApk false  // If true, also generate a universal APK
104
+            include "armeabi-v7a", "x86"
105
+        }
106
+    }
107
+    buildTypes {
108
+        release {
109
+            minifyEnabled enableProguardInReleaseBuilds
110
+            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
111
+        }
112
+    }
113
+    // applicationVariants are e.g. debug, release
114
+    applicationVariants.all { variant ->
115
+        variant.outputs.each { output ->
116
+            // For each separate APK per architecture, set a unique version code as described here:
117
+            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
118
+            def versionCodes = ["armeabi-v7a":1, "x86":2]
119
+            def abi = output.getFilter(OutputFile.ABI)
120
+            if (abi != null) {  // null for the universal-debug, universal-release variants
121
+                output.versionCodeOverride =
122
+                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
123
+            }
124
+        }
125
+    }
126
+}
127
+
128
+dependencies {
129
+    compile project(':react-native-permissions')
130
+    compile fileTree(dir: "libs", include: ["*.jar"])
131
+    compile "com.android.support:appcompat-v7:23.0.1"
132
+    compile "com.facebook.react:react-native:+"  // From node_modules
133
+}
134
+
135
+// Run this once to be able to run the application with BUCK
136
+// puts all compile dependencies into folder libs for BUCK to use
137
+task copyDownloadableDepsToLibs(type: Copy) {
138
+  from configurations.compile
139
+  into 'libs'
140
+}

+ 66
- 0
Example/android/app/proguard-rules.pro 查看文件

@@ -0,0 +1,66 @@
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 <methods>; }
47
+-keepclassmembers class *  { @com.facebook.react.uimanager.UIProp <fields>; }
48
+-keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
49
+-keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
50
+
51
+-dontwarn com.facebook.react.**
52
+
53
+# okhttp
54
+
55
+-keepattributes Signature
56
+-keepattributes *Annotation*
57
+-keep class okhttp3.** { *; }
58
+-keep interface okhttp3.** { *; }
59
+-dontwarn okhttp3.**
60
+
61
+# okio
62
+
63
+-keep class sun.misc.Unsafe { *; }
64
+-dontwarn java.nio.file.*
65
+-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
66
+-dontwarn okio.**

+ 37
- 0
Example/android/app/src/main/AndroidManifest.xml 查看文件

@@ -0,0 +1,37 @@
1
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+    package="com.example"
3
+    android:versionCode="1"
4
+    android:versionName="1.0">
5
+
6
+    <uses-permission android:name="android.permission.INTERNET" />
7
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
8
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
9
+    <uses-permission android:name="android.permission.CAMERA"/>
10
+    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
11
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
12
+    <uses-permission android:name="android.permission.READ_CONTACTS"/>
13
+    <uses-permission android:name="android.permission.READ_CALENDAR"/>
14
+
15
+    <uses-sdk
16
+        android:minSdkVersion="18"
17
+        android:targetSdkVersion="23" />
18
+
19
+    <application
20
+      android:name=".MainApplication"
21
+      android:allowBackup="true"
22
+      android:label="@string/app_name"
23
+      android:icon="@mipmap/ic_launcher"
24
+      android:theme="@style/AppTheme">
25
+      <activity
26
+        android:name=".MainActivity"
27
+        android:label="@string/app_name"
28
+        android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
29
+        <intent-filter>
30
+            <action android:name="android.intent.action.MAIN" />
31
+            <category android:name="android.intent.category.LAUNCHER" />
32
+        </intent-filter>
33
+      </activity>
34
+      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
35
+    </application>
36
+
37
+</manifest>

+ 16
- 0
Example/android/app/src/main/java/com/example/MainActivity.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.example;
2
+
3
+import com.facebook.react.ReactActivity;
4
+import com.joshblour.reactnativepermissions.ReactNativePermissionsPackage;
5
+
6
+public class MainActivity extends ReactActivity {
7
+
8
+    /**
9
+     * Returns the name of the main component registered from JavaScript.
10
+     * This is used to schedule rendering of the component.
11
+     */
12
+    @Override
13
+    protected String getMainComponentName() {
14
+        return "Example";
15
+    }
16
+}

+ 37
- 0
Example/android/app/src/main/java/com/example/MainApplication.java 查看文件

@@ -0,0 +1,37 @@
1
+package com.example;
2
+
3
+import android.app.Application;
4
+import android.util.Log;
5
+
6
+import com.facebook.react.ReactApplication;
7
+import com.facebook.react.ReactInstanceManager;
8
+import com.facebook.react.ReactNativeHost;
9
+import com.facebook.react.ReactPackage;
10
+import com.facebook.react.shell.MainReactPackage;
11
+import com.joshblour.reactnativepermissions.ReactNativePermissionsPackage;
12
+
13
+import java.util.Arrays;
14
+import java.util.List;
15
+
16
+public class MainApplication extends Application implements ReactApplication {
17
+
18
+  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
19
+    @Override
20
+    protected boolean getUseDeveloperSupport() {
21
+      return BuildConfig.DEBUG;
22
+    }
23
+
24
+    @Override
25
+    protected List<ReactPackage> getPackages() {
26
+      return Arrays.<ReactPackage>asList(
27
+          new MainReactPackage(),
28
+          new ReactNativePermissionsPackage()
29
+      );
30
+    }
31
+  };
32
+
33
+  @Override
34
+  public ReactNativeHost getReactNativeHost() {
35
+      return mReactNativeHost;
36
+  }
37
+}

二进制
Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png 查看文件


二进制
Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png 查看文件


二进制
Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png 查看文件


二进制
Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png 查看文件


+ 4
- 0
Example/android/app/src/main/res/values/strings.xml 查看文件

@@ -0,0 +1,4 @@
1
+<resources>
2
+
3
+    <string name="app_name">Example</string>
4
+</resources>

+ 8
- 0
Example/android/app/src/main/res/values/styles.xml 查看文件

@@ -0,0 +1,8 @@
1
+<resources>
2
+
3
+    <!-- Base application theme. -->
4
+    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
5
+        <!-- Customize your theme here. -->
6
+    </style>
7
+
8
+</resources>

+ 24
- 0
Example/android/build.gradle 查看文件

@@ -0,0 +1,24 @@
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:1.3.1'
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
+}

+ 20
- 0
Example/android/gradle.properties 查看文件

@@ -0,0 +1,20 @@
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

二进制
Example/android/gradle/wrapper/gradle-wrapper.jar 查看文件


+ 5
- 0
Example/android/gradle/wrapper/gradle-wrapper.properties 查看文件

@@ -0,0 +1,5 @@
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.4-all.zip

+ 164
- 0
Example/android/gradlew 查看文件

@@ -0,0 +1,164 @@
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 "$@"

+ 90
- 0
Example/android/gradlew.bat 查看文件

@@ -0,0 +1,90 @@
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

+ 8
- 0
Example/android/keystores/BUCK 查看文件

@@ -0,0 +1,8 @@
1
+keystore(
2
+  name = 'debug',
3
+  store = 'debug.keystore',
4
+  properties = 'debug.keystore.properties',
5
+  visibility = [
6
+    'PUBLIC',
7
+  ],
8
+)

+ 4
- 0
Example/android/keystores/debug.keystore.properties 查看文件

@@ -0,0 +1,4 @@
1
+key.store=debug.keystore
2
+key.alias=androiddebugkey
3
+key.store.password=android
4
+key.alias.password=android

+ 5
- 0
Example/android/settings.gradle 查看文件

@@ -0,0 +1,5 @@
1
+rootProject.name = 'Example'
2
+
3
+include ':app'
4
+include ':react-native-permissions'
5
+project(':react-native-permissions').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-permissions/android')

+ 14
- 0
Example/index.android.js 查看文件

@@ -0,0 +1,14 @@
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
+  AppRegistry,
10
+} from 'react-native';
11
+
12
+import Example from './Example'
13
+
14
+AppRegistry.registerComponent('Example', () => Example);

+ 14
- 0
Example/index.ios.js 查看文件

@@ -0,0 +1,14 @@
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
+  AppRegistry,
10
+} from 'react-native';
11
+
12
+import Example from './Example'
13
+
14
+AppRegistry.registerComponent('Example', () => Example);

+ 816
- 0
Example/ios/Example.xcodeproj/project.pbxproj 查看文件

@@ -0,0 +1,816 @@
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
+		50F9604CB69B4BA6A44EA44F /* libReactNativePermissions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D9820CCF930F4ED1BE137DA6 /* libReactNativePermissions.a */; };
26
+		832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
27
+/* End PBXBuildFile section */
28
+
29
+/* Begin PBXContainerItemProxy section */
30
+		00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
31
+			isa = PBXContainerItemProxy;
32
+			containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
33
+			proxyType = 2;
34
+			remoteGlobalIDString = 134814201AA4EA6300B7C361;
35
+			remoteInfo = RCTActionSheet;
36
+		};
37
+		00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
38
+			isa = PBXContainerItemProxy;
39
+			containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
40
+			proxyType = 2;
41
+			remoteGlobalIDString = 134814201AA4EA6300B7C361;
42
+			remoteInfo = RCTGeolocation;
43
+		};
44
+		00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
45
+			isa = PBXContainerItemProxy;
46
+			containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
47
+			proxyType = 2;
48
+			remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
49
+			remoteInfo = RCTImage;
50
+		};
51
+		00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
52
+			isa = PBXContainerItemProxy;
53
+			containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
54
+			proxyType = 2;
55
+			remoteGlobalIDString = 58B511DB1A9E6C8500147676;
56
+			remoteInfo = RCTNetwork;
57
+		};
58
+		00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
59
+			isa = PBXContainerItemProxy;
60
+			containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
61
+			proxyType = 2;
62
+			remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
63
+			remoteInfo = RCTVibration;
64
+		};
65
+		00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
66
+			isa = PBXContainerItemProxy;
67
+			containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
68
+			proxyType = 1;
69
+			remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
70
+			remoteInfo = Example;
71
+		};
72
+		139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
73
+			isa = PBXContainerItemProxy;
74
+			containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
75
+			proxyType = 2;
76
+			remoteGlobalIDString = 134814201AA4EA6300B7C361;
77
+			remoteInfo = RCTSettings;
78
+		};
79
+		139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
80
+			isa = PBXContainerItemProxy;
81
+			containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
82
+			proxyType = 2;
83
+			remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
84
+			remoteInfo = RCTWebSocket;
85
+		};
86
+		146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
87
+			isa = PBXContainerItemProxy;
88
+			containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
89
+			proxyType = 2;
90
+			remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
91
+			remoteInfo = React;
92
+		};
93
+		78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
94
+			isa = PBXContainerItemProxy;
95
+			containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
96
+			proxyType = 2;
97
+			remoteGlobalIDString = 134814201AA4EA6300B7C361;
98
+			remoteInfo = RCTLinking;
99
+		};
100
+		832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
101
+			isa = PBXContainerItemProxy;
102
+			containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
103
+			proxyType = 2;
104
+			remoteGlobalIDString = 58B5119B1A9E6C1200147676;
105
+			remoteInfo = RCTText;
106
+		};
107
+		9D1B45CC1D49EE8400459C66 /* PBXContainerItemProxy */ = {
108
+			isa = PBXContainerItemProxy;
109
+			containerPortal = 783F116470084EEB95DCA092 /* ReactNativePermissions.xcodeproj */;
110
+			proxyType = 2;
111
+			remoteGlobalIDString = 9D23B34F1C767B80008B4819;
112
+			remoteInfo = ReactNativePermissions;
113
+		};
114
+/* End PBXContainerItemProxy section */
115
+
116
+/* Begin PBXFileReference section */
117
+		008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
118
+		00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = "<group>"; };
119
+		00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = "<group>"; };
120
+		00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = "<group>"; };
121
+		00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; };
122
+		00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; };
123
+		00E356EE1AD99517003FC87E /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
124
+		00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
125
+		00E356F21AD99517003FC87E /* ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleTests.m; sourceTree = "<group>"; };
126
+		139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
127
+		139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
128
+		13B07F961A680F5B00A75B9A /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
129
+		13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Example/AppDelegate.h; sourceTree = "<group>"; };
130
+		13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Example/AppDelegate.m; sourceTree = "<group>"; };
131
+		13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
132
+		13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Example/Images.xcassets; sourceTree = "<group>"; };
133
+		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = "<group>"; };
134
+		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = "<group>"; };
135
+		146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
136
+		783F116470084EEB95DCA092 /* ReactNativePermissions.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = ReactNativePermissions.xcodeproj; path = "../node_modules/react-native-permissions/ReactNativePermissions.xcodeproj"; sourceTree = "<group>"; };
137
+		78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
138
+		832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
139
+		D9820CCF930F4ED1BE137DA6 /* libReactNativePermissions.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libReactNativePermissions.a; sourceTree = "<group>"; };
140
+/* End PBXFileReference section */
141
+
142
+/* Begin PBXFrameworksBuildPhase section */
143
+		00E356EB1AD99517003FC87E /* Frameworks */ = {
144
+			isa = PBXFrameworksBuildPhase;
145
+			buildActionMask = 2147483647;
146
+			files = (
147
+				140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
148
+			);
149
+			runOnlyForDeploymentPostprocessing = 0;
150
+		};
151
+		13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
152
+			isa = PBXFrameworksBuildPhase;
153
+			buildActionMask = 2147483647;
154
+			files = (
155
+				146834051AC3E58100842450 /* libReact.a in Frameworks */,
156
+				00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
157
+				00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
158
+				00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
159
+				133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
160
+				00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
161
+				139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
162
+				832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
163
+				00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
164
+				139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
165
+				50F9604CB69B4BA6A44EA44F /* libReactNativePermissions.a in Frameworks */,
166
+			);
167
+			runOnlyForDeploymentPostprocessing = 0;
168
+		};
169
+/* End PBXFrameworksBuildPhase section */
170
+
171
+/* Begin PBXGroup section */
172
+		00C302A81ABCB8CE00DB3ED1 /* Products */ = {
173
+			isa = PBXGroup;
174
+			children = (
175
+				00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
176
+			);
177
+			name = Products;
178
+			sourceTree = "<group>";
179
+		};
180
+		00C302B61ABCB90400DB3ED1 /* Products */ = {
181
+			isa = PBXGroup;
182
+			children = (
183
+				00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
184
+			);
185
+			name = Products;
186
+			sourceTree = "<group>";
187
+		};
188
+		00C302BC1ABCB91800DB3ED1 /* Products */ = {
189
+			isa = PBXGroup;
190
+			children = (
191
+				00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
192
+			);
193
+			name = Products;
194
+			sourceTree = "<group>";
195
+		};
196
+		00C302D41ABCB9D200DB3ED1 /* Products */ = {
197
+			isa = PBXGroup;
198
+			children = (
199
+				00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
200
+			);
201
+			name = Products;
202
+			sourceTree = "<group>";
203
+		};
204
+		00C302E01ABCB9EE00DB3ED1 /* Products */ = {
205
+			isa = PBXGroup;
206
+			children = (
207
+				00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
208
+			);
209
+			name = Products;
210
+			sourceTree = "<group>";
211
+		};
212
+		00E356EF1AD99517003FC87E /* ExampleTests */ = {
213
+			isa = PBXGroup;
214
+			children = (
215
+				00E356F21AD99517003FC87E /* ExampleTests.m */,
216
+				00E356F01AD99517003FC87E /* Supporting Files */,
217
+			);
218
+			path = ExampleTests;
219
+			sourceTree = "<group>";
220
+		};
221
+		00E356F01AD99517003FC87E /* Supporting Files */ = {
222
+			isa = PBXGroup;
223
+			children = (
224
+				00E356F11AD99517003FC87E /* Info.plist */,
225
+			);
226
+			name = "Supporting Files";
227
+			sourceTree = "<group>";
228
+		};
229
+		139105B71AF99BAD00B5F7CC /* Products */ = {
230
+			isa = PBXGroup;
231
+			children = (
232
+				139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
233
+			);
234
+			name = Products;
235
+			sourceTree = "<group>";
236
+		};
237
+		139FDEE71B06529A00C62182 /* Products */ = {
238
+			isa = PBXGroup;
239
+			children = (
240
+				139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
241
+			);
242
+			name = Products;
243
+			sourceTree = "<group>";
244
+		};
245
+		13B07FAE1A68108700A75B9A /* Example */ = {
246
+			isa = PBXGroup;
247
+			children = (
248
+				008F07F21AC5B25A0029DE68 /* main.jsbundle */,
249
+				13B07FAF1A68108700A75B9A /* AppDelegate.h */,
250
+				13B07FB01A68108700A75B9A /* AppDelegate.m */,
251
+				13B07FB51A68108700A75B9A /* Images.xcassets */,
252
+				13B07FB61A68108700A75B9A /* Info.plist */,
253
+				13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
254
+				13B07FB71A68108700A75B9A /* main.m */,
255
+			);
256
+			name = Example;
257
+			sourceTree = "<group>";
258
+		};
259
+		146834001AC3E56700842450 /* Products */ = {
260
+			isa = PBXGroup;
261
+			children = (
262
+				146834041AC3E56700842450 /* libReact.a */,
263
+			);
264
+			name = Products;
265
+			sourceTree = "<group>";
266
+		};
267
+		78C398B11ACF4ADC00677621 /* Products */ = {
268
+			isa = PBXGroup;
269
+			children = (
270
+				78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
271
+			);
272
+			name = Products;
273
+			sourceTree = "<group>";
274
+		};
275
+		832341AE1AAA6A7D00B99B32 /* Libraries */ = {
276
+			isa = PBXGroup;
277
+			children = (
278
+				146833FF1AC3E56700842450 /* React.xcodeproj */,
279
+				00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
280
+				00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
281
+				00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
282
+				78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
283
+				00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
284
+				139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
285
+				832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
286
+				00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
287
+				139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
288
+				783F116470084EEB95DCA092 /* ReactNativePermissions.xcodeproj */,
289
+			);
290
+			name = Libraries;
291
+			sourceTree = "<group>";
292
+		};
293
+		832341B11AAA6A8300B99B32 /* Products */ = {
294
+			isa = PBXGroup;
295
+			children = (
296
+				832341B51AAA6A8300B99B32 /* libRCTText.a */,
297
+			);
298
+			name = Products;
299
+			sourceTree = "<group>";
300
+		};
301
+		83CBB9F61A601CBA00E9B192 = {
302
+			isa = PBXGroup;
303
+			children = (
304
+				13B07FAE1A68108700A75B9A /* Example */,
305
+				832341AE1AAA6A7D00B99B32 /* Libraries */,
306
+				00E356EF1AD99517003FC87E /* ExampleTests */,
307
+				83CBBA001A601CBA00E9B192 /* Products */,
308
+			);
309
+			indentWidth = 2;
310
+			sourceTree = "<group>";
311
+			tabWidth = 2;
312
+		};
313
+		83CBBA001A601CBA00E9B192 /* Products */ = {
314
+			isa = PBXGroup;
315
+			children = (
316
+				13B07F961A680F5B00A75B9A /* Example.app */,
317
+				00E356EE1AD99517003FC87E /* ExampleTests.xctest */,
318
+			);
319
+			name = Products;
320
+			sourceTree = "<group>";
321
+		};
322
+		9D1B45BF1D49EE8300459C66 /* Products */ = {
323
+			isa = PBXGroup;
324
+			children = (
325
+				9D1B45CD1D49EE8400459C66 /* libReactNativePermissions.a */,
326
+			);
327
+			name = Products;
328
+			sourceTree = "<group>";
329
+		};
330
+/* End PBXGroup section */
331
+
332
+/* Begin PBXNativeTarget section */
333
+		00E356ED1AD99517003FC87E /* ExampleTests */ = {
334
+			isa = PBXNativeTarget;
335
+			buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleTests" */;
336
+			buildPhases = (
337
+				00E356EA1AD99517003FC87E /* Sources */,
338
+				00E356EB1AD99517003FC87E /* Frameworks */,
339
+				00E356EC1AD99517003FC87E /* Resources */,
340
+			);
341
+			buildRules = (
342
+			);
343
+			dependencies = (
344
+				00E356F51AD99517003FC87E /* PBXTargetDependency */,
345
+			);
346
+			name = ExampleTests;
347
+			productName = ExampleTests;
348
+			productReference = 00E356EE1AD99517003FC87E /* ExampleTests.xctest */;
349
+			productType = "com.apple.product-type.bundle.unit-test";
350
+		};
351
+		13B07F861A680F5B00A75B9A /* Example */ = {
352
+			isa = PBXNativeTarget;
353
+			buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */;
354
+			buildPhases = (
355
+				13B07F871A680F5B00A75B9A /* Sources */,
356
+				13B07F8C1A680F5B00A75B9A /* Frameworks */,
357
+				13B07F8E1A680F5B00A75B9A /* Resources */,
358
+				00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
359
+			);
360
+			buildRules = (
361
+			);
362
+			dependencies = (
363
+			);
364
+			name = Example;
365
+			productName = "Hello World";
366
+			productReference = 13B07F961A680F5B00A75B9A /* Example.app */;
367
+			productType = "com.apple.product-type.application";
368
+		};
369
+/* End PBXNativeTarget section */
370
+
371
+/* Begin PBXProject section */
372
+		83CBB9F71A601CBA00E9B192 /* Project object */ = {
373
+			isa = PBXProject;
374
+			attributes = {
375
+				LastUpgradeCheck = 610;
376
+				ORGANIZATIONNAME = Facebook;
377
+				TargetAttributes = {
378
+					00E356ED1AD99517003FC87E = {
379
+						CreatedOnToolsVersion = 6.2;
380
+						TestTargetID = 13B07F861A680F5B00A75B9A;
381
+					};
382
+					13B07F861A680F5B00A75B9A = {
383
+						SystemCapabilities = {
384
+							com.apple.BackgroundModes = {
385
+								enabled = 1;
386
+							};
387
+						};
388
+					};
389
+				};
390
+			};
391
+			buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */;
392
+			compatibilityVersion = "Xcode 3.2";
393
+			developmentRegion = English;
394
+			hasScannedForEncodings = 0;
395
+			knownRegions = (
396
+				en,
397
+				Base,
398
+			);
399
+			mainGroup = 83CBB9F61A601CBA00E9B192;
400
+			productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
401
+			projectDirPath = "";
402
+			projectReferences = (
403
+				{
404
+					ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
405
+					ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
406
+				},
407
+				{
408
+					ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
409
+					ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
410
+				},
411
+				{
412
+					ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
413
+					ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
414
+				},
415
+				{
416
+					ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
417
+					ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
418
+				},
419
+				{
420
+					ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
421
+					ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
422
+				},
423
+				{
424
+					ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
425
+					ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
426
+				},
427
+				{
428
+					ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
429
+					ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
430
+				},
431
+				{
432
+					ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
433
+					ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
434
+				},
435
+				{
436
+					ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
437
+					ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
438
+				},
439
+				{
440
+					ProductGroup = 146834001AC3E56700842450 /* Products */;
441
+					ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
442
+				},
443
+				{
444
+					ProductGroup = 9D1B45BF1D49EE8300459C66 /* Products */;
445
+					ProjectRef = 783F116470084EEB95DCA092 /* ReactNativePermissions.xcodeproj */;
446
+				},
447
+			);
448
+			projectRoot = "";
449
+			targets = (
450
+				13B07F861A680F5B00A75B9A /* Example */,
451
+				00E356ED1AD99517003FC87E /* ExampleTests */,
452
+			);
453
+		};
454
+/* End PBXProject section */
455
+
456
+/* Begin PBXReferenceProxy section */
457
+		00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
458
+			isa = PBXReferenceProxy;
459
+			fileType = archive.ar;
460
+			path = libRCTActionSheet.a;
461
+			remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
462
+			sourceTree = BUILT_PRODUCTS_DIR;
463
+		};
464
+		00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
465
+			isa = PBXReferenceProxy;
466
+			fileType = archive.ar;
467
+			path = libRCTGeolocation.a;
468
+			remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
469
+			sourceTree = BUILT_PRODUCTS_DIR;
470
+		};
471
+		00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
472
+			isa = PBXReferenceProxy;
473
+			fileType = archive.ar;
474
+			path = libRCTImage.a;
475
+			remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
476
+			sourceTree = BUILT_PRODUCTS_DIR;
477
+		};
478
+		00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
479
+			isa = PBXReferenceProxy;
480
+			fileType = archive.ar;
481
+			path = libRCTNetwork.a;
482
+			remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
483
+			sourceTree = BUILT_PRODUCTS_DIR;
484
+		};
485
+		00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
486
+			isa = PBXReferenceProxy;
487
+			fileType = archive.ar;
488
+			path = libRCTVibration.a;
489
+			remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
490
+			sourceTree = BUILT_PRODUCTS_DIR;
491
+		};
492
+		139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
493
+			isa = PBXReferenceProxy;
494
+			fileType = archive.ar;
495
+			path = libRCTSettings.a;
496
+			remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
497
+			sourceTree = BUILT_PRODUCTS_DIR;
498
+		};
499
+		139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
500
+			isa = PBXReferenceProxy;
501
+			fileType = archive.ar;
502
+			path = libRCTWebSocket.a;
503
+			remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
504
+			sourceTree = BUILT_PRODUCTS_DIR;
505
+		};
506
+		146834041AC3E56700842450 /* libReact.a */ = {
507
+			isa = PBXReferenceProxy;
508
+			fileType = archive.ar;
509
+			path = libReact.a;
510
+			remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
511
+			sourceTree = BUILT_PRODUCTS_DIR;
512
+		};
513
+		78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
514
+			isa = PBXReferenceProxy;
515
+			fileType = archive.ar;
516
+			path = libRCTLinking.a;
517
+			remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
518
+			sourceTree = BUILT_PRODUCTS_DIR;
519
+		};
520
+		832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
521
+			isa = PBXReferenceProxy;
522
+			fileType = archive.ar;
523
+			path = libRCTText.a;
524
+			remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
525
+			sourceTree = BUILT_PRODUCTS_DIR;
526
+		};
527
+		9D1B45CD1D49EE8400459C66 /* libReactNativePermissions.a */ = {
528
+			isa = PBXReferenceProxy;
529
+			fileType = archive.ar;
530
+			path = libReactNativePermissions.a;
531
+			remoteRef = 9D1B45CC1D49EE8400459C66 /* PBXContainerItemProxy */;
532
+			sourceTree = BUILT_PRODUCTS_DIR;
533
+		};
534
+/* End PBXReferenceProxy section */
535
+
536
+/* Begin PBXResourcesBuildPhase section */
537
+		00E356EC1AD99517003FC87E /* Resources */ = {
538
+			isa = PBXResourcesBuildPhase;
539
+			buildActionMask = 2147483647;
540
+			files = (
541
+			);
542
+			runOnlyForDeploymentPostprocessing = 0;
543
+		};
544
+		13B07F8E1A680F5B00A75B9A /* Resources */ = {
545
+			isa = PBXResourcesBuildPhase;
546
+			buildActionMask = 2147483647;
547
+			files = (
548
+				13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
549
+				13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
550
+			);
551
+			runOnlyForDeploymentPostprocessing = 0;
552
+		};
553
+/* End PBXResourcesBuildPhase section */
554
+
555
+/* Begin PBXShellScriptBuildPhase section */
556
+		00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
557
+			isa = PBXShellScriptBuildPhase;
558
+			buildActionMask = 2147483647;
559
+			files = (
560
+			);
561
+			inputPaths = (
562
+			);
563
+			name = "Bundle React Native code and images";
564
+			outputPaths = (
565
+			);
566
+			runOnlyForDeploymentPostprocessing = 0;
567
+			shellPath = /bin/sh;
568
+			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
569
+		};
570
+/* End PBXShellScriptBuildPhase section */
571
+
572
+/* Begin PBXSourcesBuildPhase section */
573
+		00E356EA1AD99517003FC87E /* Sources */ = {
574
+			isa = PBXSourcesBuildPhase;
575
+			buildActionMask = 2147483647;
576
+			files = (
577
+				00E356F31AD99517003FC87E /* ExampleTests.m in Sources */,
578
+			);
579
+			runOnlyForDeploymentPostprocessing = 0;
580
+		};
581
+		13B07F871A680F5B00A75B9A /* Sources */ = {
582
+			isa = PBXSourcesBuildPhase;
583
+			buildActionMask = 2147483647;
584
+			files = (
585
+				13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
586
+				13B07FC11A68108700A75B9A /* main.m in Sources */,
587
+			);
588
+			runOnlyForDeploymentPostprocessing = 0;
589
+		};
590
+/* End PBXSourcesBuildPhase section */
591
+
592
+/* Begin PBXTargetDependency section */
593
+		00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
594
+			isa = PBXTargetDependency;
595
+			target = 13B07F861A680F5B00A75B9A /* Example */;
596
+			targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
597
+		};
598
+/* End PBXTargetDependency section */
599
+
600
+/* Begin PBXVariantGroup section */
601
+		13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
602
+			isa = PBXVariantGroup;
603
+			children = (
604
+				13B07FB21A68108700A75B9A /* Base */,
605
+			);
606
+			name = LaunchScreen.xib;
607
+			path = Example;
608
+			sourceTree = "<group>";
609
+		};
610
+/* End PBXVariantGroup section */
611
+
612
+/* Begin XCBuildConfiguration section */
613
+		00E356F61AD99517003FC87E /* Debug */ = {
614
+			isa = XCBuildConfiguration;
615
+			buildSettings = {
616
+				BUNDLE_LOADER = "$(TEST_HOST)";
617
+				GCC_PREPROCESSOR_DEFINITIONS = (
618
+					"DEBUG=1",
619
+					"$(inherited)",
620
+				);
621
+				INFOPLIST_FILE = ExampleTests/Info.plist;
622
+				IPHONEOS_DEPLOYMENT_TARGET = 8.2;
623
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
624
+				LIBRARY_SEARCH_PATHS = (
625
+					"$(inherited)",
626
+					"\"$(SRCROOT)/$(TARGET_NAME)\"",
627
+				);
628
+				PRODUCT_NAME = "$(TARGET_NAME)";
629
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
630
+			};
631
+			name = Debug;
632
+		};
633
+		00E356F71AD99517003FC87E /* Release */ = {
634
+			isa = XCBuildConfiguration;
635
+			buildSettings = {
636
+				BUNDLE_LOADER = "$(TEST_HOST)";
637
+				COPY_PHASE_STRIP = NO;
638
+				INFOPLIST_FILE = ExampleTests/Info.plist;
639
+				IPHONEOS_DEPLOYMENT_TARGET = 8.2;
640
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
641
+				LIBRARY_SEARCH_PATHS = (
642
+					"$(inherited)",
643
+					"\"$(SRCROOT)/$(TARGET_NAME)\"",
644
+				);
645
+				PRODUCT_NAME = "$(TARGET_NAME)";
646
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
647
+			};
648
+			name = Release;
649
+		};
650
+		13B07F941A680F5B00A75B9A /* Debug */ = {
651
+			isa = XCBuildConfiguration;
652
+			buildSettings = {
653
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
654
+				DEAD_CODE_STRIPPING = NO;
655
+				HEADER_SEARCH_PATHS = (
656
+					"$(inherited)",
657
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
658
+					"$(SRCROOT)/../node_modules/react-native/React/**",
659
+					"$(SRCROOT)/../node_modules/react-native-permissions/**",
660
+				);
661
+				INFOPLIST_FILE = Example/Info.plist;
662
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
663
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
664
+				OTHER_LDFLAGS = (
665
+					"$(inherited)",
666
+					"-ObjC",
667
+					"-lc++",
668
+				);
669
+				PRODUCT_NAME = Example;
670
+			};
671
+			name = Debug;
672
+		};
673
+		13B07F951A680F5B00A75B9A /* Release */ = {
674
+			isa = XCBuildConfiguration;
675
+			buildSettings = {
676
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
677
+				HEADER_SEARCH_PATHS = (
678
+					"$(inherited)",
679
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
680
+					"$(SRCROOT)/../node_modules/react-native/React/**",
681
+					"$(SRCROOT)/../node_modules/react-native-permissions/**",
682
+				);
683
+				INFOPLIST_FILE = Example/Info.plist;
684
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
685
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
686
+				OTHER_LDFLAGS = (
687
+					"$(inherited)",
688
+					"-ObjC",
689
+					"-lc++",
690
+				);
691
+				PRODUCT_NAME = Example;
692
+			};
693
+			name = Release;
694
+		};
695
+		83CBBA201A601CBA00E9B192 /* Debug */ = {
696
+			isa = XCBuildConfiguration;
697
+			buildSettings = {
698
+				ALWAYS_SEARCH_USER_PATHS = NO;
699
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
700
+				CLANG_CXX_LIBRARY = "libc++";
701
+				CLANG_ENABLE_MODULES = YES;
702
+				CLANG_ENABLE_OBJC_ARC = YES;
703
+				CLANG_WARN_BOOL_CONVERSION = YES;
704
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
705
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
706
+				CLANG_WARN_EMPTY_BODY = YES;
707
+				CLANG_WARN_ENUM_CONVERSION = YES;
708
+				CLANG_WARN_INT_CONVERSION = YES;
709
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
710
+				CLANG_WARN_UNREACHABLE_CODE = YES;
711
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
712
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
713
+				COPY_PHASE_STRIP = NO;
714
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
715
+				GCC_C_LANGUAGE_STANDARD = gnu99;
716
+				GCC_DYNAMIC_NO_PIC = NO;
717
+				GCC_OPTIMIZATION_LEVEL = 0;
718
+				GCC_PREPROCESSOR_DEFINITIONS = (
719
+					"DEBUG=1",
720
+					"$(inherited)",
721
+				);
722
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
723
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
724
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
725
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
726
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
727
+				GCC_WARN_UNUSED_FUNCTION = YES;
728
+				GCC_WARN_UNUSED_VARIABLE = YES;
729
+				HEADER_SEARCH_PATHS = (
730
+					"$(inherited)",
731
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
732
+					"$(SRCROOT)/../node_modules/react-native/React/**",
733
+					"$(SRCROOT)/../node_modules/react-native-permissions/**",
734
+				);
735
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
736
+				MTL_ENABLE_DEBUG_INFO = YES;
737
+				ONLY_ACTIVE_ARCH = YES;
738
+				SDKROOT = iphoneos;
739
+			};
740
+			name = Debug;
741
+		};
742
+		83CBBA211A601CBA00E9B192 /* Release */ = {
743
+			isa = XCBuildConfiguration;
744
+			buildSettings = {
745
+				ALWAYS_SEARCH_USER_PATHS = NO;
746
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
747
+				CLANG_CXX_LIBRARY = "libc++";
748
+				CLANG_ENABLE_MODULES = YES;
749
+				CLANG_ENABLE_OBJC_ARC = YES;
750
+				CLANG_WARN_BOOL_CONVERSION = YES;
751
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
752
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
753
+				CLANG_WARN_EMPTY_BODY = YES;
754
+				CLANG_WARN_ENUM_CONVERSION = YES;
755
+				CLANG_WARN_INT_CONVERSION = YES;
756
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
757
+				CLANG_WARN_UNREACHABLE_CODE = YES;
758
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
759
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
760
+				COPY_PHASE_STRIP = YES;
761
+				ENABLE_NS_ASSERTIONS = NO;
762
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
763
+				GCC_C_LANGUAGE_STANDARD = gnu99;
764
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
765
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
766
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
767
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
768
+				GCC_WARN_UNUSED_FUNCTION = YES;
769
+				GCC_WARN_UNUSED_VARIABLE = YES;
770
+				HEADER_SEARCH_PATHS = (
771
+					"$(inherited)",
772
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
773
+					"$(SRCROOT)/../node_modules/react-native/React/**",
774
+					"$(SRCROOT)/../node_modules/react-native-permissions/**",
775
+				);
776
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
777
+				MTL_ENABLE_DEBUG_INFO = NO;
778
+				SDKROOT = iphoneos;
779
+				VALIDATE_PRODUCT = YES;
780
+			};
781
+			name = Release;
782
+		};
783
+/* End XCBuildConfiguration section */
784
+
785
+/* Begin XCConfigurationList section */
786
+		00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleTests" */ = {
787
+			isa = XCConfigurationList;
788
+			buildConfigurations = (
789
+				00E356F61AD99517003FC87E /* Debug */,
790
+				00E356F71AD99517003FC87E /* Release */,
791
+			);
792
+			defaultConfigurationIsVisible = 0;
793
+			defaultConfigurationName = Release;
794
+		};
795
+		13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */ = {
796
+			isa = XCConfigurationList;
797
+			buildConfigurations = (
798
+				13B07F941A680F5B00A75B9A /* Debug */,
799
+				13B07F951A680F5B00A75B9A /* Release */,
800
+			);
801
+			defaultConfigurationIsVisible = 0;
802
+			defaultConfigurationName = Release;
803
+		};
804
+		83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */ = {
805
+			isa = XCConfigurationList;
806
+			buildConfigurations = (
807
+				83CBBA201A601CBA00E9B192 /* Debug */,
808
+				83CBBA211A601CBA00E9B192 /* Release */,
809
+			);
810
+			defaultConfigurationIsVisible = 0;
811
+			defaultConfigurationName = Release;
812
+		};
813
+/* End XCConfigurationList section */
814
+	};
815
+	rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
816
+}

+ 112
- 0
Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme 查看文件

@@ -0,0 +1,112 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Scheme
3
+   LastUpgradeVersion = "0620"
4
+   version = "1.3">
5
+   <BuildAction
6
+      parallelizeBuildables = "YES"
7
+      buildImplicitDependencies = "YES">
8
+      <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
18
+               BuildableName = "Example.app"
19
+               BlueprintName = "Example"
20
+               ReferencedContainer = "container:Example.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
23
+         <BuildActionEntry
24
+            buildForTesting = "YES"
25
+            buildForRunning = "YES"
26
+            buildForProfiling = "NO"
27
+            buildForArchiving = "NO"
28
+            buildForAnalyzing = "YES">
29
+            <BuildableReference
30
+               BuildableIdentifier = "primary"
31
+               BlueprintIdentifier = "00E356ED1AD99517003FC87E"
32
+               BuildableName = "ExampleTests.xctest"
33
+               BlueprintName = "ExampleTests"
34
+               ReferencedContainer = "container:Example.xcodeproj">
35
+            </BuildableReference>
36
+         </BuildActionEntry>
37
+      </BuildActionEntries>
38
+   </BuildAction>
39
+   <TestAction
40
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
41
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
42
+      shouldUseLaunchSchemeArgsEnv = "YES"
43
+      buildConfiguration = "Debug">
44
+      <Testables>
45
+         <TestableReference
46
+            skipped = "NO">
47
+            <BuildableReference
48
+               BuildableIdentifier = "primary"
49
+               BlueprintIdentifier = "00E356ED1AD99517003FC87E"
50
+               BuildableName = "ExampleTests.xctest"
51
+               BlueprintName = "ExampleTests"
52
+               ReferencedContainer = "container:Example.xcodeproj">
53
+            </BuildableReference>
54
+         </TestableReference>
55
+      </Testables>
56
+      <MacroExpansion>
57
+         <BuildableReference
58
+            BuildableIdentifier = "primary"
59
+            BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
60
+            BuildableName = "Example.app"
61
+            BlueprintName = "Example"
62
+            ReferencedContainer = "container:Example.xcodeproj">
63
+         </BuildableReference>
64
+      </MacroExpansion>
65
+   </TestAction>
66
+   <LaunchAction
67
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
68
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
69
+      launchStyle = "0"
70
+      useCustomWorkingDirectory = "NO"
71
+      buildConfiguration = "Debug"
72
+      ignoresPersistentStateOnLaunch = "NO"
73
+      debugDocumentVersioning = "YES"
74
+      allowLocationSimulation = "YES">
75
+      <BuildableProductRunnable
76
+         runnableDebuggingMode = "0">
77
+         <BuildableReference
78
+            BuildableIdentifier = "primary"
79
+            BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
80
+            BuildableName = "Example.app"
81
+            BlueprintName = "Example"
82
+            ReferencedContainer = "container:Example.xcodeproj">
83
+         </BuildableReference>
84
+      </BuildableProductRunnable>
85
+      <AdditionalOptions>
86
+      </AdditionalOptions>
87
+   </LaunchAction>
88
+   <ProfileAction
89
+      shouldUseLaunchSchemeArgsEnv = "YES"
90
+      savedToolIdentifier = ""
91
+      useCustomWorkingDirectory = "NO"
92
+      buildConfiguration = "Release"
93
+      debugDocumentVersioning = "YES">
94
+      <BuildableProductRunnable
95
+         runnableDebuggingMode = "0">
96
+         <BuildableReference
97
+            BuildableIdentifier = "primary"
98
+            BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
99
+            BuildableName = "Example.app"
100
+            BlueprintName = "Example"
101
+            ReferencedContainer = "container:Example.xcodeproj">
102
+         </BuildableReference>
103
+      </BuildableProductRunnable>
104
+   </ProfileAction>
105
+   <AnalyzeAction
106
+      buildConfiguration = "Debug">
107
+   </AnalyzeAction>
108
+   <ArchiveAction
109
+      buildConfiguration = "Release"
110
+      revealArchiveInOrganizer = "YES">
111
+   </ArchiveAction>
112
+</Scheme>

+ 16
- 0
Example/ios/Example/AppDelegate.h 查看文件

@@ -0,0 +1,16 @@
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 <UIKit/UIKit.h>
11
+
12
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
13
+
14
+@property (nonatomic, strong) UIWindow *window;
15
+
16
+@end

+ 37
- 0
Example/ios/Example/AppDelegate.m 查看文件

@@ -0,0 +1,37 @@
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 "RCTBundleURLProvider.h"
13
+#import "RCTRootView.h"
14
+
15
+@implementation AppDelegate
16
+
17
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18
+{
19
+  NSURL *jsCodeLocation;
20
+
21
+  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" 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

+ 42
- 0
Example/ios/Example/Base.lproj/LaunchScreen.xib 查看文件

@@ -0,0 +1,42 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
3
+    <dependencies>
4
+        <deployment identifier="iOS"/>
5
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
6
+        <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
7
+    </dependencies>
8
+    <objects>
9
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
10
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
11
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
12
+            <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
13
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
14
+            <subviews>
15
+                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
16
+                    <rect key="frame" x="20" y="439" width="441" height="21"/>
17
+                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
18
+                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
19
+                    <nil key="highlightedColor"/>
20
+                </label>
21
+                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Example" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
22
+                    <rect key="frame" x="20" y="140" width="441" height="43"/>
23
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
24
+                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
25
+                    <nil key="highlightedColor"/>
26
+                </label>
27
+            </subviews>
28
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
29
+            <constraints>
30
+                <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
31
+                <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
32
+                <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
33
+                <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
34
+                <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
35
+                <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
36
+            </constraints>
37
+            <nil key="simulatedStatusBarMetrics"/>
38
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
39
+            <point key="canvasLocation" x="548" y="455"/>
40
+        </view>
41
+    </objects>
42
+</document>

+ 38
- 0
Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json 查看文件

@@ -0,0 +1,38 @@
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
+}

+ 59
- 0
Example/ios/Example/Info.plist 查看文件

@@ -0,0 +1,59 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CFBundleDevelopmentRegion</key>
6
+	<string>en</string>
7
+	<key>CFBundleExecutable</key>
8
+	<string>$(EXECUTABLE_NAME)</string>
9
+	<key>CFBundleIdentifier</key>
10
+	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11
+	<key>CFBundleInfoDictionaryVersion</key>
12
+	<string>6.0</string>
13
+	<key>CFBundleName</key>
14
+	<string>$(PRODUCT_NAME)</string>
15
+	<key>CFBundlePackageType</key>
16
+	<string>APPL</string>
17
+	<key>CFBundleShortVersionString</key>
18
+	<string>1.0</string>
19
+	<key>CFBundleSignature</key>
20
+	<string>????</string>
21
+	<key>CFBundleVersion</key>
22
+	<string>1</string>
23
+	<key>LSRequiresIPhoneOS</key>
24
+	<true/>
25
+	<key>NSAppTransportSecurity</key>
26
+	<dict>
27
+		<key>NSExceptionDomains</key>
28
+		<dict>
29
+			<key>localhost</key>
30
+			<dict>
31
+				<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
32
+				<true/>
33
+			</dict>
34
+		</dict>
35
+	</dict>
36
+	<key>NSLocationWhenInUseUsageDescription</key>
37
+	<string>We need your location</string>
38
+	<key>UIBackgroundModes</key>
39
+	<array>
40
+		<string>bluetooth-peripheral</string>
41
+		<string>fetch</string>
42
+		<string>location</string>
43
+	</array>
44
+	<key>UILaunchStoryboardName</key>
45
+	<string>LaunchScreen</string>
46
+	<key>UIRequiredDeviceCapabilities</key>
47
+	<array>
48
+		<string>armv7</string>
49
+	</array>
50
+	<key>UISupportedInterfaceOrientations</key>
51
+	<array>
52
+		<string>UIInterfaceOrientationPortrait</string>
53
+		<string>UIInterfaceOrientationLandscapeLeft</string>
54
+		<string>UIInterfaceOrientationLandscapeRight</string>
55
+	</array>
56
+	<key>UIViewControllerBasedStatusBarAppearance</key>
57
+	<false/>
58
+</dict>
59
+</plist>

+ 18
- 0
Example/ios/Example/main.m 查看文件

@@ -0,0 +1,18 @@
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 <UIKit/UIKit.h>
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
+}

+ 70
- 0
Example/ios/ExampleTests/ExampleTests.m 查看文件

@@ -0,0 +1,70 @@
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 <UIKit/UIKit.h>
11
+#import <XCTest/XCTest.h>
12
+
13
+#import "RCTLog.h"
14
+#import "RCTRootView.h"
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 = [[[[UIApplication sharedApplication] 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

+ 24
- 0
Example/ios/ExampleTests/Info.plist 查看文件

@@ -0,0 +1,24 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>CFBundleDevelopmentRegion</key>
6
+	<string>en</string>
7
+	<key>CFBundleExecutable</key>
8
+	<string>$(EXECUTABLE_NAME)</string>
9
+	<key>CFBundleIdentifier</key>
10
+	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11
+	<key>CFBundleInfoDictionaryVersion</key>
12
+	<string>6.0</string>
13
+	<key>CFBundleName</key>
14
+	<string>$(PRODUCT_NAME)</string>
15
+	<key>CFBundlePackageType</key>
16
+	<string>BNDL</string>
17
+	<key>CFBundleShortVersionString</key>
18
+	<string>1.0</string>
19
+	<key>CFBundleSignature</key>
20
+	<string>????</string>
21
+	<key>CFBundleVersion</key>
22
+	<string>1</string>
23
+</dict>
24
+</plist>

+ 13
- 0
Example/package.json 查看文件

@@ -0,0 +1,13 @@
1
+{
2
+  "name": "Example",
3
+  "version": "0.0.1",
4
+  "private": true,
5
+  "scripts": {
6
+    "start": "react-native start"
7
+  },
8
+  "dependencies": {
9
+    "react": "15.2.1",
10
+    "react-native": "^0.30.0",
11
+    "react-native-permissions": "../"
12
+  }
13
+}