Kaynağa Gözat

Add JS module + example

Mathieu Acthernoene 5 yıl önce
ebeveyn
işleme
ea8aa1a83c
55 değiştirilmiş dosya ile 8973 ekleme ve 3 silme
  1. 6
    0
      example/.buckconfig
  2. 1
    0
      example/.gitattributes
  3. 59
    0
      example/.gitignore
  4. 1
    0
      example/.watchmanconfig
  5. 35
    0
      example/App.js
  6. 55
    0
      example/android/app/BUCK
  7. 148
    0
      example/android/app/build.gradle
  8. 19
    0
      example/android/app/build_defs.bzl
  9. 17
    0
      example/android/app/proguard-rules.pro
  10. 29
    0
      example/android/app/src/main/AndroidManifest.xml
  11. 15
    0
      example/android/app/src/main/java/com/rnpermissionsexample/MainActivity.java
  12. 47
    0
      example/android/app/src/main/java/com/rnpermissionsexample/MainApplication.java
  13. BIN
      example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  14. BIN
      example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  15. BIN
      example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  16. BIN
      example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  17. BIN
      example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  18. BIN
      example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  19. BIN
      example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  20. BIN
      example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  21. BIN
      example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  22. BIN
      example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  23. 3
    0
      example/android/app/src/main/res/values/strings.xml
  24. 8
    0
      example/android/app/src/main/res/values/styles.xml
  25. 39
    0
      example/android/build.gradle
  26. 18
    0
      example/android/gradle.properties
  27. BIN
      example/android/gradle/wrapper/gradle-wrapper.jar
  28. 6
    0
      example/android/gradle/wrapper/gradle-wrapper.properties
  29. 172
    0
      example/android/gradlew
  30. 84
    0
      example/android/gradlew.bat
  31. 8
    0
      example/android/keystores/BUCK
  32. 4
    0
      example/android/keystores/debug.keystore.properties
  33. 6
    0
      example/android/settings.gradle
  34. 4
    0
      example/app.json
  35. 3
    0
      example/babel.config.js
  36. 10
    0
      example/index.js
  37. 51
    0
      example/ios/Podfile
  38. 102
    0
      example/ios/Podfile.lock
  39. 54
    0
      example/ios/RNPermissionsExample-tvOS/Info.plist
  40. 585
    0
      example/ios/RNPermissionsExample.xcodeproj/project.pbxproj
  41. 129
    0
      example/ios/RNPermissionsExample.xcodeproj/xcshareddata/xcschemes/RNPermissionsExample-tvOS.xcscheme
  42. 105
    0
      example/ios/RNPermissionsExample.xcodeproj/xcshareddata/xcschemes/RNPermissionsExample.xcscheme
  43. 10
    0
      example/ios/RNPermissionsExample.xcworkspace/contents.xcworkspacedata
  44. 8
    0
      example/ios/RNPermissionsExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  45. 14
    0
      example/ios/RNPermissionsExample/AppDelegate.h
  46. 35
    0
      example/ios/RNPermissionsExample/AppDelegate.m
  47. 42
    0
      example/ios/RNPermissionsExample/Base.lproj/LaunchScreen.xib
  48. 38
    0
      example/ios/RNPermissionsExample/Images.xcassets/AppIcon.appiconset/Contents.json
  49. 6
    0
      example/ios/RNPermissionsExample/Images.xcassets/Contents.json
  50. 61
    0
      example/ios/RNPermissionsExample/Info.plist
  51. 16
    0
      example/ios/RNPermissionsExample/main.m
  52. 19
    0
      example/package.json
  53. 6692
    0
      example/yarn.lock
  54. 208
    2
      index.js
  55. 1
    1
      ios/RNPermissionsManager.m

+ 6
- 0
example/.buckconfig Dosyayı Görüntüle

@@ -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

+ 1
- 0
example/.gitattributes Dosyayı Görüntüle

@@ -0,0 +1 @@
1
+*.pbxproj -text

+ 59
- 0
example/.gitignore Dosyayı Görüntüle

@@ -0,0 +1,59 @@
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
+
55
+# Bundle artifact
56
+*.jsbundle
57
+
58
+# CocoaPods
59
+ios/Pods/

+ 1
- 0
example/.watchmanconfig Dosyayı Görüntüle

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

+ 35
- 0
example/App.js Dosyayı Görüntüle

@@ -0,0 +1,35 @@
1
+/**
2
+ * @format
3
+ * @flow
4
+ * @lint-ignore-every XPLATJSCOPYRIGHT1
5
+ */
6
+
7
+import React, { Component } from "react";
8
+import { StyleSheet, Text, View } from "react-native";
9
+// import * as RNPermissions from "react-native-languages";
10
+
11
+type Props = {};
12
+
13
+export default class App extends Component<Props> {
14
+  render() {
15
+    return (
16
+      <View style={styles.container}>
17
+        <Text style={styles.welcome}>Example</Text>
18
+      </View>
19
+    );
20
+  }
21
+}
22
+
23
+const styles = StyleSheet.create({
24
+  container: {
25
+    flex: 1,
26
+    justifyContent: "center",
27
+    alignItems: "center",
28
+    backgroundColor: "#F5FCFF",
29
+  },
30
+  welcome: {
31
+    fontSize: 20,
32
+    textAlign: "center",
33
+    margin: 10,
34
+  },
35
+});

+ 55
- 0
example/android/app/BUCK Dosyayı Görüntüle

@@ -0,0 +1,55 @@
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
+load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12
+
13
+lib_deps = []
14
+
15
+create_aar_targets(glob(["libs/*.aar"]))
16
+
17
+create_jar_targets(glob(["libs/*.jar"]))
18
+
19
+android_library(
20
+    name = "all-libs",
21
+    exported_deps = lib_deps,
22
+)
23
+
24
+android_library(
25
+    name = "app-code",
26
+    srcs = glob([
27
+        "src/main/java/**/*.java",
28
+    ]),
29
+    deps = [
30
+        ":all-libs",
31
+        ":build_config",
32
+        ":res",
33
+    ],
34
+)
35
+
36
+android_build_config(
37
+    name = "build_config",
38
+    package = "com.rnpermissionsexample",
39
+)
40
+
41
+android_resource(
42
+    name = "res",
43
+    package = "com.rnpermissionsexample",
44
+    res = "src/main/res",
45
+)
46
+
47
+android_binary(
48
+    name = "app",
49
+    keystore = "//android/keystores:debug",
50
+    manifest = "src/main/AndroidManifest.xml",
51
+    package_type = "debug",
52
+    deps = [
53
+        ":app-code",
54
+    ],
55
+)

+ 148
- 0
example/android/app/build.gradle Dosyayı Görüntüle

@@ -0,0 +1,148 @@
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 rootProject.ext.compileSdkVersion
98
+    buildToolsVersion rootProject.ext.buildToolsVersion
99
+
100
+    defaultConfig {
101
+        applicationId "com.rnpermissionsexample"
102
+        minSdkVersion rootProject.ext.minSdkVersion
103
+        targetSdkVersion rootProject.ext.targetSdkVersion
104
+        versionCode 1
105
+        versionName "1.0"
106
+    }
107
+    splits {
108
+        abi {
109
+            reset()
110
+            enable enableSeparateBuildPerCPUArchitecture
111
+            universalApk false  // If true, also generate a universal APK
112
+            include "armeabi-v7a", "x86", "arm64-v8a"
113
+        }
114
+    }
115
+    buildTypes {
116
+        release {
117
+            minifyEnabled enableProguardInReleaseBuilds
118
+            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
119
+        }
120
+    }
121
+    // applicationVariants are e.g. debug, release
122
+    applicationVariants.all { variant ->
123
+        variant.outputs.each { output ->
124
+            // For each separate APK per architecture, set a unique version code as described here:
125
+            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
126
+            def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
127
+            def abi = output.getFilter(OutputFile.ABI)
128
+            if (abi != null) {  // null for the universal-debug, universal-release variants
129
+                output.versionCodeOverride =
130
+                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
131
+            }
132
+        }
133
+    }
134
+}
135
+
136
+dependencies {
137
+    implementation project(':react-native-permissions')
138
+    implementation fileTree(dir: "libs", include: ["*.jar"])
139
+    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
140
+    implementation "com.facebook.react:react-native:+"  // From node_modules
141
+}
142
+
143
+// Run this once to be able to run the application with BUCK
144
+// puts all compile dependencies into folder libs for BUCK to use
145
+task copyDownloadableDepsToLibs(type: Copy) {
146
+    from configurations.compile
147
+    into 'libs'
148
+}

+ 19
- 0
example/android/app/build_defs.bzl Dosyayı Görüntüle

@@ -0,0 +1,19 @@
1
+"""Helper definitions to glob .aar and .jar targets"""
2
+
3
+def create_aar_targets(aarfiles):
4
+    for aarfile in aarfiles:
5
+        name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6
+        lib_deps.append(":" + name)
7
+        android_prebuilt_aar(
8
+            name = name,
9
+            aar = aarfile,
10
+        )
11
+
12
+def create_jar_targets(jarfiles):
13
+    for jarfile in jarfiles:
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
+        )

+ 17
- 0
example/android/app/proguard-rules.pro Dosyayı Görüntüle

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

+ 29
- 0
example/android/app/src/main/AndroidManifest.xml Dosyayı Görüntüle

@@ -0,0 +1,29 @@
1
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+    package="com.rnpermissionsexample">
3
+
4
+    <uses-permission android:name="android.permission.INTERNET" />
5
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
6
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
7
+    <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
8
+
9
+    <application
10
+      android:name=".MainApplication"
11
+      android:label="@string/app_name"
12
+      android:icon="@mipmap/ic_launcher"
13
+      android:roundIcon="@mipmap/ic_launcher_round"
14
+      android:allowBackup="false"
15
+      android:theme="@style/AppTheme">
16
+      <activity
17
+        android:name=".MainActivity"
18
+        android:label="@string/app_name"
19
+        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
20
+        android:windowSoftInputMode="adjustResize">
21
+        <intent-filter>
22
+            <action android:name="android.intent.action.MAIN" />
23
+            <category android:name="android.intent.category.LAUNCHER" />
24
+        </intent-filter>
25
+      </activity>
26
+      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
27
+    </application>
28
+
29
+</manifest>

+ 15
- 0
example/android/app/src/main/java/com/rnpermissionsexample/MainActivity.java Dosyayı Görüntüle

@@ -0,0 +1,15 @@
1
+package com.rnpermissionsexample;
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 "RNPermissionsExample";
14
+    }
15
+}

+ 47
- 0
example/android/app/src/main/java/com/rnpermissionsexample/MainApplication.java Dosyayı Görüntüle

@@ -0,0 +1,47 @@
1
+package com.rnpermissionsexample;
2
+
3
+import android.app.Application;
4
+
5
+import com.facebook.react.ReactApplication;
6
+import com.yonahforst.rnpermissions.RNPermissionsPackage;
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<ReactPackage> getPackages() {
25
+      return Arrays.<ReactPackage>asList(
26
+          new MainReactPackage(),
27
+          new RNPermissionsPackage()
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
+}

BIN
example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png Dosyayı Görüntüle


BIN
example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png Dosyayı Görüntüle


BIN
example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png Dosyayı Görüntüle


BIN
example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png Dosyayı Görüntüle


BIN
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png Dosyayı Görüntüle


BIN
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png Dosyayı Görüntüle


BIN
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Dosyayı Görüntüle


BIN
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png Dosyayı Görüntüle


BIN
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Dosyayı Görüntüle


BIN
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png Dosyayı Görüntüle


+ 3
- 0
example/android/app/src/main/res/values/strings.xml Dosyayı Görüntüle

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

+ 8
- 0
example/android/app/src/main/res/values/styles.xml Dosyayı Görüntüle

@@ -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>

+ 39
- 0
example/android/build.gradle Dosyayı Görüntüle

@@ -0,0 +1,39 @@
1
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
2
+
3
+buildscript {
4
+    ext {
5
+        buildToolsVersion = "28.0.2"
6
+        minSdkVersion = 16
7
+        compileSdkVersion = 28
8
+        targetSdkVersion = 27
9
+        supportLibVersion = "28.0.0"
10
+    }
11
+    repositories {
12
+        google()
13
+        jcenter()
14
+    }
15
+    dependencies {
16
+        classpath 'com.android.tools.build:gradle:3.3.0'
17
+
18
+        // NOTE: Do not place your application dependencies here; they belong
19
+        // in the individual module build.gradle files
20
+    }
21
+}
22
+
23
+allprojects {
24
+    repositories {
25
+        mavenLocal()
26
+        google()
27
+        jcenter()
28
+        maven {
29
+            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30
+            url "$rootDir/../node_modules/react-native/android"
31
+        }
32
+    }
33
+}
34
+
35
+
36
+task wrapper(type: Wrapper) {
37
+    gradleVersion = '4.7'
38
+    distributionUrl = distributionUrl.replace("bin", "all")
39
+}

+ 18
- 0
example/android/gradle.properties Dosyayı Görüntüle

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

BIN
example/android/gradle/wrapper/gradle-wrapper.jar Dosyayı Görüntüle


+ 6
- 0
example/android/gradle/wrapper/gradle-wrapper.properties Dosyayı Görüntüle

@@ -0,0 +1,6 @@
1
+#Wed Jan 30 14:02:26 CET 2019
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-4.10.1-all.zip

+ 172
- 0
example/android/gradlew Dosyayı Görüntüle

@@ -0,0 +1,172 @@
1
+#!/usr/bin/env sh
2
+
3
+##############################################################################
4
+##
5
+##  Gradle start up script for UN*X
6
+##
7
+##############################################################################
8
+
9
+# Attempt to set APP_HOME
10
+# Resolve links: $0 may be a link
11
+PRG="$0"
12
+# Need this for relative symlinks.
13
+while [ -h "$PRG" ] ; do
14
+    ls=`ls -ld "$PRG"`
15
+    link=`expr "$ls" : '.*-> \(.*\)$'`
16
+    if expr "$link" : '/.*' > /dev/null; then
17
+        PRG="$link"
18
+    else
19
+        PRG=`dirname "$PRG"`"/$link"
20
+    fi
21
+done
22
+SAVED="`pwd`"
23
+cd "`dirname \"$PRG\"`/" >/dev/null
24
+APP_HOME="`pwd -P`"
25
+cd "$SAVED" >/dev/null
26
+
27
+APP_NAME="Gradle"
28
+APP_BASE_NAME=`basename "$0"`
29
+
30
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31
+DEFAULT_JVM_OPTS=""
32
+
33
+# Use the maximum available, or set MAX_FD != -1 to use that value.
34
+MAX_FD="maximum"
35
+
36
+warn () {
37
+    echo "$*"
38
+}
39
+
40
+die () {
41
+    echo
42
+    echo "$*"
43
+    echo
44
+    exit 1
45
+}
46
+
47
+# OS specific support (must be 'true' or 'false').
48
+cygwin=false
49
+msys=false
50
+darwin=false
51
+nonstop=false
52
+case "`uname`" in
53
+  CYGWIN* )
54
+    cygwin=true
55
+    ;;
56
+  Darwin* )
57
+    darwin=true
58
+    ;;
59
+  MINGW* )
60
+    msys=true
61
+    ;;
62
+  NONSTOP* )
63
+    nonstop=true
64
+    ;;
65
+esac
66
+
67
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68
+
69
+# Determine the Java command to use to start the JVM.
70
+if [ -n "$JAVA_HOME" ] ; then
71
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72
+        # IBM's JDK on AIX uses strange locations for the executables
73
+        JAVACMD="$JAVA_HOME/jre/sh/java"
74
+    else
75
+        JAVACMD="$JAVA_HOME/bin/java"
76
+    fi
77
+    if [ ! -x "$JAVACMD" ] ; then
78
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79
+
80
+Please set the JAVA_HOME variable in your environment to match the
81
+location of your Java installation."
82
+    fi
83
+else
84
+    JAVACMD="java"
85
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86
+
87
+Please set the JAVA_HOME variable in your environment to match the
88
+location of your Java installation."
89
+fi
90
+
91
+# Increase the maximum file descriptors if we can.
92
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93
+    MAX_FD_LIMIT=`ulimit -H -n`
94
+    if [ $? -eq 0 ] ; then
95
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96
+            MAX_FD="$MAX_FD_LIMIT"
97
+        fi
98
+        ulimit -n $MAX_FD
99
+        if [ $? -ne 0 ] ; then
100
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
101
+        fi
102
+    else
103
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104
+    fi
105
+fi
106
+
107
+# For Darwin, add options to specify how the application appears in the dock
108
+if $darwin; then
109
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110
+fi
111
+
112
+# For Cygwin, switch paths to Windows format before running java
113
+if $cygwin ; then
114
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116
+    JAVACMD=`cygpath --unix "$JAVACMD"`
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
+# Escape application args
158
+save () {
159
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160
+    echo " "
161
+}
162
+APP_ARGS=$(save "$@")
163
+
164
+# Collect all arguments for the java command, following the shell quoting and substitution rules
165
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166
+
167
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169
+  cd "$(dirname "$0")"
170
+fi
171
+
172
+exec "$JAVACMD" "$@"

+ 84
- 0
example/android/gradlew.bat Dosyayı Görüntüle

@@ -0,0 +1,84 @@
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
+set DIRNAME=%~dp0
12
+if "%DIRNAME%" == "" set DIRNAME=.
13
+set APP_BASE_NAME=%~n0
14
+set APP_HOME=%DIRNAME%
15
+
16
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17
+set DEFAULT_JVM_OPTS=
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 Windows variants
50
+
51
+if not "%OS%" == "Windows_NT" goto win9xME_args
52
+
53
+:win9xME_args
54
+@rem Slurp the command line arguments.
55
+set CMD_LINE_ARGS=
56
+set _SKIP=2
57
+
58
+:win9xME_args_slurp
59
+if "x%~1" == "x" goto execute
60
+
61
+set CMD_LINE_ARGS=%*
62
+
63
+:execute
64
+@rem Setup the command line
65
+
66
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67
+
68
+@rem Execute Gradle
69
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70
+
71
+:end
72
+@rem End local scope for the variables with windows NT shell
73
+if "%ERRORLEVEL%"=="0" goto mainEnd
74
+
75
+:fail
76
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77
+rem the _cmd.exe /c_ return code!
78
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79
+exit /b 1
80
+
81
+:mainEnd
82
+if "%OS%"=="Windows_NT" endlocal
83
+
84
+:omega

+ 8
- 0
example/android/keystores/BUCK Dosyayı Görüntüle

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

+ 4
- 0
example/android/keystores/debug.keystore.properties Dosyayı Görüntüle

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

+ 6
- 0
example/android/settings.gradle Dosyayı Görüntüle

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

+ 4
- 0
example/app.json Dosyayı Görüntüle

@@ -0,0 +1,4 @@
1
+{
2
+  "name": "RNPermissionsExample",
3
+  "displayName": "RNPermissionsExample"
4
+}

+ 3
- 0
example/babel.config.js Dosyayı Görüntüle

@@ -0,0 +1,3 @@
1
+module.exports = {
2
+  presets: ["module:metro-react-native-babel-preset"],
3
+};

+ 10
- 0
example/index.js Dosyayı Görüntüle

@@ -0,0 +1,10 @@
1
+/**
2
+ * @format
3
+ * @lint-ignore-every XPLATJSCOPYRIGHT1
4
+ */
5
+
6
+import { AppRegistry } from "react-native";
7
+import App from "./App";
8
+import { name as appName } from "./app.json";
9
+
10
+AppRegistry.registerComponent(appName, () => App);

+ 51
- 0
example/ios/Podfile Dosyayı Görüntüle

@@ -0,0 +1,51 @@
1
+platform :ios, '9.0'
2
+
3
+target 'RNPermissionsExample' do
4
+  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
5
+  # use_frameworks!
6
+
7
+  pod 'React', :path => '../node_modules/react-native', :subspecs => [
8
+    'Core',
9
+    'CxxBridge', # Include this for RN >= 0.47
10
+    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
11
+    'RCTText',
12
+    'RCTNetwork',
13
+    'RCTWebSocket', # Needed for debugging
14
+    'RCTAnimation', # Needed for FlatList and animations running on native UI thread
15
+  ]
16
+
17
+  # Explicitly include Yoga if you are using RN >= 0.42.0
18
+  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
19
+
20
+  # Third party deps podspec link
21
+  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
22
+  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
23
+  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
24
+
25
+  # Import RNPermissions from the parent folder
26
+  pod 'RNPermissions', :path => '../../ios', :subspecs => [
27
+    'Core',
28
+    # Uncomment wanted permissions
29
+    # 'BluetoothPeripheral',
30
+    'Calendars',
31
+    'Camera',
32
+    'Contacts',
33
+    # 'FaceID',
34
+    # 'LocationAlways',
35
+    # 'LocationWhenInUse',
36
+    # 'MediaLibrary',
37
+    # 'Microphone',
38
+    # 'Motion',
39
+    # 'Notifications',
40
+    # 'PhotoLibrary',
41
+    # 'Reminders',
42
+    # 'Siri',
43
+    # 'SpeechRecognition',
44
+    # 'StoreKit',
45
+  ]
46
+end
47
+
48
+target 'RNPermissionsExample-tvOS' do
49
+  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
50
+  # use_frameworks!
51
+end

+ 102
- 0
example/ios/Podfile.lock Dosyayı Görüntüle

@@ -0,0 +1,102 @@
1
+PODS:
2
+  - boost-for-react-native (1.63.0)
3
+  - DoubleConversion (1.1.6)
4
+  - Folly (2018.10.22.00):
5
+    - boost-for-react-native
6
+    - DoubleConversion
7
+    - glog
8
+  - glog (0.3.5)
9
+  - React/Core (0.58.3):
10
+    - yoga (= 0.58.3.React)
11
+  - React/CxxBridge (0.58.3):
12
+    - Folly (= 2018.10.22.00)
13
+    - React/Core
14
+    - React/cxxreact
15
+    - React/jsiexecutor
16
+  - React/cxxreact (0.58.3):
17
+    - boost-for-react-native (= 1.63.0)
18
+    - Folly (= 2018.10.22.00)
19
+    - React/jsinspector
20
+  - React/DevSupport (0.58.3):
21
+    - React/Core
22
+    - React/RCTWebSocket
23
+  - React/fishhook (0.58.3)
24
+  - React/jsi (0.58.3):
25
+    - Folly (= 2018.10.22.00)
26
+  - React/jsiexecutor (0.58.3):
27
+    - Folly (= 2018.10.22.00)
28
+    - React/cxxreact
29
+    - React/jsi
30
+  - React/jsinspector (0.58.3)
31
+  - React/RCTAnimation (0.58.3):
32
+    - React/Core
33
+  - React/RCTBlob (0.58.3):
34
+    - React/Core
35
+  - React/RCTNetwork (0.58.3):
36
+    - React/Core
37
+  - React/RCTText (0.58.3):
38
+    - React/Core
39
+  - React/RCTWebSocket (0.58.3):
40
+    - React/Core
41
+    - React/fishhook
42
+    - React/RCTBlob
43
+  - RNPermissions/Calendars (2.0.0-alpha.1):
44
+    - React/Core
45
+    - RNPermissions/Core
46
+  - RNPermissions/Camera (2.0.0-alpha.1):
47
+    - React/Core
48
+    - RNPermissions/Core
49
+  - RNPermissions/Contacts (2.0.0-alpha.1):
50
+    - React/Core
51
+    - RNPermissions/Core
52
+  - RNPermissions/Core (2.0.0-alpha.1):
53
+    - React/Core
54
+  - yoga (0.58.3.React)
55
+
56
+DEPENDENCIES:
57
+  - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
58
+  - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
59
+  - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
60
+  - React/Core (from `../node_modules/react-native`)
61
+  - React/CxxBridge (from `../node_modules/react-native`)
62
+  - React/DevSupport (from `../node_modules/react-native`)
63
+  - React/RCTAnimation (from `../node_modules/react-native`)
64
+  - React/RCTNetwork (from `../node_modules/react-native`)
65
+  - React/RCTText (from `../node_modules/react-native`)
66
+  - React/RCTWebSocket (from `../node_modules/react-native`)
67
+  - RNPermissions/Calendars (from `../../ios`)
68
+  - RNPermissions/Camera (from `../../ios`)
69
+  - RNPermissions/Contacts (from `../../ios`)
70
+  - RNPermissions/Core (from `../../ios`)
71
+  - yoga (from `../node_modules/react-native/ReactCommon/yoga`)
72
+
73
+SPEC REPOS:
74
+  https://github.com/cocoapods/specs.git:
75
+    - boost-for-react-native
76
+
77
+EXTERNAL SOURCES:
78
+  DoubleConversion:
79
+    :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
80
+  Folly:
81
+    :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
82
+  glog:
83
+    :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
84
+  React:
85
+    :path: "../node_modules/react-native"
86
+  RNPermissions:
87
+    :path: "../../ios"
88
+  yoga:
89
+    :path: "../node_modules/react-native/ReactCommon/yoga"
90
+
91
+SPEC CHECKSUMS:
92
+  boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
93
+  DoubleConversion: bb338842f62ab1d708ceb63ec3d999f0f3d98ecd
94
+  Folly: de497beb10f102453a1afa9edbf8cf8a251890de
95
+  glog: aefd1eb5dda2ab95ba0938556f34b98e2da3a60d
96
+  React: 9b873b38b92ed8012d7cdf3b965477095ed364c4
97
+  RNPermissions: 321a373f579ab57a6d04bbd2bdb43665217b34ba
98
+  yoga: 0885622311729a02c2bc02dca97167787a51488b
99
+
100
+PODFILE CHECKSUM: 869da5c10a441881f63c79119e902c84e4c58131
101
+
102
+COCOAPODS: 1.5.3

+ 54
- 0
example/ios/RNPermissionsExample-tvOS/Info.plist Dosyayı Görüntüle

@@ -0,0 +1,54 @@
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>UILaunchStoryboardName</key>
26
+	<string>LaunchScreen</string>
27
+	<key>UIRequiredDeviceCapabilities</key>
28
+	<array>
29
+		<string>armv7</string>
30
+	</array>
31
+	<key>UISupportedInterfaceOrientations</key>
32
+	<array>
33
+		<string>UIInterfaceOrientationPortrait</string>
34
+		<string>UIInterfaceOrientationLandscapeLeft</string>
35
+		<string>UIInterfaceOrientationLandscapeRight</string>
36
+	</array>
37
+	<key>UIViewControllerBasedStatusBarAppearance</key>
38
+	<false/>
39
+	<key>NSLocationWhenInUseUsageDescription</key>
40
+	<string></string>
41
+	<key>NSAppTransportSecurity</key>
42
+	<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
43
+	<dict>
44
+		<key>NSExceptionDomains</key>
45
+		<dict>
46
+			<key>localhost</key>
47
+			<dict>
48
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
49
+				<true/>
50
+			</dict>
51
+		</dict>
52
+	</dict>
53
+</dict>
54
+</plist>

+ 585
- 0
example/ios/RNPermissionsExample.xcodeproj/project.pbxproj Dosyayı Görüntüle

@@ -0,0 +1,585 @@
1
+// !$*UTF8*$!
2
+{
3
+	archiveVersion = 1;
4
+	classes = {
5
+	};
6
+	objectVersion = 46;
7
+	objects = {
8
+
9
+/* Begin PBXBuildFile section */
10
+		13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
11
+		13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
12
+		13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13
+		13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
14
+		2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
15
+		2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
16
+		2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
17
+		2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
18
+		344B09050D8F9DD98200F820 /* libPods-RNPermissionsExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EE508594924E415A0050663 /* libPods-RNPermissionsExample.a */; };
19
+		AEF309CE7A77174466B93B05 /* libPods-RNPermissionsExample-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 675F5D41159578CF07B761C5 /* libPods-RNPermissionsExample-tvOS.a */; };
20
+		ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
21
+		ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2971642150620600B7C4FE /* JavaScriptCore.framework */; };
22
+/* End PBXBuildFile section */
23
+
24
+/* Begin PBXFileReference section */
25
+		008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
26
+		112A13EA7418A1DA3FFFE89E /* Pods-RNPermissionsExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPermissionsExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNPermissionsExample/Pods-RNPermissionsExample.release.xcconfig"; sourceTree = "<group>"; };
27
+		13B07F961A680F5B00A75B9A /* RNPermissionsExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RNPermissionsExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
28
+		13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = RNPermissionsExample/AppDelegate.h; sourceTree = "<group>"; };
29
+		13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = RNPermissionsExample/AppDelegate.m; sourceTree = "<group>"; };
30
+		13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
31
+		13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RNPermissionsExample/Images.xcassets; sourceTree = "<group>"; };
32
+		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNPermissionsExample/Info.plist; sourceTree = "<group>"; };
33
+		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RNPermissionsExample/main.m; sourceTree = "<group>"; };
34
+		2D02E47B1E0B4A5D006451C7 /* RNPermissionsExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "RNPermissionsExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
35
+		2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
36
+		5EE508594924E415A0050663 /* libPods-RNPermissionsExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNPermissionsExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
37
+		675F5D41159578CF07B761C5 /* libPods-RNPermissionsExample-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNPermissionsExample-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
38
+		A3695C8635FFAF0C2C558D58 /* Pods-RNPermissionsExample-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPermissionsExample-tvOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNPermissionsExample-tvOS/Pods-RNPermissionsExample-tvOS.debug.xcconfig"; sourceTree = "<group>"; };
39
+		B4C1975DC33A53090D5B8018 /* Pods-RNPermissionsExample-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPermissionsExample-tvOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNPermissionsExample-tvOS/Pods-RNPermissionsExample-tvOS.release.xcconfig"; sourceTree = "<group>"; };
40
+		ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
41
+		ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
42
+		EFC2B4024563B97F765C7CAF /* Pods-RNPermissionsExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPermissionsExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNPermissionsExample/Pods-RNPermissionsExample.debug.xcconfig"; sourceTree = "<group>"; };
43
+/* End PBXFileReference section */
44
+
45
+/* Begin PBXFrameworksBuildPhase section */
46
+		13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
47
+			isa = PBXFrameworksBuildPhase;
48
+			buildActionMask = 2147483647;
49
+			files = (
50
+				ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */,
51
+				344B09050D8F9DD98200F820 /* libPods-RNPermissionsExample.a in Frameworks */,
52
+			);
53
+			runOnlyForDeploymentPostprocessing = 0;
54
+		};
55
+		2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
56
+			isa = PBXFrameworksBuildPhase;
57
+			buildActionMask = 2147483647;
58
+			files = (
59
+				ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */,
60
+				2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */,
61
+				AEF309CE7A77174466B93B05 /* libPods-RNPermissionsExample-tvOS.a in Frameworks */,
62
+			);
63
+			runOnlyForDeploymentPostprocessing = 0;
64
+		};
65
+/* End PBXFrameworksBuildPhase section */
66
+
67
+/* Begin PBXGroup section */
68
+		01938D2000C2EABCD5318130 /* Pods */ = {
69
+			isa = PBXGroup;
70
+			children = (
71
+				EFC2B4024563B97F765C7CAF /* Pods-RNPermissionsExample.debug.xcconfig */,
72
+				112A13EA7418A1DA3FFFE89E /* Pods-RNPermissionsExample.release.xcconfig */,
73
+				A3695C8635FFAF0C2C558D58 /* Pods-RNPermissionsExample-tvOS.debug.xcconfig */,
74
+				B4C1975DC33A53090D5B8018 /* Pods-RNPermissionsExample-tvOS.release.xcconfig */,
75
+			);
76
+			name = Pods;
77
+			sourceTree = "<group>";
78
+		};
79
+		13B07FAE1A68108700A75B9A /* RNPermissionsExample */ = {
80
+			isa = PBXGroup;
81
+			children = (
82
+				008F07F21AC5B25A0029DE68 /* main.jsbundle */,
83
+				13B07FAF1A68108700A75B9A /* AppDelegate.h */,
84
+				13B07FB01A68108700A75B9A /* AppDelegate.m */,
85
+				13B07FB51A68108700A75B9A /* Images.xcassets */,
86
+				13B07FB61A68108700A75B9A /* Info.plist */,
87
+				13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
88
+				13B07FB71A68108700A75B9A /* main.m */,
89
+			);
90
+			name = RNPermissionsExample;
91
+			sourceTree = "<group>";
92
+		};
93
+		2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
94
+			isa = PBXGroup;
95
+			children = (
96
+				ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
97
+				ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
98
+				2D16E6891FA4F8E400B85C8A /* libReact.a */,
99
+				5EE508594924E415A0050663 /* libPods-RNPermissionsExample.a */,
100
+				675F5D41159578CF07B761C5 /* libPods-RNPermissionsExample-tvOS.a */,
101
+			);
102
+			name = Frameworks;
103
+			sourceTree = "<group>";
104
+		};
105
+		83CBB9F61A601CBA00E9B192 = {
106
+			isa = PBXGroup;
107
+			children = (
108
+				13B07FAE1A68108700A75B9A /* RNPermissionsExample */,
109
+				83CBBA001A601CBA00E9B192 /* Products */,
110
+				2D16E6871FA4F8E400B85C8A /* Frameworks */,
111
+				01938D2000C2EABCD5318130 /* Pods */,
112
+			);
113
+			indentWidth = 2;
114
+			sourceTree = "<group>";
115
+			tabWidth = 2;
116
+			usesTabs = 0;
117
+		};
118
+		83CBBA001A601CBA00E9B192 /* Products */ = {
119
+			isa = PBXGroup;
120
+			children = (
121
+				13B07F961A680F5B00A75B9A /* RNPermissionsExample.app */,
122
+				2D02E47B1E0B4A5D006451C7 /* RNPermissionsExample-tvOS.app */,
123
+			);
124
+			name = Products;
125
+			sourceTree = "<group>";
126
+		};
127
+/* End PBXGroup section */
128
+
129
+/* Begin PBXNativeTarget section */
130
+		13B07F861A680F5B00A75B9A /* RNPermissionsExample */ = {
131
+			isa = PBXNativeTarget;
132
+			buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNPermissionsExample" */;
133
+			buildPhases = (
134
+				B42AA7D4FE9C586F3907791A /* [CP] Check Pods Manifest.lock */,
135
+				13B07F871A680F5B00A75B9A /* Sources */,
136
+				13B07F8C1A680F5B00A75B9A /* Frameworks */,
137
+				13B07F8E1A680F5B00A75B9A /* Resources */,
138
+				00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
139
+			);
140
+			buildRules = (
141
+			);
142
+			dependencies = (
143
+			);
144
+			name = RNPermissionsExample;
145
+			productName = "Hello World";
146
+			productReference = 13B07F961A680F5B00A75B9A /* RNPermissionsExample.app */;
147
+			productType = "com.apple.product-type.application";
148
+		};
149
+		2D02E47A1E0B4A5D006451C7 /* RNPermissionsExample-tvOS */ = {
150
+			isa = PBXNativeTarget;
151
+			buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "RNPermissionsExample-tvOS" */;
152
+			buildPhases = (
153
+				08D3B8539F5064A757526BF1 /* [CP] Check Pods Manifest.lock */,
154
+				2D02E4771E0B4A5D006451C7 /* Sources */,
155
+				2D02E4781E0B4A5D006451C7 /* Frameworks */,
156
+				2D02E4791E0B4A5D006451C7 /* Resources */,
157
+				2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
158
+			);
159
+			buildRules = (
160
+			);
161
+			dependencies = (
162
+			);
163
+			name = "RNPermissionsExample-tvOS";
164
+			productName = "RNPermissionsExample-tvOS";
165
+			productReference = 2D02E47B1E0B4A5D006451C7 /* RNPermissionsExample-tvOS.app */;
166
+			productType = "com.apple.product-type.application";
167
+		};
168
+/* End PBXNativeTarget section */
169
+
170
+/* Begin PBXProject section */
171
+		83CBB9F71A601CBA00E9B192 /* Project object */ = {
172
+			isa = PBXProject;
173
+			attributes = {
174
+				LastUpgradeCheck = 940;
175
+				ORGANIZATIONNAME = Facebook;
176
+				TargetAttributes = {
177
+					13B07F861A680F5B00A75B9A = {
178
+						DevelopmentTeam = 745449BDR9;
179
+					};
180
+					2D02E47A1E0B4A5D006451C7 = {
181
+						CreatedOnToolsVersion = 8.2.1;
182
+						ProvisioningStyle = Automatic;
183
+					};
184
+				};
185
+			};
186
+			buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNPermissionsExample" */;
187
+			compatibilityVersion = "Xcode 3.2";
188
+			developmentRegion = English;
189
+			hasScannedForEncodings = 0;
190
+			knownRegions = (
191
+				en,
192
+				Base,
193
+			);
194
+			mainGroup = 83CBB9F61A601CBA00E9B192;
195
+			productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
196
+			projectDirPath = "";
197
+			projectRoot = "";
198
+			targets = (
199
+				13B07F861A680F5B00A75B9A /* RNPermissionsExample */,
200
+				2D02E47A1E0B4A5D006451C7 /* RNPermissionsExample-tvOS */,
201
+			);
202
+		};
203
+/* End PBXProject section */
204
+
205
+/* Begin PBXResourcesBuildPhase section */
206
+		13B07F8E1A680F5B00A75B9A /* Resources */ = {
207
+			isa = PBXResourcesBuildPhase;
208
+			buildActionMask = 2147483647;
209
+			files = (
210
+				13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
211
+				13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
212
+			);
213
+			runOnlyForDeploymentPostprocessing = 0;
214
+		};
215
+		2D02E4791E0B4A5D006451C7 /* Resources */ = {
216
+			isa = PBXResourcesBuildPhase;
217
+			buildActionMask = 2147483647;
218
+			files = (
219
+				2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
220
+			);
221
+			runOnlyForDeploymentPostprocessing = 0;
222
+		};
223
+/* End PBXResourcesBuildPhase section */
224
+
225
+/* Begin PBXShellScriptBuildPhase section */
226
+		00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
227
+			isa = PBXShellScriptBuildPhase;
228
+			buildActionMask = 2147483647;
229
+			files = (
230
+			);
231
+			inputPaths = (
232
+			);
233
+			name = "Bundle React Native code and images";
234
+			outputPaths = (
235
+			);
236
+			runOnlyForDeploymentPostprocessing = 0;
237
+			shellPath = /bin/sh;
238
+			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
239
+		};
240
+		08D3B8539F5064A757526BF1 /* [CP] Check Pods Manifest.lock */ = {
241
+			isa = PBXShellScriptBuildPhase;
242
+			buildActionMask = 2147483647;
243
+			files = (
244
+			);
245
+			inputFileListPaths = (
246
+			);
247
+			inputPaths = (
248
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
249
+				"${PODS_ROOT}/Manifest.lock",
250
+			);
251
+			name = "[CP] Check Pods Manifest.lock";
252
+			outputFileListPaths = (
253
+			);
254
+			outputPaths = (
255
+				"$(DERIVED_FILE_DIR)/Pods-RNPermissionsExample-tvOS-checkManifestLockResult.txt",
256
+			);
257
+			runOnlyForDeploymentPostprocessing = 0;
258
+			shellPath = /bin/sh;
259
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
260
+			showEnvVarsInLog = 0;
261
+		};
262
+		2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
263
+			isa = PBXShellScriptBuildPhase;
264
+			buildActionMask = 2147483647;
265
+			files = (
266
+			);
267
+			inputPaths = (
268
+			);
269
+			name = "Bundle React Native Code And Images";
270
+			outputPaths = (
271
+			);
272
+			runOnlyForDeploymentPostprocessing = 0;
273
+			shellPath = /bin/sh;
274
+			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
275
+		};
276
+		B42AA7D4FE9C586F3907791A /* [CP] Check Pods Manifest.lock */ = {
277
+			isa = PBXShellScriptBuildPhase;
278
+			buildActionMask = 2147483647;
279
+			files = (
280
+			);
281
+			inputFileListPaths = (
282
+			);
283
+			inputPaths = (
284
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
285
+				"${PODS_ROOT}/Manifest.lock",
286
+			);
287
+			name = "[CP] Check Pods Manifest.lock";
288
+			outputFileListPaths = (
289
+			);
290
+			outputPaths = (
291
+				"$(DERIVED_FILE_DIR)/Pods-RNPermissionsExample-checkManifestLockResult.txt",
292
+			);
293
+			runOnlyForDeploymentPostprocessing = 0;
294
+			shellPath = /bin/sh;
295
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
296
+			showEnvVarsInLog = 0;
297
+		};
298
+/* End PBXShellScriptBuildPhase section */
299
+
300
+/* Begin PBXSourcesBuildPhase section */
301
+		13B07F871A680F5B00A75B9A /* Sources */ = {
302
+			isa = PBXSourcesBuildPhase;
303
+			buildActionMask = 2147483647;
304
+			files = (
305
+				13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
306
+				13B07FC11A68108700A75B9A /* main.m in Sources */,
307
+			);
308
+			runOnlyForDeploymentPostprocessing = 0;
309
+		};
310
+		2D02E4771E0B4A5D006451C7 /* Sources */ = {
311
+			isa = PBXSourcesBuildPhase;
312
+			buildActionMask = 2147483647;
313
+			files = (
314
+				2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
315
+				2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
316
+			);
317
+			runOnlyForDeploymentPostprocessing = 0;
318
+		};
319
+/* End PBXSourcesBuildPhase section */
320
+
321
+/* Begin PBXVariantGroup section */
322
+		13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
323
+			isa = PBXVariantGroup;
324
+			children = (
325
+				13B07FB21A68108700A75B9A /* Base */,
326
+			);
327
+			name = LaunchScreen.xib;
328
+			path = RNPermissionsExample;
329
+			sourceTree = "<group>";
330
+		};
331
+/* End PBXVariantGroup section */
332
+
333
+/* Begin XCBuildConfiguration section */
334
+		13B07F941A680F5B00A75B9A /* Debug */ = {
335
+			isa = XCBuildConfiguration;
336
+			baseConfigurationReference = EFC2B4024563B97F765C7CAF /* Pods-RNPermissionsExample.debug.xcconfig */;
337
+			buildSettings = {
338
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
339
+				CURRENT_PROJECT_VERSION = 1;
340
+				DEAD_CODE_STRIPPING = NO;
341
+				DEVELOPMENT_TEAM = 745449BDR9;
342
+				HEADER_SEARCH_PATHS = "$(inherited)";
343
+				INFOPLIST_FILE = RNPermissionsExample/Info.plist;
344
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
345
+				LIBRARY_SEARCH_PATHS = (
346
+					"$(inherited)",
347
+					"\"$(SRCROOT)/RNPermissionsExample\"",
348
+					"\"$(SRCROOT)/RNPermissionsExample\"",
349
+				);
350
+				OTHER_LDFLAGS = (
351
+					"$(inherited)",
352
+					"-ObjC",
353
+					"-lc++",
354
+				);
355
+				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
356
+				PRODUCT_NAME = RNPermissionsExample;
357
+				VERSIONING_SYSTEM = "apple-generic";
358
+			};
359
+			name = Debug;
360
+		};
361
+		13B07F951A680F5B00A75B9A /* Release */ = {
362
+			isa = XCBuildConfiguration;
363
+			baseConfigurationReference = 112A13EA7418A1DA3FFFE89E /* Pods-RNPermissionsExample.release.xcconfig */;
364
+			buildSettings = {
365
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
366
+				CURRENT_PROJECT_VERSION = 1;
367
+				DEVELOPMENT_TEAM = 745449BDR9;
368
+				HEADER_SEARCH_PATHS = "$(inherited)";
369
+				INFOPLIST_FILE = RNPermissionsExample/Info.plist;
370
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
371
+				LIBRARY_SEARCH_PATHS = (
372
+					"$(inherited)",
373
+					"\"$(SRCROOT)/RNPermissionsExample\"",
374
+					"\"$(SRCROOT)/RNPermissionsExample\"",
375
+				);
376
+				OTHER_LDFLAGS = (
377
+					"$(inherited)",
378
+					"-ObjC",
379
+					"-lc++",
380
+				);
381
+				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
382
+				PRODUCT_NAME = RNPermissionsExample;
383
+				VERSIONING_SYSTEM = "apple-generic";
384
+			};
385
+			name = Release;
386
+		};
387
+		2D02E4971E0B4A5E006451C7 /* Debug */ = {
388
+			isa = XCBuildConfiguration;
389
+			baseConfigurationReference = A3695C8635FFAF0C2C558D58 /* Pods-RNPermissionsExample-tvOS.debug.xcconfig */;
390
+			buildSettings = {
391
+				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
392
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
393
+				CLANG_ANALYZER_NONNULL = YES;
394
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
395
+				CLANG_WARN_INFINITE_RECURSION = YES;
396
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
397
+				DEBUG_INFORMATION_FORMAT = dwarf;
398
+				ENABLE_TESTABILITY = YES;
399
+				GCC_NO_COMMON_BLOCKS = YES;
400
+				HEADER_SEARCH_PATHS = "$(inherited)";
401
+				INFOPLIST_FILE = "RNPermissionsExample-tvOS/Info.plist";
402
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
403
+				LIBRARY_SEARCH_PATHS = (
404
+					"$(inherited)",
405
+					"\"$(SRCROOT)/$(TARGET_NAME)\"",
406
+					"\"$(SRCROOT)/$(TARGET_NAME)\"",
407
+				);
408
+				OTHER_LDFLAGS = (
409
+					"-ObjC",
410
+					"-lc++",
411
+				);
412
+				PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.RNPermissionsExample-tvOS";
413
+				PRODUCT_NAME = "$(TARGET_NAME)";
414
+				SDKROOT = appletvos;
415
+				TARGETED_DEVICE_FAMILY = 3;
416
+				TVOS_DEPLOYMENT_TARGET = 9.2;
417
+			};
418
+			name = Debug;
419
+		};
420
+		2D02E4981E0B4A5E006451C7 /* Release */ = {
421
+			isa = XCBuildConfiguration;
422
+			baseConfigurationReference = B4C1975DC33A53090D5B8018 /* Pods-RNPermissionsExample-tvOS.release.xcconfig */;
423
+			buildSettings = {
424
+				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
425
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
426
+				CLANG_ANALYZER_NONNULL = YES;
427
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
428
+				CLANG_WARN_INFINITE_RECURSION = YES;
429
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
430
+				COPY_PHASE_STRIP = NO;
431
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
432
+				GCC_NO_COMMON_BLOCKS = YES;
433
+				HEADER_SEARCH_PATHS = "$(inherited)";
434
+				INFOPLIST_FILE = "RNPermissionsExample-tvOS/Info.plist";
435
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
436
+				LIBRARY_SEARCH_PATHS = (
437
+					"$(inherited)",
438
+					"\"$(SRCROOT)/$(TARGET_NAME)\"",
439
+					"\"$(SRCROOT)/$(TARGET_NAME)\"",
440
+				);
441
+				OTHER_LDFLAGS = (
442
+					"-ObjC",
443
+					"-lc++",
444
+				);
445
+				PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.RNPermissionsExample-tvOS";
446
+				PRODUCT_NAME = "$(TARGET_NAME)";
447
+				SDKROOT = appletvos;
448
+				TARGETED_DEVICE_FAMILY = 3;
449
+				TVOS_DEPLOYMENT_TARGET = 9.2;
450
+			};
451
+			name = Release;
452
+		};
453
+		83CBBA201A601CBA00E9B192 /* Debug */ = {
454
+			isa = XCBuildConfiguration;
455
+			buildSettings = {
456
+				ALWAYS_SEARCH_USER_PATHS = NO;
457
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
458
+				CLANG_CXX_LIBRARY = "libc++";
459
+				CLANG_ENABLE_MODULES = YES;
460
+				CLANG_ENABLE_OBJC_ARC = YES;
461
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
462
+				CLANG_WARN_BOOL_CONVERSION = YES;
463
+				CLANG_WARN_COMMA = YES;
464
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
465
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
466
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
467
+				CLANG_WARN_EMPTY_BODY = YES;
468
+				CLANG_WARN_ENUM_CONVERSION = YES;
469
+				CLANG_WARN_INFINITE_RECURSION = YES;
470
+				CLANG_WARN_INT_CONVERSION = YES;
471
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
472
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
473
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
474
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
475
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
476
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
477
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
478
+				CLANG_WARN_UNREACHABLE_CODE = YES;
479
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
480
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
481
+				COPY_PHASE_STRIP = NO;
482
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
483
+				ENABLE_TESTABILITY = YES;
484
+				GCC_C_LANGUAGE_STANDARD = gnu99;
485
+				GCC_DYNAMIC_NO_PIC = NO;
486
+				GCC_NO_COMMON_BLOCKS = YES;
487
+				GCC_OPTIMIZATION_LEVEL = 0;
488
+				GCC_PREPROCESSOR_DEFINITIONS = (
489
+					"DEBUG=1",
490
+					"$(inherited)",
491
+				);
492
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
493
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
494
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
495
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
496
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
497
+				GCC_WARN_UNUSED_FUNCTION = YES;
498
+				GCC_WARN_UNUSED_VARIABLE = YES;
499
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
500
+				MTL_ENABLE_DEBUG_INFO = YES;
501
+				ONLY_ACTIVE_ARCH = YES;
502
+				SDKROOT = iphoneos;
503
+			};
504
+			name = Debug;
505
+		};
506
+		83CBBA211A601CBA00E9B192 /* Release */ = {
507
+			isa = XCBuildConfiguration;
508
+			buildSettings = {
509
+				ALWAYS_SEARCH_USER_PATHS = NO;
510
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
511
+				CLANG_CXX_LIBRARY = "libc++";
512
+				CLANG_ENABLE_MODULES = YES;
513
+				CLANG_ENABLE_OBJC_ARC = YES;
514
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
515
+				CLANG_WARN_BOOL_CONVERSION = YES;
516
+				CLANG_WARN_COMMA = YES;
517
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
518
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
519
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
520
+				CLANG_WARN_EMPTY_BODY = YES;
521
+				CLANG_WARN_ENUM_CONVERSION = YES;
522
+				CLANG_WARN_INFINITE_RECURSION = YES;
523
+				CLANG_WARN_INT_CONVERSION = YES;
524
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
525
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
526
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
527
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
528
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
529
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
530
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
531
+				CLANG_WARN_UNREACHABLE_CODE = YES;
532
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
533
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
534
+				COPY_PHASE_STRIP = YES;
535
+				ENABLE_NS_ASSERTIONS = NO;
536
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
537
+				GCC_C_LANGUAGE_STANDARD = gnu99;
538
+				GCC_NO_COMMON_BLOCKS = YES;
539
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
540
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
541
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
542
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
543
+				GCC_WARN_UNUSED_FUNCTION = YES;
544
+				GCC_WARN_UNUSED_VARIABLE = YES;
545
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
546
+				MTL_ENABLE_DEBUG_INFO = NO;
547
+				SDKROOT = iphoneos;
548
+				VALIDATE_PRODUCT = YES;
549
+			};
550
+			name = Release;
551
+		};
552
+/* End XCBuildConfiguration section */
553
+
554
+/* Begin XCConfigurationList section */
555
+		13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNPermissionsExample" */ = {
556
+			isa = XCConfigurationList;
557
+			buildConfigurations = (
558
+				13B07F941A680F5B00A75B9A /* Debug */,
559
+				13B07F951A680F5B00A75B9A /* Release */,
560
+			);
561
+			defaultConfigurationIsVisible = 0;
562
+			defaultConfigurationName = Release;
563
+		};
564
+		2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "RNPermissionsExample-tvOS" */ = {
565
+			isa = XCConfigurationList;
566
+			buildConfigurations = (
567
+				2D02E4971E0B4A5E006451C7 /* Debug */,
568
+				2D02E4981E0B4A5E006451C7 /* Release */,
569
+			);
570
+			defaultConfigurationIsVisible = 0;
571
+			defaultConfigurationName = Release;
572
+		};
573
+		83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNPermissionsExample" */ = {
574
+			isa = XCConfigurationList;
575
+			buildConfigurations = (
576
+				83CBBA201A601CBA00E9B192 /* Debug */,
577
+				83CBBA211A601CBA00E9B192 /* Release */,
578
+			);
579
+			defaultConfigurationIsVisible = 0;
580
+			defaultConfigurationName = Release;
581
+		};
582
+/* End XCConfigurationList section */
583
+	};
584
+	rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
585
+}

+ 129
- 0
example/ios/RNPermissionsExample.xcodeproj/xcshareddata/xcschemes/RNPermissionsExample-tvOS.xcscheme Dosyayı Görüntüle

@@ -0,0 +1,129 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Scheme
3
+   LastUpgradeVersion = "0940"
4
+   version = "1.3">
5
+   <BuildAction
6
+      parallelizeBuildables = "NO"
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 = "2D2A28121D9B038B00D4039D"
18
+               BuildableName = "libReact.a"
19
+               BlueprintName = "React-tvOS"
20
+               ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
23
+         <BuildActionEntry
24
+            buildForTesting = "YES"
25
+            buildForRunning = "YES"
26
+            buildForProfiling = "YES"
27
+            buildForArchiving = "YES"
28
+            buildForAnalyzing = "YES">
29
+            <BuildableReference
30
+               BuildableIdentifier = "primary"
31
+               BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
32
+               BuildableName = "RNPermissionsExample-tvOS.app"
33
+               BlueprintName = "RNPermissionsExample-tvOS"
34
+               ReferencedContainer = "container:RNPermissionsExample.xcodeproj">
35
+            </BuildableReference>
36
+         </BuildActionEntry>
37
+         <BuildActionEntry
38
+            buildForTesting = "YES"
39
+            buildForRunning = "YES"
40
+            buildForProfiling = "NO"
41
+            buildForArchiving = "NO"
42
+            buildForAnalyzing = "YES">
43
+            <BuildableReference
44
+               BuildableIdentifier = "primary"
45
+               BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
46
+               BuildableName = "RNPermissionsExample-tvOSTests.xctest"
47
+               BlueprintName = "RNPermissionsExample-tvOSTests"
48
+               ReferencedContainer = "container:RNPermissionsExample.xcodeproj">
49
+            </BuildableReference>
50
+         </BuildActionEntry>
51
+      </BuildActionEntries>
52
+   </BuildAction>
53
+   <TestAction
54
+      buildConfiguration = "Debug"
55
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
56
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57
+      shouldUseLaunchSchemeArgsEnv = "YES">
58
+      <Testables>
59
+         <TestableReference
60
+            skipped = "NO">
61
+            <BuildableReference
62
+               BuildableIdentifier = "primary"
63
+               BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
64
+               BuildableName = "RNPermissionsExample-tvOSTests.xctest"
65
+               BlueprintName = "RNPermissionsExample-tvOSTests"
66
+               ReferencedContainer = "container:RNPermissionsExample.xcodeproj">
67
+            </BuildableReference>
68
+         </TestableReference>
69
+      </Testables>
70
+      <MacroExpansion>
71
+         <BuildableReference
72
+            BuildableIdentifier = "primary"
73
+            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
74
+            BuildableName = "RNPermissionsExample-tvOS.app"
75
+            BlueprintName = "RNPermissionsExample-tvOS"
76
+            ReferencedContainer = "container:RNPermissionsExample.xcodeproj">
77
+         </BuildableReference>
78
+      </MacroExpansion>
79
+      <AdditionalOptions>
80
+      </AdditionalOptions>
81
+   </TestAction>
82
+   <LaunchAction
83
+      buildConfiguration = "Debug"
84
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
85
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
86
+      launchStyle = "0"
87
+      useCustomWorkingDirectory = "NO"
88
+      ignoresPersistentStateOnLaunch = "NO"
89
+      debugDocumentVersioning = "YES"
90
+      debugServiceExtension = "internal"
91
+      allowLocationSimulation = "YES">
92
+      <BuildableProductRunnable
93
+         runnableDebuggingMode = "0">
94
+         <BuildableReference
95
+            BuildableIdentifier = "primary"
96
+            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
97
+            BuildableName = "RNPermissionsExample-tvOS.app"
98
+            BlueprintName = "RNPermissionsExample-tvOS"
99
+            ReferencedContainer = "container:RNPermissionsExample.xcodeproj">
100
+         </BuildableReference>
101
+      </BuildableProductRunnable>
102
+      <AdditionalOptions>
103
+      </AdditionalOptions>
104
+   </LaunchAction>
105
+   <ProfileAction
106
+      buildConfiguration = "Release"
107
+      shouldUseLaunchSchemeArgsEnv = "YES"
108
+      savedToolIdentifier = ""
109
+      useCustomWorkingDirectory = "NO"
110
+      debugDocumentVersioning = "YES">
111
+      <BuildableProductRunnable
112
+         runnableDebuggingMode = "0">
113
+         <BuildableReference
114
+            BuildableIdentifier = "primary"
115
+            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
116
+            BuildableName = "RNPermissionsExample-tvOS.app"
117
+            BlueprintName = "RNPermissionsExample-tvOS"
118
+            ReferencedContainer = "container:RNPermissionsExample.xcodeproj">
119
+         </BuildableReference>
120
+      </BuildableProductRunnable>
121
+   </ProfileAction>
122
+   <AnalyzeAction
123
+      buildConfiguration = "Debug">
124
+   </AnalyzeAction>
125
+   <ArchiveAction
126
+      buildConfiguration = "Release"
127
+      revealArchiveInOrganizer = "YES">
128
+   </ArchiveAction>
129
+</Scheme>

+ 105
- 0
example/ios/RNPermissionsExample.xcodeproj/xcshareddata/xcschemes/RNPermissionsExample.xcscheme Dosyayı Görüntüle

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

+ 10
- 0
example/ios/RNPermissionsExample.xcworkspace/contents.xcworkspacedata Dosyayı Görüntüle

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "group:RNPermissionsExample.xcodeproj">
6
+   </FileRef>
7
+   <FileRef
8
+      location = "group:Pods/Pods.xcodeproj">
9
+   </FileRef>
10
+</Workspace>

+ 8
- 0
example/ios/RNPermissionsExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist Dosyayı Görüntüle

@@ -0,0 +1,8 @@
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>IDEDidComputeMac32BitWarning</key>
6
+	<true/>
7
+</dict>
8
+</plist>

+ 14
- 0
example/ios/RNPermissionsExample/AppDelegate.h Dosyayı Görüntüle

@@ -0,0 +1,14 @@
1
+/**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+#import <UIKit/UIKit.h>
9
+
10
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
11
+
12
+@property (nonatomic, strong) UIWindow *window;
13
+
14
+@end

+ 35
- 0
example/ios/RNPermissionsExample/AppDelegate.m Dosyayı Görüntüle

@@ -0,0 +1,35 @@
1
+/**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+#import "AppDelegate.h"
9
+
10
+#import <React/RCTBundleURLProvider.h>
11
+#import <React/RCTRootView.h>
12
+
13
+@implementation AppDelegate
14
+
15
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16
+{
17
+  NSURL *jsCodeLocation;
18
+
19
+  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
20
+
21
+  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
22
+                                                      moduleName:@"RNPermissionsExample"
23
+                                               initialProperties:nil
24
+                                                   launchOptions:launchOptions];
25
+  rootView.backgroundColor = [UIColor blackColor];
26
+
27
+  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
28
+  UIViewController *rootViewController = [UIViewController new];
29
+  rootViewController.view = rootView;
30
+  self.window.rootViewController = rootViewController;
31
+  [self.window makeKeyAndVisible];
32
+  return YES;
33
+}
34
+
35
+@end

+ 42
- 0
example/ios/RNPermissionsExample/Base.lproj/LaunchScreen.xib Dosyayı Görüntüle

@@ -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="RNPermissionsExample" 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/RNPermissionsExample/Images.xcassets/AppIcon.appiconset/Contents.json Dosyayı Görüntüle

@@ -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
+}

+ 6
- 0
example/ios/RNPermissionsExample/Images.xcassets/Contents.json Dosyayı Görüntüle

@@ -0,0 +1,6 @@
1
+{
2
+  "info": {
3
+    "version": 1,
4
+    "author": "xcode"
5
+  }
6
+}

+ 61
- 0
example/ios/RNPermissionsExample/Info.plist Dosyayı Görüntüle

@@ -0,0 +1,61 @@
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>CFBundleDisplayName</key>
8
+	<string>RNPermissionsExample</string>
9
+	<key>CFBundleExecutable</key>
10
+	<string>$(EXECUTABLE_NAME)</string>
11
+	<key>CFBundleIdentifier</key>
12
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13
+	<key>CFBundleInfoDictionaryVersion</key>
14
+	<string>6.0</string>
15
+	<key>CFBundleName</key>
16
+	<string>$(PRODUCT_NAME)</string>
17
+	<key>CFBundlePackageType</key>
18
+	<string>APPL</string>
19
+	<key>CFBundleShortVersionString</key>
20
+	<string>1.0</string>
21
+	<key>CFBundleSignature</key>
22
+	<string>????</string>
23
+	<key>CFBundleVersion</key>
24
+	<string>1</string>
25
+	<key>LSRequiresIPhoneOS</key>
26
+	<true/>
27
+	<key>UILaunchStoryboardName</key>
28
+	<string>LaunchScreen</string>
29
+	<key>UIRequiredDeviceCapabilities</key>
30
+	<array>
31
+		<string>armv7</string>
32
+	</array>
33
+	<key>UISupportedInterfaceOrientations</key>
34
+	<array>
35
+		<string>UIInterfaceOrientationPortrait</string>
36
+		<string>UIInterfaceOrientationLandscapeLeft</string>
37
+		<string>UIInterfaceOrientationLandscapeRight</string>
38
+	</array>
39
+	<key>UIViewControllerBasedStatusBarAppearance</key>
40
+	<false/>
41
+	<key>NSAppTransportSecurity</key>
42
+	<dict>
43
+		<key>NSAllowsArbitraryLoads</key>
44
+		<true/>
45
+		<key>NSExceptionDomains</key>
46
+		<dict>
47
+			<key>localhost</key>
48
+			<dict>
49
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
50
+				<true/>
51
+			</dict>
52
+		</dict>
53
+	</dict>
54
+	<key>NSCameraUsageDescription</key>
55
+	<string>I want to use your camera</string>
56
+	<key>NSContactsUsageDescription</key>
57
+	<string>I want to use your contacts</string>
58
+	<key>NSCalendarsUsageDescription</key>
59
+	<string>I want to use your calendar</string>
60
+</dict>
61
+</plist>

+ 16
- 0
example/ios/RNPermissionsExample/main.m Dosyayı Görüntüle

@@ -0,0 +1,16 @@
1
+/**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+#import <UIKit/UIKit.h>
9
+
10
+#import "AppDelegate.h"
11
+
12
+int main(int argc, char * argv[]) {
13
+  @autoreleasepool {
14
+    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15
+  }
16
+}

+ 19
- 0
example/package.json Dosyayı Görüntüle

@@ -0,0 +1,19 @@
1
+{
2
+  "name": "RNPermissionsExample",
3
+  "version": "0.0.1",
4
+  "private": true,
5
+  "scripts": {
6
+    "clean-haste": "rm -rf node_modules/react-native-permissions/node_modules",
7
+    "start": "npm run clean-haste && node node_modules/react-native/local-cli/cli.js start"
8
+  },
9
+  "dependencies": {
10
+    "react": "16.6.3",
11
+    "react-native": "0.58.3",
12
+    "react-native-paper": "^2.6.3",
13
+    "react-native-permissions": "../"
14
+  },
15
+  "devDependencies": {
16
+    "babel-core": "^7.0.0-bridge.0",
17
+    "metro-react-native-babel-preset": "0.51.1"
18
+  }
19
+}

+ 6692
- 0
example/yarn.lock
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 208
- 2
index.js Dosyayı Görüntüle

@@ -1,4 +1,210 @@
1 1
 // @flow
2 2
 
3
-// import Permissions from "./lib/permissions";
4
-export default 42;
3
+import {
4
+  AsyncStorage,
5
+  NativeModules,
6
+  PermissionsAndroid,
7
+  Platform,
8
+} from "react-native";
9
+
10
+const { RNPermissions } = NativeModules;
11
+
12
+export const ANDROID_PERMISSIONS = {
13
+  ...PermissionsAndroid.PERMISSIONS,
14
+  // Dangerous permissions not included in PermissionsAndroid (which might be unavailable)
15
+  ACCEPT_HANDOVER: "android.permission.ACCEPT_HANDOVER",
16
+  // @TODO Add more of them (https://developer.android.com/reference/android/Manifest.permission)
17
+};
18
+
19
+// function keyMirror<O: {}>(obj: O): $ObjMapi<O, <K>(k: K) => K> {
20
+//   return Object.keys(obj).reduce((acc, key) => ({ ...acc, [key]: key }), {});
21
+// }
22
+
23
+export const IOS_PERMISSIONS = {
24
+  BLUETOOTH_PERIPHERICAL: "BLUETOOTH_PERIPHERICAL",
25
+  CALENDARS: "CALENDARS",
26
+  CAMERA: "CAMERA",
27
+  CONTACTS: "CONTACTS",
28
+  FACE_ID: "FACE_ID",
29
+  LOCATION_ALWAYS: "LOCATION_ALWAYS",
30
+  LOCATION_WHEN_IN_USE: "LOCATION_WHEN_IN_USE",
31
+  MEDIA_LIBRARY: "MEDIA_LIBRARY",
32
+  MICROPHONE: "MICROPHONE",
33
+  MOTION: "MOTION",
34
+  NOTIFICATIONS: "NOTIFICATIONS",
35
+  PHOTO_LIBRARY: "PHOTO_LIBRARY",
36
+  REMINDERS: "REMINDERS",
37
+  SIRI: "SIRI",
38
+  SPEECH_RECOGNITION: "SPEECH_RECOGNITION",
39
+  STOREKIT: "STOREKIT",
40
+};
41
+
42
+export const RESULTS = {
43
+  GRANTED: "granted",
44
+  DENIED: "denied",
45
+  NEVER_ASK_AGAIN: "never_ask_again",
46
+  UNAVAILABLE: "unavailable",
47
+};
48
+
49
+export type Permission =
50
+  | $Keys<typeof ANDROID_PERMISSIONS>
51
+  | $Keys<typeof IOS_PERMISSIONS>;
52
+
53
+export type PermissionStatus = $Values<typeof RESULTS>;
54
+
55
+export type Rationale = {|
56
+  title: string,
57
+  message: string,
58
+  buttonPositive: string,
59
+  buttonNegative?: string,
60
+  buttonNeutral?: string,
61
+|};
62
+
63
+export type NotificationOption =
64
+  | "badge"
65
+  | "sound"
66
+  | "alert"
67
+  | "carPlay"
68
+  | "criticalAlert"
69
+  | "provisional";
70
+
71
+export type RequestConfig = {|
72
+  notificationOptions?: NotificationOption[],
73
+  rationale?: Rationale,
74
+|};
75
+
76
+const requestedKey = "@RNPermissions:requested";
77
+
78
+const platformPermissions = Object.values(
79
+  Platform.OS === "android" ? ANDROID_PERMISSIONS : IOS_PERMISSIONS,
80
+);
81
+
82
+function assertValidPermission(permission: string) {
83
+  if (platformPermissions.includes(permission)) {
84
+    return;
85
+  }
86
+
87
+  const bulletsList = `• ${platformPermissions.join("\n• ")}`;
88
+  const alertSentence = `Invalid ${
89
+    Platform.OS
90
+  } permission "${permission}". Must be one of:\n\n`;
91
+
92
+  throw new Error(`${alertSentence}${bulletsList}`);
93
+}
94
+
95
+async function getRequestedPermissions() {
96
+  const requested = await AsyncStorage.getItem(requestedKey);
97
+  return requested ? JSON.parse(requested) : [];
98
+}
99
+
100
+async function setRequestedPermission(permission: string) {
101
+  const requested = await getRequestedPermissions();
102
+
103
+  if (requested.includes(permission)) {
104
+    return;
105
+  }
106
+
107
+  return await AsyncStorage.setItem(
108
+    requestedKey,
109
+    JSON.stringify([...requested, permission]),
110
+  );
111
+}
112
+
113
+async function internalCheck(
114
+  permission: Permission,
115
+): Promise<PermissionStatus> {
116
+  if (Platform.OS !== "android") {
117
+    return RNPermissions.check(permission);
118
+  }
119
+
120
+  if (!(await RNPermissions.isPermissionAvailable(permission))) {
121
+    return RESULTS.UNAVAILABLE;
122
+  }
123
+  if (await PermissionsAndroid.check(permission)) {
124
+    return RESULTS.GRANTED;
125
+  }
126
+  if (!(await getRequestedPermissions()).includes(permission)) {
127
+    return RESULTS.DENIED;
128
+  }
129
+
130
+  return (await NativeModules.PermissionsAndroid.shouldShowRequestPermissionRationale(
131
+    permission,
132
+  ))
133
+    ? RESULTS.DENIED
134
+    : RESULTS.NEVER_ASK_AGAIN;
135
+}
136
+
137
+async function internalRequest(
138
+  permission: string,
139
+  config: RequestConfig,
140
+): Promise<PermissionStatus> {
141
+  const { notificationOptions, rationale } = config;
142
+
143
+  if (Platform.OS !== "android") {
144
+    return RNPermissions.request(permission, { notificationOptions });
145
+  }
146
+  if (!(await RNPermissions.isPermissionAvailable(permission))) {
147
+    return RESULTS.UNAVAILABLE;
148
+  }
149
+
150
+  const result = await PermissionsAndroid.request(permission, rationale);
151
+  await setRequestedPermission(permission);
152
+
153
+  return result;
154
+}
155
+
156
+export function openSettings(): Promise<boolean> {
157
+  return RNPermissions.openSettings();
158
+}
159
+
160
+export function check(permission: Permission): Promise<PermissionStatus> {
161
+  assertValidPermission(permission);
162
+  return internalCheck(permission);
163
+}
164
+
165
+export function request(
166
+  permission: string,
167
+  config: RequestConfig = {},
168
+): Promise<PermissionStatus> {
169
+  assertValidPermission(permission);
170
+  return internalRequest(permission, config);
171
+}
172
+
173
+export function requestMultiple(
174
+  permissions: Permission[],
175
+): Promise<{ [permission: Permission]: PermissionStatus }> {
176
+  permissions.forEach(permission => {
177
+    assertValidPermission(permission);
178
+  });
179
+
180
+  return (async () => {
181
+    const result = {};
182
+
183
+    if (Platform.OS !== "android") {
184
+      for (let index = 0; index < permissions.length; index++) {
185
+        const permission = permissions[index];
186
+        result[permission] = await request(permission);
187
+      }
188
+
189
+      return result;
190
+    }
191
+
192
+    const available = [];
193
+
194
+    for (let index = 0; index < permissions.length; index++) {
195
+      const permission = permissions[index];
196
+
197
+      // @TODO Do checks in parallel to improve performances
198
+      if (await RNPermissions.isPermissionAvailable(permission)) {
199
+        available.push(permission);
200
+      } else {
201
+        result[permission] = RESULTS.UNAVAILABLE;
202
+      }
203
+    }
204
+
205
+    return PermissionsAndroid.requestMultiple(available).then(statuses => ({
206
+      ...result,
207
+      ...statuses,
208
+    }));
209
+  })();
210
+}

+ 1
- 1
ios/RNPermissionsManager.m Dosyayı Görüntüle

@@ -52,7 +52,7 @@
52 52
 #import "RNPermissionHandlerStoreKit.h"
53 53
 #endif
54 54
 
55
-static NSString* requestedKey = @"requested-permissions";
55
+static NSString* requestedKey = @"@RNPermissions:requested";
56 56
 
57 57
 @implementation RNPermissionsManager
58 58