├── .buckconfig ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── App.js ├── LICENSE ├── README.md ├── __tests__ └── App-test.js ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── build_defs.bzl │ ├── debug.keystore │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── reactnativepermissionsexample │ │ │ └── ReactNativeFlipper.java │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── reactnativepermissionsexample │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── app.json ├── babel.config.js ├── demo.gif ├── index.js ├── ios ├── Podfile ├── Podfile.lock ├── ReactNativePermissionsExample-tvOS │ └── Info.plist ├── ReactNativePermissionsExample-tvOSTests │ └── Info.plist ├── ReactNativePermissionsExample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ ├── ReactNativePermissionsExample-tvOS.xcscheme │ │ └── ReactNativePermissionsExample.xcscheme ├── ReactNativePermissionsExample.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── ReactNativePermissionsExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── 100.png │ │ │ ├── 1024.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 167.png │ │ │ ├── 180.png │ │ │ ├── 20.png │ │ │ ├── 29.png │ │ │ ├── 40.png │ │ │ ├── 50.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ └── Contents.json │ ├── Info.plist │ ├── LaunchScreen.storyboard │ └── main.m └── ReactNativePermissionsExampleTests │ ├── Info.plist │ └── ReactNativePermissionsExampleTests.m ├── metro.config.js ├── package.json ├── screens ├── calendarPermission.tsx ├── camPermission.tsx ├── contactsPermission.tsx ├── faceIDpermission.tsx ├── micPermission.tsx ├── permissionList.tsx ├── photosPermission.tsx ├── remindersPermission.tsx └── sendSMS.tsx └── yarn.lock /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore polyfills 9 | node_modules/react-native/Libraries/polyfills/.* 10 | 11 | ; These should not be required directly 12 | ; require from fbjs/lib instead: require('fbjs/lib/warning') 13 | node_modules/warning/.* 14 | 15 | ; Flow doesn't support platforms 16 | .*/Libraries/Utilities/LoadingView.js 17 | 18 | [untyped] 19 | .*/node_modules/@react-native-community/cli/.*/.* 20 | 21 | [include] 22 | 23 | [libs] 24 | node_modules/react-native/interface.js 25 | node_modules/react-native/flow/ 26 | 27 | [options] 28 | emoji=true 29 | 30 | esproposal.optional_chaining=enable 31 | esproposal.nullish_coalescing=enable 32 | 33 | module.file_ext=.js 34 | module.file_ext=.json 35 | module.file_ext=.ios.js 36 | 37 | munge_underscores=true 38 | 39 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' 40 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' 41 | 42 | suppress_type=$FlowIssue 43 | suppress_type=$FlowFixMe 44 | suppress_type=$FlowFixMeProps 45 | suppress_type=$FlowFixMeState 46 | 47 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 50 | 51 | [lints] 52 | sketchy-null-number=warn 53 | sketchy-null-mixed=warn 54 | sketchy-number=warn 55 | untyped-type-import=warn 56 | nonstrict-import=warn 57 | deprecated-type=warn 58 | unsafe-getters-setters=warn 59 | unnecessary-invariant=warn 60 | signature-verification-failure=warn 61 | deprecated-utility=error 62 | 63 | [strict] 64 | deprecated-type 65 | nonstrict-import 66 | sketchy-null 67 | unclear-type 68 | unsafe-getters-setters 69 | untyped-import 70 | untyped-type-import 71 | 72 | [version] 73 | ^0.122.0 74 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.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/ 60 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | * @flow strict-local 7 | */ 8 | 9 | import React from 'react'; 10 | import {NavigationContainer} from '@react-navigation/native'; 11 | import {createStackNavigator} from '@react-navigation/stack'; 12 | import PermissionList from './screens/permissionList'; 13 | import CameraPermission from './screens/camPermission'; 14 | import MicrophonePermission from './screens/micPermission'; 15 | import ContactsPermissionScreen from './screens/contactsPermission'; 16 | import CalendarPermissionScreen from './screens/calendarPermission'; 17 | import SendSMSPermissionScreen from './screens/sendSMS'; 18 | import {Platform} from 'react-native'; 19 | import FaceIDPermissionScreen from './screens/faceIDpermission'; 20 | import ReminderPermissionScreen from './screens/remindersPermission'; 21 | import PhotoLibraryPermissionScreen from './screens/photosPermission'; 22 | 23 | const App = () => { 24 | return ; 25 | }; 26 | 27 | const Stack = createStackNavigator(); 28 | 29 | const MyStack = () => { 30 | return ( 31 | 32 | 36 | 41 | 46 | 51 | 56 | 61 | 62 | {Platform.OS === 'android' && ( 63 | 68 | )} 69 | {Platform.OS === 'ios' && ( 70 | <> 71 | 76 | 81 | 86 | 87 | )} 88 | 89 | 90 | ); 91 | }; 92 | export default App; 93 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Emin Khateeb 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Welcome to React Native Permissions Example 👋

2 |

3 | Version 4 | 5 | Documentation 6 | 7 | 8 | Twitter: iremkaraoglu_ 9 | 10 |

11 | 12 | > This project is created as an example of a react-native-permissions library usage. To learn more, check it out my blog post: [Managing app permissions in React Native](https://blog.logrocket.com/react-native-permissions/) 13 | 14 | 15 | 16 | 17 | 18 | ## Install 19 | 20 | ```sh 21 | yarn install 22 | ``` 23 | 24 | ## Usage 25 | 26 | ```sh 27 | yarn run start 28 | ``` 29 | 30 | To run the app on a device, [check it out.](https://reactnative.dev/docs/running-on-device) 31 | ## Author 32 | 33 | 👤 **İrem Karaoğlu** 34 | 35 | * Website: [iremkaraoglu.medium.com](https://iremkaraoglu.medium.com) 36 | 37 | * Github: [@iremkaraoglu](https://github.com/iremkaraoglu) 38 | * LinkedIn: [iremkaraoglu](https://linkedin.com/in/https:\/\/www.linkedin.com\/in\/iremkaraoglu) 39 | 40 | ## Show your support 41 | 42 | Give a ⭐️ if this project helped you! 43 | 44 | *** 45 | _This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_ 46 | -------------------------------------------------------------------------------- /__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | 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.reactnativepermissionsexample", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.reactnativepermissionsexample", 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 | ) 56 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation. If none specified and 19 | * // "index.android.js" exists, it will be used. Otherwise "index.js" is 20 | * // default. Can be overridden with ENTRY_FILE environment variable. 21 | * entryFile: "index.android.js", 22 | * 23 | * // https://reactnative.dev/docs/performance#enable-the-ram-format 24 | * bundleCommand: "ram-bundle", 25 | * 26 | * // whether to bundle JS and assets in debug mode 27 | * bundleInDebug: false, 28 | * 29 | * // whether to bundle JS and assets in release mode 30 | * bundleInRelease: true, 31 | * 32 | * // whether to bundle JS and assets in another build variant (if configured). 33 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 34 | * // The configuration property can be in the following formats 35 | * // 'bundleIn${productFlavor}${buildType}' 36 | * // 'bundleIn${buildType}' 37 | * // bundleInFreeDebug: true, 38 | * // bundleInPaidRelease: true, 39 | * // bundleInBeta: true, 40 | * 41 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 42 | * // for example: to disable dev mode in the staging build type (if configured) 43 | * devDisabledInStaging: true, 44 | * // The configuration property can be in the following formats 45 | * // 'devDisabledIn${productFlavor}${buildType}' 46 | * // 'devDisabledIn${buildType}' 47 | * 48 | * // the root of your project, i.e. where "package.json" lives 49 | * root: "../../", 50 | * 51 | * // where to put the JS bundle asset in debug mode 52 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 53 | * 54 | * // where to put the JS bundle asset in release mode 55 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 56 | * 57 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 58 | * // require('./image.png')), in debug mode 59 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 60 | * 61 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 62 | * // require('./image.png')), in release mode 63 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 64 | * 65 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 66 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 67 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 68 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 69 | * // for example, you might want to remove it from here. 70 | * inputExcludes: ["android/**", "ios/**"], 71 | * 72 | * // override which node gets called and with what additional arguments 73 | * nodeExecutableAndArgs: ["node"], 74 | * 75 | * // supply additional arguments to the packager 76 | * extraPackagerArgs: [] 77 | * ] 78 | */ 79 | 80 | project.ext.react = [ 81 | enableHermes: false, // clean and rebuild if changing 82 | ] 83 | 84 | apply from: "../../node_modules/react-native/react.gradle" 85 | 86 | /** 87 | * Set this to true to create two separate APKs instead of one: 88 | * - An APK that only works on ARM devices 89 | * - An APK that only works on x86 devices 90 | * The advantage is the size of the APK is reduced by about 4MB. 91 | * Upload all the APKs to the Play Store and people will download 92 | * the correct one based on the CPU architecture of their device. 93 | */ 94 | def enableSeparateBuildPerCPUArchitecture = false 95 | 96 | /** 97 | * Run Proguard to shrink the Java bytecode in release builds. 98 | */ 99 | def enableProguardInReleaseBuilds = false 100 | 101 | /** 102 | * The preferred build flavor of JavaScriptCore. 103 | * 104 | * For example, to use the international variant, you can use: 105 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 106 | * 107 | * The international variant includes ICU i18n library and necessary data 108 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 109 | * give correct results when using with locales other than en-US. Note that 110 | * this variant is about 6MiB larger per architecture than default. 111 | */ 112 | def jscFlavor = 'org.webkit:android-jsc:+' 113 | 114 | /** 115 | * Whether to enable the Hermes VM. 116 | * 117 | * This should be set on project.ext.react and mirrored here. If it is not set 118 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 119 | * and the benefits of using Hermes will therefore be sharply reduced. 120 | */ 121 | def enableHermes = project.ext.react.get("enableHermes", false); 122 | 123 | android { 124 | compileSdkVersion rootProject.ext.compileSdkVersion 125 | 126 | compileOptions { 127 | sourceCompatibility JavaVersion.VERSION_1_8 128 | targetCompatibility JavaVersion.VERSION_1_8 129 | } 130 | 131 | defaultConfig { 132 | applicationId "com.reactnativepermissionsexample" 133 | minSdkVersion rootProject.ext.minSdkVersion 134 | targetSdkVersion rootProject.ext.targetSdkVersion 135 | versionCode 1 136 | versionName "1.0" 137 | } 138 | splits { 139 | abi { 140 | reset() 141 | enable enableSeparateBuildPerCPUArchitecture 142 | universalApk false // If true, also generate a universal APK 143 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" 144 | } 145 | } 146 | signingConfigs { 147 | debug { 148 | storeFile file('debug.keystore') 149 | storePassword 'android' 150 | keyAlias 'androiddebugkey' 151 | keyPassword 'android' 152 | } 153 | } 154 | buildTypes { 155 | debug { 156 | signingConfig signingConfigs.debug 157 | } 158 | release { 159 | // Caution! In production, you need to generate your own keystore file. 160 | // see https://reactnative.dev/docs/signed-apk-android. 161 | signingConfig signingConfigs.debug 162 | minifyEnabled enableProguardInReleaseBuilds 163 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 164 | } 165 | } 166 | 167 | // applicationVariants are e.g. debug, release 168 | applicationVariants.all { variant -> 169 | variant.outputs.each { output -> 170 | // For each separate APK per architecture, set a unique version code as described here: 171 | // https://developer.android.com/studio/build/configure-apk-splits.html 172 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 173 | def abi = output.getFilter(OutputFile.ABI) 174 | if (abi != null) { // null for the universal-debug, universal-release variants 175 | output.versionCodeOverride = 176 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 177 | } 178 | 179 | } 180 | } 181 | } 182 | 183 | dependencies { 184 | implementation fileTree(dir: "libs", include: ["*.jar"]) 185 | //noinspection GradleDynamicVersion 186 | implementation "com.facebook.react:react-native:+" // From node_modules 187 | 188 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 189 | 190 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { 191 | exclude group:'com.facebook.fbjni' 192 | } 193 | 194 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 195 | exclude group:'com.facebook.flipper' 196 | } 197 | 198 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { 199 | exclude group:'com.facebook.flipper' 200 | } 201 | 202 | if (enableHermes) { 203 | def hermesPath = "../../node_modules/hermes-engine/android/"; 204 | debugImplementation files(hermesPath + "hermes-debug.aar") 205 | releaseImplementation files(hermesPath + "hermes-release.aar") 206 | } else { 207 | implementation jscFlavor 208 | } 209 | } 210 | 211 | // Run this once to be able to run the application with BUCK 212 | // puts all compile dependencies into folder libs for BUCK to use 213 | task copyDownloadableDepsToLibs(type: Copy) { 214 | from configurations.compile 215 | into 'libs' 216 | } 217 | 218 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 219 | -------------------------------------------------------------------------------- /android/app/build_defs.bzl: -------------------------------------------------------------------------------- 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 | ) 20 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/debug.keystore -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/debug/java/com/reactnativepermissionsexample/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.reactnativepermissionsexample; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | public class ReactNativeFlipper { 28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 29 | if (FlipperUtils.shouldEnableFlipper(context)) { 30 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 31 | 32 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 33 | client.addPlugin(new ReactFlipperPlugin()); 34 | client.addPlugin(new DatabasesFlipperPlugin(context)); 35 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 36 | client.addPlugin(CrashReporterPlugin.getInstance()); 37 | 38 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 39 | NetworkingModule.setCustomClientBuilder( 40 | new NetworkingModule.CustomClientBuilder() { 41 | @Override 42 | public void apply(OkHttpClient.Builder builder) { 43 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 44 | } 45 | }); 46 | client.addPlugin(networkFlipperPlugin); 47 | client.start(); 48 | 49 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 50 | // Hence we run if after all native modules have been initialized 51 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 52 | if (reactContext == null) { 53 | reactInstanceManager.addReactInstanceEventListener( 54 | new ReactInstanceManager.ReactInstanceEventListener() { 55 | @Override 56 | public void onReactContextInitialized(ReactContext reactContext) { 57 | reactInstanceManager.removeReactInstanceEventListener(this); 58 | reactContext.runOnNativeModulesQueueThread( 59 | new Runnable() { 60 | @Override 61 | public void run() { 62 | client.addPlugin(new FrescoFlipperPlugin()); 63 | } 64 | }); 65 | } 66 | }); 67 | } else { 68 | client.addPlugin(new FrescoFlipperPlugin()); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativepermissionsexample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactnativepermissionsexample; 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. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "ReactNativePermissionsExample"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativepermissionsexample/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.reactnativepermissionsexample; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | import java.lang.reflect.InvocationTargetException; 12 | import java.util.List; 13 | 14 | public class MainApplication extends Application implements ReactApplication { 15 | 16 | private final ReactNativeHost mReactNativeHost = 17 | new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | @SuppressWarnings("UnnecessaryLocalVariable") 26 | List packages = new PackageList(this).getPackages(); 27 | // Packages that cannot be autolinked yet can be added manually here, for example: 28 | // packages.add(new MyReactNativePackage()); 29 | return packages; 30 | } 31 | 32 | @Override 33 | protected String getJSMainModuleName() { 34 | return "index"; 35 | } 36 | }; 37 | 38 | @Override 39 | public ReactNativeHost getReactNativeHost() { 40 | return mReactNativeHost; 41 | } 42 | 43 | @Override 44 | public void onCreate() { 45 | super.onCreate(); 46 | SoLoader.init(this, /* native exopackage */ false); 47 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 48 | } 49 | 50 | /** 51 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like 52 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 53 | * 54 | * @param context 55 | * @param reactInstanceManager 56 | */ 57 | private static void initializeFlipper( 58 | Context context, ReactInstanceManager reactInstanceManager) { 59 | if (BuildConfig.DEBUG) { 60 | try { 61 | /* 62 | We use reflection here to pick up the class that initializes Flipper, 63 | since Flipper library is not available in release mode 64 | */ 65 | Class aClass = Class.forName("com.reactnativepermissionsexample.ReactNativeFlipper"); 66 | aClass 67 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 68 | .invoke(null, context, reactInstanceManager); 69 | } catch (ClassNotFoundException e) { 70 | e.printStackTrace(); 71 | } catch (NoSuchMethodException e) { 72 | e.printStackTrace(); 73 | } catch (IllegalAccessException e) { 74 | e.printStackTrace(); 75 | } catch (InvocationTargetException e) { 76 | e.printStackTrace(); 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RN Permissions 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "29.0.2" 6 | minSdkVersion = 16 7 | compileSdkVersion = 29 8 | targetSdkVersion = 29 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.5.3") 16 | // NOTE: Do not place your application dependencies here; they belong 17 | // in the individual module build.gradle files 18 | } 19 | } 20 | 21 | allprojects { 22 | repositories { 23 | mavenLocal() 24 | maven { 25 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 26 | url("$rootDir/../node_modules/react-native/android") 27 | } 28 | maven { 29 | // Android JSC is installed from npm 30 | url("$rootDir/../node_modules/jsc-android/dist") 31 | } 32 | 33 | google() 34 | jcenter() 35 | maven { url 'https://www.jitpack.io' } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.37.0 29 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | # Determine the Java command to use to start the JVM. 86 | if [ -n "$JAVA_HOME" ] ; then 87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 88 | # IBM's JDK on AIX uses strange locations for the executables 89 | JAVACMD="$JAVA_HOME/jre/sh/java" 90 | else 91 | JAVACMD="$JAVA_HOME/bin/java" 92 | fi 93 | if [ ! -x "$JAVACMD" ] ; then 94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 95 | 96 | Please set the JAVA_HOME variable in your environment to match the 97 | location of your Java installation." 98 | fi 99 | else 100 | JAVACMD="java" 101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 102 | 103 | Please set the JAVA_HOME variable in your environment to match the 104 | location of your Java installation." 105 | fi 106 | 107 | # Increase the maximum file descriptors if we can. 108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 109 | MAX_FD_LIMIT=`ulimit -H -n` 110 | if [ $? -eq 0 ] ; then 111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 112 | MAX_FD="$MAX_FD_LIMIT" 113 | fi 114 | ulimit -n $MAX_FD 115 | if [ $? -ne 0 ] ; then 116 | warn "Could not set maximum file descriptor limit: $MAX_FD" 117 | fi 118 | else 119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 120 | fi 121 | fi 122 | 123 | # For Darwin, add options to specify how the application appears in the dock 124 | if $darwin; then 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 126 | fi 127 | 128 | # For Cygwin or MSYS, switch paths to Windows format before running java 129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 132 | JAVACMD=`cygpath --unix "$JAVACMD"` 133 | 134 | # We build the pattern for arguments to be converted via cygpath 135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 136 | SEP="" 137 | for dir in $ROOTDIRSRAW ; do 138 | ROOTDIRS="$ROOTDIRS$SEP$dir" 139 | SEP="|" 140 | done 141 | OURCYGPATTERN="(^($ROOTDIRS))" 142 | # Add a user-defined pattern to the cygpath arguments 143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 145 | fi 146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 147 | i=0 148 | for arg in "$@" ; do 149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 151 | 152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 154 | else 155 | eval `echo args$i`="\"$arg\"" 156 | fi 157 | i=`expr $i + 1` 158 | done 159 | case $i in 160 | 0) set -- ;; 161 | 1) set -- "$args0" ;; 162 | 2) set -- "$args0" "$args1" ;; 163 | 3) set -- "$args0" "$args1" "$args2" ;; 164 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 165 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 166 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 167 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 168 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 169 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 170 | esac 171 | fi 172 | 173 | # Escape application args 174 | save () { 175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 176 | echo " " 177 | } 178 | APP_ARGS=`save "$@"` 179 | 180 | # Collect all arguments for the java command, following the shell quoting and substitution rules 181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 182 | 183 | exec "$JAVACMD" "$@" 184 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto init 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto init 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :init 68 | @rem Get command-line arguments, handling Windows variants 69 | 70 | if not "%OS%" == "Windows_NT" goto win9xME_args 71 | 72 | :win9xME_args 73 | @rem Slurp the command line arguments. 74 | set CMD_LINE_ARGS= 75 | set _SKIP=2 76 | 77 | :win9xME_args_slurp 78 | if "x%~1" == "x" goto execute 79 | 80 | set CMD_LINE_ARGS=%* 81 | 82 | :execute 83 | @rem Setup the command line 84 | 85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 86 | 87 | @rem Execute Gradle 88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 89 | 90 | :end 91 | @rem End local scope for the variables with windows NT shell 92 | if "%ERRORLEVEL%"=="0" goto mainEnd 93 | 94 | :fail 95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 96 | rem the _cmd.exe /c_ return code! 97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 98 | exit /b 1 99 | 100 | :mainEnd 101 | if "%OS%"=="Windows_NT" endlocal 102 | 103 | :omega 104 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ReactNativePermissionsExample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactNativePermissionsExample", 3 | "displayName": "ReactNativePermissionsExample" 4 | } -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/demo.gif -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '10.0' 5 | target 'ReactNativePermissionsExample' do 6 | permissions_path = '../node_modules/react-native-permissions/ios' 7 | config = use_native_modules! 8 | pod 'Permission-Camera', :path => "#{permissions_path}/Camera" 9 | pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone" 10 | pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts" 11 | pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars" 12 | pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID" 13 | pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders" 14 | pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary" 15 | 16 | use_react_native!(:path => config["reactNativePath"]) 17 | 18 | 19 | # Enables Flipper. 20 | # 21 | # Note that if you have use_frameworks! enabled, Flipper will not work and 22 | # you should disable these next few lines. 23 | use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' }) 24 | post_install do |installer| 25 | flipper_post_install(installer) 26 | installer.aggregate_targets.each do |aggregate_target| 27 | aggregate_target.user_project.native_targets.each do |target| 28 | target.build_configurations.each do |config| 29 | config.build_settings['LIBRARY_SEARCH_PATHS'] = ['$(SDKROOT)/usr/lib/swift', '$(inherited)'] 30 | end 31 | end 32 | aggregate_target.user_project.save 33 | end 34 | end 35 | end 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost-for-react-native (1.63.0) 3 | - CocoaAsyncSocket (7.6.5) 4 | - DoubleConversion (1.1.6) 5 | - FBLazyVector (0.63.1) 6 | - FBReactNativeSpec (0.63.1): 7 | - Folly (= 2020.01.13.00) 8 | - RCTRequired (= 0.63.1) 9 | - RCTTypeSafety (= 0.63.1) 10 | - React-Core (= 0.63.1) 11 | - React-jsi (= 0.63.1) 12 | - ReactCommon/turbomodule/core (= 0.63.1) 13 | - Flipper (0.87.0): 14 | - Flipper-Folly (~> 2.5) 15 | - Flipper-RSocket (~> 1.3) 16 | - Flipper-DoubleConversion (1.1.7) 17 | - Flipper-Folly (2.5.3): 18 | - boost-for-react-native 19 | - Flipper-DoubleConversion 20 | - Flipper-Glog 21 | - libevent (~> 2.1.12) 22 | - OpenSSL-Universal (= 1.1.180) 23 | - Flipper-Glog (0.3.6) 24 | - Flipper-PeerTalk (0.0.4) 25 | - Flipper-RSocket (1.3.1): 26 | - Flipper-Folly (~> 2.5) 27 | - FlipperKit (0.87.0): 28 | - FlipperKit/Core (= 0.87.0) 29 | - FlipperKit/Core (0.87.0): 30 | - Flipper (~> 0.87.0) 31 | - FlipperKit/CppBridge 32 | - FlipperKit/FBCxxFollyDynamicConvert 33 | - FlipperKit/FBDefines 34 | - FlipperKit/FKPortForwarding 35 | - FlipperKit/CppBridge (0.87.0): 36 | - Flipper (~> 0.87.0) 37 | - FlipperKit/FBCxxFollyDynamicConvert (0.87.0): 38 | - Flipper-Folly (~> 2.5) 39 | - FlipperKit/FBDefines (0.87.0) 40 | - FlipperKit/FKPortForwarding (0.87.0): 41 | - CocoaAsyncSocket (~> 7.6) 42 | - Flipper-PeerTalk (~> 0.0.4) 43 | - FlipperKit/FlipperKitHighlightOverlay (0.87.0) 44 | - FlipperKit/FlipperKitLayoutHelpers (0.87.0): 45 | - FlipperKit/Core 46 | - FlipperKit/FlipperKitHighlightOverlay 47 | - FlipperKit/FlipperKitLayoutTextSearchable 48 | - FlipperKit/FlipperKitLayoutIOSDescriptors (0.87.0): 49 | - FlipperKit/Core 50 | - FlipperKit/FlipperKitHighlightOverlay 51 | - FlipperKit/FlipperKitLayoutHelpers 52 | - YogaKit (~> 1.18) 53 | - FlipperKit/FlipperKitLayoutPlugin (0.87.0): 54 | - FlipperKit/Core 55 | - FlipperKit/FlipperKitHighlightOverlay 56 | - FlipperKit/FlipperKitLayoutHelpers 57 | - FlipperKit/FlipperKitLayoutIOSDescriptors 58 | - FlipperKit/FlipperKitLayoutTextSearchable 59 | - YogaKit (~> 1.18) 60 | - FlipperKit/FlipperKitLayoutTextSearchable (0.87.0) 61 | - FlipperKit/FlipperKitNetworkPlugin (0.87.0): 62 | - FlipperKit/Core 63 | - FlipperKit/FlipperKitReactPlugin (0.87.0): 64 | - FlipperKit/Core 65 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.87.0): 66 | - FlipperKit/Core 67 | - FlipperKit/SKIOSNetworkPlugin (0.87.0): 68 | - FlipperKit/Core 69 | - FlipperKit/FlipperKitNetworkPlugin 70 | - Folly (2020.01.13.00): 71 | - boost-for-react-native 72 | - DoubleConversion 73 | - Folly/Default (= 2020.01.13.00) 74 | - glog 75 | - Folly/Default (2020.01.13.00): 76 | - boost-for-react-native 77 | - DoubleConversion 78 | - glog 79 | - glog (0.3.5) 80 | - libevent (2.1.12) 81 | - OpenSSL-Universal (1.1.180) 82 | - Permission-Calendars (3.0.5): 83 | - RNPermissions 84 | - Permission-Camera (3.0.5): 85 | - RNPermissions 86 | - Permission-Contacts (3.0.5): 87 | - RNPermissions 88 | - Permission-FaceID (3.0.5): 89 | - RNPermissions 90 | - Permission-Microphone (3.0.5): 91 | - RNPermissions 92 | - Permission-PhotoLibrary (3.0.5): 93 | - RNPermissions 94 | - Permission-Reminders (3.0.5): 95 | - RNPermissions 96 | - RCTRequired (0.63.1) 97 | - RCTTypeSafety (0.63.1): 98 | - FBLazyVector (= 0.63.1) 99 | - Folly (= 2020.01.13.00) 100 | - RCTRequired (= 0.63.1) 101 | - React-Core (= 0.63.1) 102 | - React (0.63.1): 103 | - React-Core (= 0.63.1) 104 | - React-Core/DevSupport (= 0.63.1) 105 | - React-Core/RCTWebSocket (= 0.63.1) 106 | - React-RCTActionSheet (= 0.63.1) 107 | - React-RCTAnimation (= 0.63.1) 108 | - React-RCTBlob (= 0.63.1) 109 | - React-RCTImage (= 0.63.1) 110 | - React-RCTLinking (= 0.63.1) 111 | - React-RCTNetwork (= 0.63.1) 112 | - React-RCTSettings (= 0.63.1) 113 | - React-RCTText (= 0.63.1) 114 | - React-RCTVibration (= 0.63.1) 115 | - React-callinvoker (0.63.1) 116 | - React-Core (0.63.1): 117 | - Folly (= 2020.01.13.00) 118 | - glog 119 | - React-Core/Default (= 0.63.1) 120 | - React-cxxreact (= 0.63.1) 121 | - React-jsi (= 0.63.1) 122 | - React-jsiexecutor (= 0.63.1) 123 | - Yoga 124 | - React-Core/CoreModulesHeaders (0.63.1): 125 | - Folly (= 2020.01.13.00) 126 | - glog 127 | - React-Core/Default 128 | - React-cxxreact (= 0.63.1) 129 | - React-jsi (= 0.63.1) 130 | - React-jsiexecutor (= 0.63.1) 131 | - Yoga 132 | - React-Core/Default (0.63.1): 133 | - Folly (= 2020.01.13.00) 134 | - glog 135 | - React-cxxreact (= 0.63.1) 136 | - React-jsi (= 0.63.1) 137 | - React-jsiexecutor (= 0.63.1) 138 | - Yoga 139 | - React-Core/DevSupport (0.63.1): 140 | - Folly (= 2020.01.13.00) 141 | - glog 142 | - React-Core/Default (= 0.63.1) 143 | - React-Core/RCTWebSocket (= 0.63.1) 144 | - React-cxxreact (= 0.63.1) 145 | - React-jsi (= 0.63.1) 146 | - React-jsiexecutor (= 0.63.1) 147 | - React-jsinspector (= 0.63.1) 148 | - Yoga 149 | - React-Core/RCTActionSheetHeaders (0.63.1): 150 | - Folly (= 2020.01.13.00) 151 | - glog 152 | - React-Core/Default 153 | - React-cxxreact (= 0.63.1) 154 | - React-jsi (= 0.63.1) 155 | - React-jsiexecutor (= 0.63.1) 156 | - Yoga 157 | - React-Core/RCTAnimationHeaders (0.63.1): 158 | - Folly (= 2020.01.13.00) 159 | - glog 160 | - React-Core/Default 161 | - React-cxxreact (= 0.63.1) 162 | - React-jsi (= 0.63.1) 163 | - React-jsiexecutor (= 0.63.1) 164 | - Yoga 165 | - React-Core/RCTBlobHeaders (0.63.1): 166 | - Folly (= 2020.01.13.00) 167 | - glog 168 | - React-Core/Default 169 | - React-cxxreact (= 0.63.1) 170 | - React-jsi (= 0.63.1) 171 | - React-jsiexecutor (= 0.63.1) 172 | - Yoga 173 | - React-Core/RCTImageHeaders (0.63.1): 174 | - Folly (= 2020.01.13.00) 175 | - glog 176 | - React-Core/Default 177 | - React-cxxreact (= 0.63.1) 178 | - React-jsi (= 0.63.1) 179 | - React-jsiexecutor (= 0.63.1) 180 | - Yoga 181 | - React-Core/RCTLinkingHeaders (0.63.1): 182 | - Folly (= 2020.01.13.00) 183 | - glog 184 | - React-Core/Default 185 | - React-cxxreact (= 0.63.1) 186 | - React-jsi (= 0.63.1) 187 | - React-jsiexecutor (= 0.63.1) 188 | - Yoga 189 | - React-Core/RCTNetworkHeaders (0.63.1): 190 | - Folly (= 2020.01.13.00) 191 | - glog 192 | - React-Core/Default 193 | - React-cxxreact (= 0.63.1) 194 | - React-jsi (= 0.63.1) 195 | - React-jsiexecutor (= 0.63.1) 196 | - Yoga 197 | - React-Core/RCTSettingsHeaders (0.63.1): 198 | - Folly (= 2020.01.13.00) 199 | - glog 200 | - React-Core/Default 201 | - React-cxxreact (= 0.63.1) 202 | - React-jsi (= 0.63.1) 203 | - React-jsiexecutor (= 0.63.1) 204 | - Yoga 205 | - React-Core/RCTTextHeaders (0.63.1): 206 | - Folly (= 2020.01.13.00) 207 | - glog 208 | - React-Core/Default 209 | - React-cxxreact (= 0.63.1) 210 | - React-jsi (= 0.63.1) 211 | - React-jsiexecutor (= 0.63.1) 212 | - Yoga 213 | - React-Core/RCTVibrationHeaders (0.63.1): 214 | - Folly (= 2020.01.13.00) 215 | - glog 216 | - React-Core/Default 217 | - React-cxxreact (= 0.63.1) 218 | - React-jsi (= 0.63.1) 219 | - React-jsiexecutor (= 0.63.1) 220 | - Yoga 221 | - React-Core/RCTWebSocket (0.63.1): 222 | - Folly (= 2020.01.13.00) 223 | - glog 224 | - React-Core/Default (= 0.63.1) 225 | - React-cxxreact (= 0.63.1) 226 | - React-jsi (= 0.63.1) 227 | - React-jsiexecutor (= 0.63.1) 228 | - Yoga 229 | - React-CoreModules (0.63.1): 230 | - FBReactNativeSpec (= 0.63.1) 231 | - Folly (= 2020.01.13.00) 232 | - RCTTypeSafety (= 0.63.1) 233 | - React-Core/CoreModulesHeaders (= 0.63.1) 234 | - React-jsi (= 0.63.1) 235 | - React-RCTImage (= 0.63.1) 236 | - ReactCommon/turbomodule/core (= 0.63.1) 237 | - React-cxxreact (0.63.1): 238 | - boost-for-react-native (= 1.63.0) 239 | - DoubleConversion 240 | - Folly (= 2020.01.13.00) 241 | - glog 242 | - React-callinvoker (= 0.63.1) 243 | - React-jsinspector (= 0.63.1) 244 | - React-jsi (0.63.1): 245 | - boost-for-react-native (= 1.63.0) 246 | - DoubleConversion 247 | - Folly (= 2020.01.13.00) 248 | - glog 249 | - React-jsi/Default (= 0.63.1) 250 | - React-jsi/Default (0.63.1): 251 | - boost-for-react-native (= 1.63.0) 252 | - DoubleConversion 253 | - Folly (= 2020.01.13.00) 254 | - glog 255 | - React-jsiexecutor (0.63.1): 256 | - DoubleConversion 257 | - Folly (= 2020.01.13.00) 258 | - glog 259 | - React-cxxreact (= 0.63.1) 260 | - React-jsi (= 0.63.1) 261 | - React-jsinspector (0.63.1) 262 | - react-native-safe-area-context (3.2.0): 263 | - React-Core 264 | - React-RCTActionSheet (0.63.1): 265 | - React-Core/RCTActionSheetHeaders (= 0.63.1) 266 | - React-RCTAnimation (0.63.1): 267 | - FBReactNativeSpec (= 0.63.1) 268 | - Folly (= 2020.01.13.00) 269 | - RCTTypeSafety (= 0.63.1) 270 | - React-Core/RCTAnimationHeaders (= 0.63.1) 271 | - React-jsi (= 0.63.1) 272 | - ReactCommon/turbomodule/core (= 0.63.1) 273 | - React-RCTBlob (0.63.1): 274 | - FBReactNativeSpec (= 0.63.1) 275 | - Folly (= 2020.01.13.00) 276 | - React-Core/RCTBlobHeaders (= 0.63.1) 277 | - React-Core/RCTWebSocket (= 0.63.1) 278 | - React-jsi (= 0.63.1) 279 | - React-RCTNetwork (= 0.63.1) 280 | - ReactCommon/turbomodule/core (= 0.63.1) 281 | - React-RCTImage (0.63.1): 282 | - FBReactNativeSpec (= 0.63.1) 283 | - Folly (= 2020.01.13.00) 284 | - RCTTypeSafety (= 0.63.1) 285 | - React-Core/RCTImageHeaders (= 0.63.1) 286 | - React-jsi (= 0.63.1) 287 | - React-RCTNetwork (= 0.63.1) 288 | - ReactCommon/turbomodule/core (= 0.63.1) 289 | - React-RCTLinking (0.63.1): 290 | - FBReactNativeSpec (= 0.63.1) 291 | - React-Core/RCTLinkingHeaders (= 0.63.1) 292 | - React-jsi (= 0.63.1) 293 | - ReactCommon/turbomodule/core (= 0.63.1) 294 | - React-RCTNetwork (0.63.1): 295 | - FBReactNativeSpec (= 0.63.1) 296 | - Folly (= 2020.01.13.00) 297 | - RCTTypeSafety (= 0.63.1) 298 | - React-Core/RCTNetworkHeaders (= 0.63.1) 299 | - React-jsi (= 0.63.1) 300 | - ReactCommon/turbomodule/core (= 0.63.1) 301 | - React-RCTSettings (0.63.1): 302 | - FBReactNativeSpec (= 0.63.1) 303 | - Folly (= 2020.01.13.00) 304 | - RCTTypeSafety (= 0.63.1) 305 | - React-Core/RCTSettingsHeaders (= 0.63.1) 306 | - React-jsi (= 0.63.1) 307 | - ReactCommon/turbomodule/core (= 0.63.1) 308 | - React-RCTText (0.63.1): 309 | - React-Core/RCTTextHeaders (= 0.63.1) 310 | - React-RCTVibration (0.63.1): 311 | - FBReactNativeSpec (= 0.63.1) 312 | - Folly (= 2020.01.13.00) 313 | - React-Core/RCTVibrationHeaders (= 0.63.1) 314 | - React-jsi (= 0.63.1) 315 | - ReactCommon/turbomodule/core (= 0.63.1) 316 | - ReactCommon/turbomodule/core (0.63.1): 317 | - DoubleConversion 318 | - Folly (= 2020.01.13.00) 319 | - glog 320 | - React-callinvoker (= 0.63.1) 321 | - React-Core (= 0.63.1) 322 | - React-cxxreact (= 0.63.1) 323 | - React-jsi (= 0.63.1) 324 | - RNCMaskedView (0.1.11): 325 | - React 326 | - RNGestureHandler (1.10.3): 327 | - React-Core 328 | - RNPermissions (3.0.5): 329 | - React-Core 330 | - RNReanimated (2.2.0): 331 | - DoubleConversion 332 | - FBLazyVector 333 | - FBReactNativeSpec 334 | - Folly 335 | - glog 336 | - RCTRequired 337 | - RCTTypeSafety 338 | - React 339 | - React-callinvoker 340 | - React-Core 341 | - React-Core/DevSupport 342 | - React-Core/RCTWebSocket 343 | - React-CoreModules 344 | - React-cxxreact 345 | - React-jsi 346 | - React-jsiexecutor 347 | - React-jsinspector 348 | - React-RCTActionSheet 349 | - React-RCTAnimation 350 | - React-RCTBlob 351 | - React-RCTImage 352 | - React-RCTLinking 353 | - React-RCTNetwork 354 | - React-RCTSettings 355 | - React-RCTText 356 | - React-RCTVibration 357 | - ReactCommon/turbomodule/core 358 | - Yoga 359 | - RNScreens (3.4.0): 360 | - React-Core 361 | - React-RCTImage 362 | - Yoga (1.14.0) 363 | - YogaKit (1.18.1): 364 | - Yoga (~> 1.14) 365 | 366 | DEPENDENCIES: 367 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 368 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 369 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) 370 | - Flipper (= 0.87.0) 371 | - Flipper-DoubleConversion (= 1.1.7) 372 | - Flipper-Folly (= 2.5.3) 373 | - Flipper-Glog (= 0.3.6) 374 | - Flipper-PeerTalk (~> 0.0.4) 375 | - Flipper-RSocket (= 1.3.1) 376 | - FlipperKit (= 0.87.0) 377 | - FlipperKit/Core (= 0.87.0) 378 | - FlipperKit/CppBridge (= 0.87.0) 379 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.87.0) 380 | - FlipperKit/FBDefines (= 0.87.0) 381 | - FlipperKit/FKPortForwarding (= 0.87.0) 382 | - FlipperKit/FlipperKitHighlightOverlay (= 0.87.0) 383 | - FlipperKit/FlipperKitLayoutPlugin (= 0.87.0) 384 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.87.0) 385 | - FlipperKit/FlipperKitNetworkPlugin (= 0.87.0) 386 | - FlipperKit/FlipperKitReactPlugin (= 0.87.0) 387 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.87.0) 388 | - FlipperKit/SKIOSNetworkPlugin (= 0.87.0) 389 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) 390 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 391 | - Permission-Calendars (from `../node_modules/react-native-permissions/ios/Calendars`) 392 | - Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera`) 393 | - Permission-Contacts (from `../node_modules/react-native-permissions/ios/Contacts`) 394 | - Permission-FaceID (from `../node_modules/react-native-permissions/ios/FaceID`) 395 | - Permission-Microphone (from `../node_modules/react-native-permissions/ios/Microphone`) 396 | - Permission-PhotoLibrary (from `../node_modules/react-native-permissions/ios/PhotoLibrary`) 397 | - Permission-Reminders (from `../node_modules/react-native-permissions/ios/Reminders`) 398 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 399 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 400 | - React (from `../node_modules/react-native/`) 401 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) 402 | - React-Core (from `../node_modules/react-native/`) 403 | - React-Core/DevSupport (from `../node_modules/react-native/`) 404 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 405 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 406 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 407 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 408 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 409 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 410 | - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) 411 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 412 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 413 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 414 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 415 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 416 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 417 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 418 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 419 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 420 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 421 | - "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)" 422 | - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) 423 | - RNPermissions (from `../node_modules/react-native-permissions`) 424 | - RNReanimated (from `../node_modules/react-native-reanimated`) 425 | - RNScreens (from `../node_modules/react-native-screens`) 426 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 427 | 428 | SPEC REPOS: 429 | trunk: 430 | - boost-for-react-native 431 | - CocoaAsyncSocket 432 | - Flipper 433 | - Flipper-DoubleConversion 434 | - Flipper-Folly 435 | - Flipper-Glog 436 | - Flipper-PeerTalk 437 | - Flipper-RSocket 438 | - FlipperKit 439 | - libevent 440 | - OpenSSL-Universal 441 | - YogaKit 442 | 443 | EXTERNAL SOURCES: 444 | DoubleConversion: 445 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 446 | FBLazyVector: 447 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 448 | FBReactNativeSpec: 449 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec" 450 | Folly: 451 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec" 452 | glog: 453 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 454 | Permission-Calendars: 455 | :path: "../node_modules/react-native-permissions/ios/Calendars" 456 | Permission-Camera: 457 | :path: "../node_modules/react-native-permissions/ios/Camera" 458 | Permission-Contacts: 459 | :path: "../node_modules/react-native-permissions/ios/Contacts" 460 | Permission-FaceID: 461 | :path: "../node_modules/react-native-permissions/ios/FaceID" 462 | Permission-Microphone: 463 | :path: "../node_modules/react-native-permissions/ios/Microphone" 464 | Permission-PhotoLibrary: 465 | :path: "../node_modules/react-native-permissions/ios/PhotoLibrary" 466 | Permission-Reminders: 467 | :path: "../node_modules/react-native-permissions/ios/Reminders" 468 | RCTRequired: 469 | :path: "../node_modules/react-native/Libraries/RCTRequired" 470 | RCTTypeSafety: 471 | :path: "../node_modules/react-native/Libraries/TypeSafety" 472 | React: 473 | :path: "../node_modules/react-native/" 474 | React-callinvoker: 475 | :path: "../node_modules/react-native/ReactCommon/callinvoker" 476 | React-Core: 477 | :path: "../node_modules/react-native/" 478 | React-CoreModules: 479 | :path: "../node_modules/react-native/React/CoreModules" 480 | React-cxxreact: 481 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 482 | React-jsi: 483 | :path: "../node_modules/react-native/ReactCommon/jsi" 484 | React-jsiexecutor: 485 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 486 | React-jsinspector: 487 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 488 | react-native-safe-area-context: 489 | :path: "../node_modules/react-native-safe-area-context" 490 | React-RCTActionSheet: 491 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 492 | React-RCTAnimation: 493 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 494 | React-RCTBlob: 495 | :path: "../node_modules/react-native/Libraries/Blob" 496 | React-RCTImage: 497 | :path: "../node_modules/react-native/Libraries/Image" 498 | React-RCTLinking: 499 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 500 | React-RCTNetwork: 501 | :path: "../node_modules/react-native/Libraries/Network" 502 | React-RCTSettings: 503 | :path: "../node_modules/react-native/Libraries/Settings" 504 | React-RCTText: 505 | :path: "../node_modules/react-native/Libraries/Text" 506 | React-RCTVibration: 507 | :path: "../node_modules/react-native/Libraries/Vibration" 508 | ReactCommon: 509 | :path: "../node_modules/react-native/ReactCommon" 510 | RNCMaskedView: 511 | :path: "../node_modules/@react-native-community/masked-view" 512 | RNGestureHandler: 513 | :path: "../node_modules/react-native-gesture-handler" 514 | RNPermissions: 515 | :path: "../node_modules/react-native-permissions" 516 | RNReanimated: 517 | :path: "../node_modules/react-native-reanimated" 518 | RNScreens: 519 | :path: "../node_modules/react-native-screens" 520 | Yoga: 521 | :path: "../node_modules/react-native/ReactCommon/yoga" 522 | 523 | SPEC CHECKSUMS: 524 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c 525 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 526 | DoubleConversion: cde416483dac037923206447da6e1454df403714 527 | FBLazyVector: a50434c875bd42f2b1c99c712bda892a1dc659c7 528 | FBReactNativeSpec: 393853a536428e05a9da00b6290042f09809b15b 529 | Flipper: 1bd2db48dcc31e4b167b9a33ec1df01c2ded4893 530 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 531 | Flipper-Folly: 755929a4f851b2fb2c347d533a23f191b008554c 532 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 533 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 534 | Flipper-RSocket: 127954abe8b162fcaf68d2134d34dc2bd7076154 535 | FlipperKit: 651f50a42eb95c01b3e89a60996dd6aded529eeb 536 | Folly: b73c3869541e86821df3c387eb0af5f65addfab4 537 | glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 538 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 539 | OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b 540 | Permission-Calendars: 7524e233f7cec0c95b7e40f8cf017383183e9289 541 | Permission-Camera: ac603073e4128e51e6ca3c39129778f05b4082fa 542 | Permission-Contacts: 4bd4bdbbcec21ce0175e02cc4925070a773204cf 543 | Permission-FaceID: 9b1f0d42ee7aa2c830844964e739676fe6b634bd 544 | Permission-Microphone: f795f37089f6de4c71ae147b32770a5ebfdee08c 545 | Permission-PhotoLibrary: 0748c1a490fad126dfe36dbea8234dedfe59cc27 546 | Permission-Reminders: 26a287d1ac29db33c237af7dfbc2f3e786a58896 547 | RCTRequired: d9b1a9e6fa097744ca3ede59f86a35096df7202b 548 | RCTTypeSafety: c227cd061983e9e964115afbc4e8730d6a6f1395 549 | React: 86e972a20967ee4137aa19dc48319405927c2e94 550 | React-callinvoker: 87ee376c25277d74e164ff036b27084e343f3e69 551 | React-Core: f5ec03baf7ed58d9f3ee04a8f84e4c97ee8bf4c9 552 | React-CoreModules: 958898aa8c069280e866e35a2f29480a81fcf335 553 | React-cxxreact: 90de76b9b51575668ad7fd4e33a5a8c143beecc2 554 | React-jsi: b32a31da32e030f30bbf9a8d3a9c8325df9e793f 555 | React-jsiexecutor: 7ab9cdcdd18d57652fb041f8a147fe9658d4e00a 556 | React-jsinspector: 2e28bb487e42dda6c94dbfa0c648d1343767a0fb 557 | react-native-safe-area-context: f0906bf8bc9835ac9a9d3f97e8bde2a997d8da79 558 | React-RCTActionSheet: 1702a1a85e550b5c36e2e03cb2bd3adea053de95 559 | React-RCTAnimation: ddda576010a878865a4eab83a78acd92176ef6a1 560 | React-RCTBlob: 34334384284c81577409d5205bd2b9ff594d8ab6 561 | React-RCTImage: e2a661266dca295cffb33909cc64675a2efedb26 562 | React-RCTLinking: cd39b9b5e9cbb9e827854e30dfa92d7db074cea8 563 | React-RCTNetwork: 16939b7e4058d6f662b304a1f61689e249a2bfcc 564 | React-RCTSettings: 24726a62de0c326f9ebfc3838898a501b87ce711 565 | React-RCTText: 4f95d322b7e6da72817284abf8a2cdcec18b9cd8 566 | React-RCTVibration: f3a9123c244f35c40d3c9f3ec3f0b9e5717bb292 567 | ReactCommon: 2905859f84a94a381bb0d8dd3921ccb1a0047cb8 568 | RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489 569 | RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211 570 | RNPermissions: 7043bacbf928eae25808275cfe73799b8f618911 571 | RNReanimated: d9da990fc90123f4ffbfdda93d00fc15174863a8 572 | RNScreens: 21b73c94c9117e1110a79ee0ee80c93ccefed8ce 573 | Yoga: d5bd05a2b6b94c52323745c2c2b64557c8c66f64 574 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a 575 | 576 | PODFILE CHECKSUM: dd438b290090a76960cfa8e96e693e33dd249f78 577 | 578 | COCOAPODS: 1.11.2 579 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 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 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 12 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 13 | 24ADC1FD1BE814B42DF8EB79 /* libPods-ReactNativePermissionsExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C978EE75BC851AEEE339990 /* libPods-ReactNativePermissionsExample.a */; }; 14 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 19 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 20 | 00E356F21AD99517003FC87E /* ReactNativePermissionsExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReactNativePermissionsExampleTests.m; sourceTree = ""; }; 21 | 0C978EE75BC851AEEE339990 /* libPods-ReactNativePermissionsExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativePermissionsExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 11F594E4980370ED9BF524F2 /* Pods-ReactNativePermissionsExample-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativePermissionsExample-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-ReactNativePermissionsExample-tvOSTests/Pods-ReactNativePermissionsExample-tvOSTests.release.xcconfig"; sourceTree = ""; }; 23 | 13B07F961A680F5B00A75B9A /* ReactNativePermissionsExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReactNativePermissionsExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ReactNativePermissionsExample/AppDelegate.h; sourceTree = ""; }; 25 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = ReactNativePermissionsExample/AppDelegate.m; sourceTree = ""; }; 26 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ReactNativePermissionsExample/Images.xcassets; sourceTree = ""; }; 27 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativePermissionsExample/Info.plist; sourceTree = ""; }; 28 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ReactNativePermissionsExample/main.m; sourceTree = ""; }; 29 | 2AE6E76ED394152DFD952238 /* Pods-ReactNativePermissionsExample-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativePermissionsExample-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativePermissionsExample-tvOSTests/Pods-ReactNativePermissionsExample-tvOSTests.debug.xcconfig"; sourceTree = ""; }; 30 | 46819F88C4AAE1390657E932 /* libPods-ReactNativePermissionsExample-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativePermissionsExample-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 68CB9F08079E3C2644066FEC /* Pods-ReactNativePermissionsExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativePermissionsExample.release.xcconfig"; path = "Target Support Files/Pods-ReactNativePermissionsExample/Pods-ReactNativePermissionsExample.release.xcconfig"; sourceTree = ""; }; 32 | 713DBB95838FD2794504FFB7 /* libPods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 7C3D5738A1F90ED43D04334C /* Pods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests/Pods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.debug.xcconfig"; sourceTree = ""; }; 34 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativePermissionsExample/LaunchScreen.storyboard; sourceTree = ""; }; 35 | 955DDA95724EE8F90A075C37 /* Pods-ReactNativePermissionsExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativePermissionsExample.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativePermissionsExample/Pods-ReactNativePermissionsExample.debug.xcconfig"; sourceTree = ""; }; 36 | A9096DFFB514918B47CCCE54 /* Pods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.release.xcconfig"; path = "Target Support Files/Pods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests/Pods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.release.xcconfig"; sourceTree = ""; }; 37 | C06AA01B9B1F464726C57565 /* libPods-ReactNativePermissionsExample-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativePermissionsExample-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 39 | 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; }; 40 | FA9A6155B28962EA5D095732 /* Pods-ReactNativePermissionsExample-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativePermissionsExample-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativePermissionsExample-tvOS/Pods-ReactNativePermissionsExample-tvOS.debug.xcconfig"; sourceTree = ""; }; 41 | FD993CF7F7DF9144A001F9C8 /* Pods-ReactNativePermissionsExample-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativePermissionsExample-tvOS.release.xcconfig"; path = "Target Support Files/Pods-ReactNativePermissionsExample-tvOS/Pods-ReactNativePermissionsExample-tvOS.release.xcconfig"; sourceTree = ""; }; 42 | /* End PBXFileReference section */ 43 | 44 | /* Begin PBXFrameworksBuildPhase section */ 45 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 46 | isa = PBXFrameworksBuildPhase; 47 | buildActionMask = 2147483647; 48 | files = ( 49 | 24ADC1FD1BE814B42DF8EB79 /* libPods-ReactNativePermissionsExample.a in Frameworks */, 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | 00E356EF1AD99517003FC87E /* ReactNativePermissionsExampleTests */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | 00E356F21AD99517003FC87E /* ReactNativePermissionsExampleTests.m */, 60 | 00E356F01AD99517003FC87E /* Supporting Files */, 61 | ); 62 | path = ReactNativePermissionsExampleTests; 63 | sourceTree = ""; 64 | }; 65 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 00E356F11AD99517003FC87E /* Info.plist */, 69 | ); 70 | name = "Supporting Files"; 71 | sourceTree = ""; 72 | }; 73 | 13B07FAE1A68108700A75B9A /* ReactNativePermissionsExample */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 77 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 78 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 79 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 80 | 13B07FB61A68108700A75B9A /* Info.plist */, 81 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 82 | 13B07FB71A68108700A75B9A /* main.m */, 83 | ); 84 | name = ReactNativePermissionsExample; 85 | sourceTree = ""; 86 | }; 87 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 91 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */, 92 | 0C978EE75BC851AEEE339990 /* libPods-ReactNativePermissionsExample.a */, 93 | 713DBB95838FD2794504FFB7 /* libPods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.a */, 94 | C06AA01B9B1F464726C57565 /* libPods-ReactNativePermissionsExample-tvOS.a */, 95 | 46819F88C4AAE1390657E932 /* libPods-ReactNativePermissionsExample-tvOSTests.a */, 96 | ); 97 | name = Frameworks; 98 | sourceTree = ""; 99 | }; 100 | 802A04D489295524A7725078 /* Pods */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 955DDA95724EE8F90A075C37 /* Pods-ReactNativePermissionsExample.debug.xcconfig */, 104 | 68CB9F08079E3C2644066FEC /* Pods-ReactNativePermissionsExample.release.xcconfig */, 105 | 7C3D5738A1F90ED43D04334C /* Pods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.debug.xcconfig */, 106 | A9096DFFB514918B47CCCE54 /* Pods-ReactNativePermissionsExample-ReactNativePermissionsExampleTests.release.xcconfig */, 107 | FA9A6155B28962EA5D095732 /* Pods-ReactNativePermissionsExample-tvOS.debug.xcconfig */, 108 | FD993CF7F7DF9144A001F9C8 /* Pods-ReactNativePermissionsExample-tvOS.release.xcconfig */, 109 | 2AE6E76ED394152DFD952238 /* Pods-ReactNativePermissionsExample-tvOSTests.debug.xcconfig */, 110 | 11F594E4980370ED9BF524F2 /* Pods-ReactNativePermissionsExample-tvOSTests.release.xcconfig */, 111 | ); 112 | path = Pods; 113 | sourceTree = ""; 114 | }; 115 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | ); 119 | name = Libraries; 120 | sourceTree = ""; 121 | }; 122 | 83CBB9F61A601CBA00E9B192 = { 123 | isa = PBXGroup; 124 | children = ( 125 | 13B07FAE1A68108700A75B9A /* ReactNativePermissionsExample */, 126 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 127 | 00E356EF1AD99517003FC87E /* ReactNativePermissionsExampleTests */, 128 | 83CBBA001A601CBA00E9B192 /* Products */, 129 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 130 | 802A04D489295524A7725078 /* Pods */, 131 | ); 132 | indentWidth = 2; 133 | sourceTree = ""; 134 | tabWidth = 2; 135 | usesTabs = 0; 136 | }; 137 | 83CBBA001A601CBA00E9B192 /* Products */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 13B07F961A680F5B00A75B9A /* ReactNativePermissionsExample.app */, 141 | ); 142 | name = Products; 143 | sourceTree = ""; 144 | }; 145 | /* End PBXGroup section */ 146 | 147 | /* Begin PBXNativeTarget section */ 148 | 13B07F861A680F5B00A75B9A /* ReactNativePermissionsExample */ = { 149 | isa = PBXNativeTarget; 150 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativePermissionsExample" */; 151 | buildPhases = ( 152 | 87021B4B19578F8A3278A4E4 /* [CP] Check Pods Manifest.lock */, 153 | FD10A7F022414F080027D42C /* Start Packager */, 154 | 13B07F871A680F5B00A75B9A /* Sources */, 155 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 156 | 13B07F8E1A680F5B00A75B9A /* Resources */, 157 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 158 | 3DF3D3DF3A20288CF235769D /* [CP] Embed Pods Frameworks */, 159 | 750E086C4A6F997C2384BFE9 /* [CP] Copy Pods Resources */, 160 | ); 161 | buildRules = ( 162 | ); 163 | dependencies = ( 164 | ); 165 | name = ReactNativePermissionsExample; 166 | productName = ReactNativePermissionsExample; 167 | productReference = 13B07F961A680F5B00A75B9A /* ReactNativePermissionsExample.app */; 168 | productType = "com.apple.product-type.application"; 169 | }; 170 | /* End PBXNativeTarget section */ 171 | 172 | /* Begin PBXProject section */ 173 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 174 | isa = PBXProject; 175 | attributes = { 176 | LastUpgradeCheck = 1130; 177 | TargetAttributes = { 178 | 13B07F861A680F5B00A75B9A = { 179 | DevelopmentTeam = LUBGWANK4N; 180 | LastSwiftMigration = 1120; 181 | }; 182 | }; 183 | }; 184 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativePermissionsExample" */; 185 | compatibilityVersion = "Xcode 3.2"; 186 | developmentRegion = en; 187 | hasScannedForEncodings = 0; 188 | knownRegions = ( 189 | en, 190 | Base, 191 | ); 192 | mainGroup = 83CBB9F61A601CBA00E9B192; 193 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 194 | projectDirPath = ""; 195 | projectRoot = ""; 196 | targets = ( 197 | 13B07F861A680F5B00A75B9A /* ReactNativePermissionsExample */, 198 | ); 199 | }; 200 | /* End PBXProject section */ 201 | 202 | /* Begin PBXResourcesBuildPhase section */ 203 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 204 | isa = PBXResourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 208 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXResourcesBuildPhase section */ 213 | 214 | /* Begin PBXShellScriptBuildPhase section */ 215 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 216 | isa = PBXShellScriptBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | ); 220 | inputPaths = ( 221 | ); 222 | name = "Bundle React Native code and images"; 223 | outputPaths = ( 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | shellPath = /bin/sh; 227 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 228 | }; 229 | 3DF3D3DF3A20288CF235769D /* [CP] Embed Pods Frameworks */ = { 230 | isa = PBXShellScriptBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | ); 234 | inputPaths = ( 235 | "${PODS_ROOT}/Target Support Files/Pods-ReactNativePermissionsExample/Pods-ReactNativePermissionsExample-frameworks.sh", 236 | "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", 237 | ); 238 | name = "[CP] Embed Pods Frameworks"; 239 | outputPaths = ( 240 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | shellPath = /bin/sh; 244 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativePermissionsExample/Pods-ReactNativePermissionsExample-frameworks.sh\"\n"; 245 | showEnvVarsInLog = 0; 246 | }; 247 | 750E086C4A6F997C2384BFE9 /* [CP] Copy Pods Resources */ = { 248 | isa = PBXShellScriptBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | ); 252 | inputPaths = ( 253 | "${PODS_ROOT}/Target Support Files/Pods-ReactNativePermissionsExample/Pods-ReactNativePermissionsExample-resources.sh", 254 | "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", 255 | ); 256 | name = "[CP] Copy Pods Resources"; 257 | outputPaths = ( 258 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | shellPath = /bin/sh; 262 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativePermissionsExample/Pods-ReactNativePermissionsExample-resources.sh\"\n"; 263 | showEnvVarsInLog = 0; 264 | }; 265 | 87021B4B19578F8A3278A4E4 /* [CP] Check Pods Manifest.lock */ = { 266 | isa = PBXShellScriptBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | ); 270 | inputFileListPaths = ( 271 | ); 272 | inputPaths = ( 273 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 274 | "${PODS_ROOT}/Manifest.lock", 275 | ); 276 | name = "[CP] Check Pods Manifest.lock"; 277 | outputFileListPaths = ( 278 | ); 279 | outputPaths = ( 280 | "$(DERIVED_FILE_DIR)/Pods-ReactNativePermissionsExample-checkManifestLockResult.txt", 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | shellPath = /bin/sh; 284 | 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"; 285 | showEnvVarsInLog = 0; 286 | }; 287 | FD10A7F022414F080027D42C /* Start Packager */ = { 288 | isa = PBXShellScriptBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | ); 292 | inputFileListPaths = ( 293 | ); 294 | inputPaths = ( 295 | ); 296 | name = "Start Packager"; 297 | outputFileListPaths = ( 298 | ); 299 | outputPaths = ( 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | shellPath = /bin/sh; 303 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 304 | showEnvVarsInLog = 0; 305 | }; 306 | /* End PBXShellScriptBuildPhase section */ 307 | 308 | /* Begin PBXSourcesBuildPhase section */ 309 | 13B07F871A680F5B00A75B9A /* Sources */ = { 310 | isa = PBXSourcesBuildPhase; 311 | buildActionMask = 2147483647; 312 | files = ( 313 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 314 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 315 | ); 316 | runOnlyForDeploymentPostprocessing = 0; 317 | }; 318 | /* End PBXSourcesBuildPhase section */ 319 | 320 | /* Begin XCBuildConfiguration section */ 321 | 13B07F941A680F5B00A75B9A /* Debug */ = { 322 | isa = XCBuildConfiguration; 323 | baseConfigurationReference = 955DDA95724EE8F90A075C37 /* Pods-ReactNativePermissionsExample.debug.xcconfig */; 324 | buildSettings = { 325 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 326 | CLANG_ENABLE_MODULES = YES; 327 | CURRENT_PROJECT_VERSION = 1; 328 | DEVELOPMENT_TEAM = LUBGWANK4N; 329 | ENABLE_BITCODE = NO; 330 | INFOPLIST_FILE = ReactNativePermissionsExample/Info.plist; 331 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 332 | LIBRARY_SEARCH_PATHS = ( 333 | "$(SDKROOT)/usr/lib/swift", 334 | "$(inherited)", 335 | ); 336 | OTHER_LDFLAGS = ( 337 | "$(inherited)", 338 | "-ObjC", 339 | "-lc++", 340 | ); 341 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 342 | PRODUCT_NAME = ReactNativePermissionsExample; 343 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 344 | SWIFT_VERSION = 5.0; 345 | TARGETED_DEVICE_FAMILY = "1,2"; 346 | VERSIONING_SYSTEM = "apple-generic"; 347 | }; 348 | name = Debug; 349 | }; 350 | 13B07F951A680F5B00A75B9A /* Release */ = { 351 | isa = XCBuildConfiguration; 352 | baseConfigurationReference = 68CB9F08079E3C2644066FEC /* Pods-ReactNativePermissionsExample.release.xcconfig */; 353 | buildSettings = { 354 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 355 | CLANG_ENABLE_MODULES = YES; 356 | CURRENT_PROJECT_VERSION = 1; 357 | DEVELOPMENT_TEAM = LUBGWANK4N; 358 | INFOPLIST_FILE = ReactNativePermissionsExample/Info.plist; 359 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 360 | LIBRARY_SEARCH_PATHS = ( 361 | "$(SDKROOT)/usr/lib/swift", 362 | "$(inherited)", 363 | ); 364 | OTHER_LDFLAGS = ( 365 | "$(inherited)", 366 | "-ObjC", 367 | "-lc++", 368 | ); 369 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 370 | PRODUCT_NAME = ReactNativePermissionsExample; 371 | SWIFT_VERSION = 5.0; 372 | TARGETED_DEVICE_FAMILY = "1,2"; 373 | VERSIONING_SYSTEM = "apple-generic"; 374 | }; 375 | name = Release; 376 | }; 377 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 382 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 383 | CLANG_CXX_LIBRARY = "libc++"; 384 | CLANG_ENABLE_MODULES = YES; 385 | CLANG_ENABLE_OBJC_ARC = YES; 386 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 387 | CLANG_WARN_BOOL_CONVERSION = YES; 388 | CLANG_WARN_COMMA = YES; 389 | CLANG_WARN_CONSTANT_CONVERSION = YES; 390 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 391 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 392 | CLANG_WARN_EMPTY_BODY = YES; 393 | CLANG_WARN_ENUM_CONVERSION = YES; 394 | CLANG_WARN_INFINITE_RECURSION = YES; 395 | CLANG_WARN_INT_CONVERSION = YES; 396 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 397 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 398 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 399 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 400 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 401 | CLANG_WARN_STRICT_PROTOTYPES = YES; 402 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 403 | CLANG_WARN_UNREACHABLE_CODE = YES; 404 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 405 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 406 | COPY_PHASE_STRIP = NO; 407 | ENABLE_STRICT_OBJC_MSGSEND = YES; 408 | ENABLE_TESTABILITY = YES; 409 | GCC_C_LANGUAGE_STANDARD = gnu99; 410 | GCC_DYNAMIC_NO_PIC = NO; 411 | GCC_NO_COMMON_BLOCKS = YES; 412 | GCC_OPTIMIZATION_LEVEL = 0; 413 | GCC_PREPROCESSOR_DEFINITIONS = ( 414 | "DEBUG=1", 415 | "$(inherited)", 416 | ); 417 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 418 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 419 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 420 | GCC_WARN_UNDECLARED_SELECTOR = YES; 421 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 422 | GCC_WARN_UNUSED_FUNCTION = YES; 423 | GCC_WARN_UNUSED_VARIABLE = YES; 424 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 425 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; 426 | LIBRARY_SEARCH_PATHS = ( 427 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 428 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 429 | "\"$(inherited)\"", 430 | ); 431 | MTL_ENABLE_DEBUG_INFO = YES; 432 | ONLY_ACTIVE_ARCH = YES; 433 | SDKROOT = iphoneos; 434 | }; 435 | name = Debug; 436 | }; 437 | 83CBBA211A601CBA00E9B192 /* Release */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ALWAYS_SEARCH_USER_PATHS = NO; 441 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 442 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 443 | CLANG_CXX_LIBRARY = "libc++"; 444 | CLANG_ENABLE_MODULES = YES; 445 | CLANG_ENABLE_OBJC_ARC = YES; 446 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 447 | CLANG_WARN_BOOL_CONVERSION = YES; 448 | CLANG_WARN_COMMA = YES; 449 | CLANG_WARN_CONSTANT_CONVERSION = YES; 450 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 451 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 452 | CLANG_WARN_EMPTY_BODY = YES; 453 | CLANG_WARN_ENUM_CONVERSION = YES; 454 | CLANG_WARN_INFINITE_RECURSION = YES; 455 | CLANG_WARN_INT_CONVERSION = YES; 456 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 457 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 458 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 459 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 460 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 461 | CLANG_WARN_STRICT_PROTOTYPES = YES; 462 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 463 | CLANG_WARN_UNREACHABLE_CODE = YES; 464 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 465 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 466 | COPY_PHASE_STRIP = YES; 467 | ENABLE_NS_ASSERTIONS = NO; 468 | ENABLE_STRICT_OBJC_MSGSEND = YES; 469 | GCC_C_LANGUAGE_STANDARD = gnu99; 470 | GCC_NO_COMMON_BLOCKS = YES; 471 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 472 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 473 | GCC_WARN_UNDECLARED_SELECTOR = YES; 474 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 475 | GCC_WARN_UNUSED_FUNCTION = YES; 476 | GCC_WARN_UNUSED_VARIABLE = YES; 477 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 478 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; 479 | LIBRARY_SEARCH_PATHS = ( 480 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 481 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 482 | "\"$(inherited)\"", 483 | ); 484 | MTL_ENABLE_DEBUG_INFO = NO; 485 | SDKROOT = iphoneos; 486 | VALIDATE_PRODUCT = YES; 487 | }; 488 | name = Release; 489 | }; 490 | /* End XCBuildConfiguration section */ 491 | 492 | /* Begin XCConfigurationList section */ 493 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativePermissionsExample" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | 13B07F941A680F5B00A75B9A /* Debug */, 497 | 13B07F951A680F5B00A75B9A /* Release */, 498 | ); 499 | defaultConfigurationIsVisible = 0; 500 | defaultConfigurationName = Release; 501 | }; 502 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativePermissionsExample" */ = { 503 | isa = XCConfigurationList; 504 | buildConfigurations = ( 505 | 83CBBA201A601CBA00E9B192 /* Debug */, 506 | 83CBBA211A601CBA00E9B192 /* Release */, 507 | ); 508 | defaultConfigurationIsVisible = 0; 509 | defaultConfigurationName = Release; 510 | }; 511 | /* End XCConfigurationList section */ 512 | }; 513 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 514 | } 515 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample.xcodeproj/xcshareddata/xcschemes/ReactNativePermissionsExample-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample.xcodeproj/xcshareddata/xcschemes/ReactNativePermissionsExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | #import 5 | #import 6 | 7 | #ifdef FB_SONARKIT_ENABLED 8 | #import 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | static void InitializeFlipper(UIApplication *application) { 16 | FlipperClient *client = [FlipperClient sharedClient]; 17 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; 18 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; 19 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; 20 | [client addPlugin:[FlipperKitReactPlugin new]]; 21 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; 22 | [client start]; 23 | } 24 | #endif 25 | 26 | @implementation AppDelegate 27 | 28 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 29 | { 30 | #ifdef FB_SONARKIT_ENABLED 31 | InitializeFlipper(application); 32 | #endif 33 | 34 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 35 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 36 | moduleName:@"ReactNativePermissionsExample" 37 | initialProperties:nil]; 38 | 39 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 40 | 41 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 42 | UIViewController *rootViewController = [UIViewController new]; 43 | rootViewController.view = rootView; 44 | self.window.rootViewController = rootViewController; 45 | [self.window makeKeyAndVisible]; 46 | return YES; 47 | } 48 | 49 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 50 | { 51 | #if DEBUG 52 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 53 | #else 54 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 55 | #endif 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iremkaraoglu/ReactNative-Permissions-Example/8971ccb76bee230e9109c63bfb0a39785d43a97d/ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]} -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | RN Permissions 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSCalendarsUsageDescription 41 | Calendar Permission Description 42 | NSPhotoLibraryUsageDescription 43 | Photos Permission Description 44 | NSCameraUsageDescription 45 | Camera Permission Description 46 | NSContactsUsageDescription 47 | Contacts Permission Description 48 | NSFaceIDUsageDescription 49 | Face ID Permission Description 50 | NSMicrophoneUsageDescription 51 | Microphone Permission Description 52 | NSRemindersUsageDescription 53 | Reminders Permission Description 54 | UILaunchStoryboardName 55 | LaunchScreen 56 | UIRequiredDeviceCapabilities 57 | 58 | armv7 59 | 60 | UISupportedInterfaceOrientations 61 | 62 | UIInterfaceOrientationPortrait 63 | 64 | UIViewControllerBasedStatusBarAppearance 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExample/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/ReactNativePermissionsExampleTests/ReactNativePermissionsExampleTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface ReactNativePermissionsExampleTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation ReactNativePermissionsExampleTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 38 | if (level >= RCTLogLevelError) { 39 | redboxError = message; 40 | } 41 | }); 42 | #endif 43 | 44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | 48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 50 | return YES; 51 | } 52 | return NO; 53 | }]; 54 | } 55 | 56 | #ifdef DEBUG 57 | RCTSetLogFunction(RCTDefaultLogFunction); 58 | #endif 59 | 60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 62 | } 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactNativePermissionsExample", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "start": "react-native start", 9 | "test": "jest", 10 | "lint": "eslint ." 11 | }, 12 | "dependencies": { 13 | "@react-native-community/masked-view": "^0.1.11", 14 | "@react-navigation/native": "^5.9.4", 15 | "@react-navigation/stack": "^5.14.5", 16 | "@types/react-native": "^0.64.12", 17 | "react": "16.13.1", 18 | "react-native": "0.63.1", 19 | "react-native-gesture-handler": "^1.10.3", 20 | "react-native-permissions": "^3.0.5", 21 | "react-native-reanimated": "^2.2.0", 22 | "react-native-safe-area-context": "^3.2.0", 23 | "react-native-screens": "^3.4.0" 24 | }, 25 | "devDependencies": { 26 | "@babel/core": "^7.14.6", 27 | "@babel/runtime": "^7.14.6", 28 | "@react-native-community/eslint-config": "^3.0.0", 29 | "babel-jest": "^27.0.6", 30 | "eslint": "^7.31.0", 31 | "jest": "^27.0.6", 32 | "metro-react-native-babel-preset": "^0.66.1", 33 | "react-test-renderer": "16.13.1" 34 | }, 35 | "jest": { 36 | "preset": "react-native" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /screens/calendarPermission.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | StyleSheet, 4 | View, 5 | Text, 6 | StatusBar, 7 | Platform, 8 | ScrollView, 9 | } from 'react-native'; 10 | import {SafeAreaView} from 'react-native-safe-area-context'; 11 | import {request, PERMISSIONS} from 'react-native-permissions'; 12 | 13 | export default function CalendarPermissionScreen() { 14 | const [permissionResult, setPermissionResult] = React.useState('Not asked'); 15 | 16 | React.useEffect(() => { 17 | request( 18 | Platform.OS === 'ios' 19 | ? PERMISSIONS.IOS.CALENDARS 20 | : PERMISSIONS.ANDROID.WRITE_CALENDAR, 21 | ).then((result) => { 22 | setPermissionResult(result); 23 | console.log(result); 24 | }); 25 | }, []); 26 | 27 | return ( 28 | <> 29 | 30 | 31 | 32 | Calendar Permission Needed 33 | 34 | This app needs access to your calendar. If you are not comfortable 35 | with this permission, you can go to settings and modify it at any 36 | time. 37 | 38 | 39 | 49 | Permission Result: 50 | 51 | 61 | {permissionResult} 62 | 63 | 64 | 65 | UNAVAILABLE: 66 | 67 | This feature is not available (on this device / in this context) 68 | 69 | 70 | 71 | DENIED: 72 | 73 | The permission has not been requested / is denied but requestable 74 | 75 | 76 | 77 | GRANTED: 78 | The permission is granted 79 | 80 | 81 | LIMITED: 82 | 83 | The permission is granted but with limitations 84 | 85 | 86 | 87 | BLOCKED: 88 | 89 | The permission is denied and not requestable anymore 90 | 91 | 92 | 93 | 94 | 95 | ); 96 | } 97 | const styles = StyleSheet.create({ 98 | root: {backgroundColor: '#4A266A', flex: 1}, 99 | container: { 100 | alignContent: 'center', 101 | alignSelf: 'center', 102 | marginHorizontal: 16, 103 | marginTop: 40, 104 | }, 105 | title: { 106 | fontSize: 24, 107 | fontWeight: '800', 108 | alignSelf: 'center', 109 | color: '#FFD9E8', 110 | }, 111 | description: { 112 | fontSize: 16, 113 | marginHorizontal: 16, 114 | fontWeight: '600', 115 | alignSelf: 'center', 116 | marginTop: 24, 117 | marginBottom: 16, 118 | color: '#FFD9E8', 119 | }, 120 | row: {flexDirection: 'row'}, 121 | results: {marginHorizontal: 16}, 122 | resultTitle: { 123 | fontSize: 18, 124 | fontWeight: '600', 125 | color: '#FFD9E8', 126 | marginVertical: 8, 127 | }, 128 | resultInfo: {fontSize: 18, fontWeight: '600', color: '#DE95BA'}, 129 | }); 130 | -------------------------------------------------------------------------------- /screens/camPermission.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | StyleSheet, 4 | View, 5 | Text, 6 | StatusBar, 7 | Platform, 8 | ScrollView, 9 | } from 'react-native'; 10 | import {SafeAreaView} from 'react-native-safe-area-context'; 11 | import {request, PERMISSIONS} from 'react-native-permissions'; 12 | 13 | export default function CameraPermissionScreen() { 14 | const [permissionResult, setPermissionResult] = React.useState('Not asked'); 15 | 16 | React.useEffect(() => { 17 | request( 18 | Platform.OS === 'ios' 19 | ? PERMISSIONS.IOS.CAMERA 20 | : PERMISSIONS.ANDROID.CAMERA, 21 | ).then((result) => { 22 | setPermissionResult(result); 23 | console.log(result); 24 | }); 25 | }, []); 26 | 27 | return ( 28 | <> 29 | 30 | 31 | 32 | Camera Permission Needed 33 | 34 | This app needs access to your camera. If you are not comfortable 35 | with this permission, you can go to settings and modify it at any 36 | time. 37 | 38 | 39 | 49 | Permission Result: 50 | 51 | 61 | {permissionResult} 62 | 63 | 64 | 65 | UNAVAILABLE: 66 | 67 | This feature is not available (on this device / in this context) 68 | 69 | 70 | 71 | DENIED: 72 | 73 | The permission has not been requested / is denied but requestable 74 | 75 | 76 | 77 | GRANTED: 78 | The permission is granted 79 | 80 | 81 | LIMITED: 82 | 83 | The permission is granted but with limitations 84 | 85 | 86 | 87 | BLOCKED: 88 | 89 | The permission is denied and not requestable anymore 90 | 91 | 92 | 93 | 94 | 95 | ); 96 | } 97 | const styles = StyleSheet.create({ 98 | root: {backgroundColor: '#4A266A', flex: 1}, 99 | container: { 100 | alignContent: 'center', 101 | alignSelf: 'center', 102 | marginHorizontal: 16, 103 | marginTop: 40, 104 | }, 105 | title: { 106 | fontSize: 24, 107 | fontWeight: '800', 108 | alignSelf: 'center', 109 | color: '#FFD9E8', 110 | }, 111 | description: { 112 | fontSize: 16, 113 | marginHorizontal: 16, 114 | fontWeight: '600', 115 | alignSelf: 'center', 116 | marginTop: 24, 117 | marginBottom: 16, 118 | color: '#FFD9E8', 119 | }, 120 | row: {flexDirection: 'row'}, 121 | results: {marginHorizontal: 16}, 122 | resultTitle: { 123 | fontSize: 18, 124 | fontWeight: '600', 125 | color: '#FFD9E8', 126 | marginVertical: 8, 127 | }, 128 | resultInfo: {fontSize: 18, fontWeight: '600', color: '#DE95BA'}, 129 | }); 130 | -------------------------------------------------------------------------------- /screens/contactsPermission.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | StyleSheet, 4 | View, 5 | Text, 6 | StatusBar, 7 | Platform, 8 | ScrollView, 9 | } from 'react-native'; 10 | import {SafeAreaView} from 'react-native-safe-area-context'; 11 | import {request, PERMISSIONS} from 'react-native-permissions'; 12 | 13 | export default function ContactsPermissionScreen() { 14 | const [permissionResult, setPermissionResult] = React.useState('Not asked'); 15 | 16 | React.useEffect(() => { 17 | request( 18 | Platform.OS === 'ios' 19 | ? PERMISSIONS.IOS.CONTACTS 20 | : PERMISSIONS.ANDROID.WRITE_CONTACTS, 21 | ).then((result) => { 22 | setPermissionResult(result); 23 | console.log(result); 24 | }); 25 | }, []); 26 | 27 | return ( 28 | <> 29 | 30 | 31 | 32 | Contacts Permission Needed 33 | 34 | This app needs access to your contacts. If you are not comfortable 35 | with this permission, you can go to settings and modify it at any 36 | time. 37 | 38 | 39 | 49 | Permission Result: 50 | 51 | 61 | {permissionResult} 62 | 63 | 64 | 65 | UNAVAILABLE: 66 | 67 | This feature is not available (on this device / in this context) 68 | 69 | 70 | 71 | DENIED: 72 | 73 | The permission has not been requested / is denied but requestable 74 | 75 | 76 | 77 | GRANTED: 78 | The permission is granted 79 | 80 | 81 | LIMITED: 82 | 83 | The permission is granted but with limitations 84 | 85 | 86 | 87 | BLOCKED: 88 | 89 | The permission is denied and not requestable anymore 90 | 91 | 92 | 93 | 94 | 95 | ); 96 | } 97 | const styles = StyleSheet.create({ 98 | root: {backgroundColor: '#4A266A', flex: 1}, 99 | container: { 100 | alignContent: 'center', 101 | alignSelf: 'center', 102 | marginHorizontal: 16, 103 | marginTop: 40, 104 | }, 105 | title: { 106 | fontSize: 24, 107 | fontWeight: '800', 108 | alignSelf: 'center', 109 | color: '#FFD9E8', 110 | }, 111 | description: { 112 | fontSize: 16, 113 | marginHorizontal: 16, 114 | fontWeight: '600', 115 | alignSelf: 'center', 116 | marginTop: 24, 117 | marginBottom: 16, 118 | color: '#FFD9E8', 119 | }, 120 | row: {flexDirection: 'row'}, 121 | results: {marginHorizontal: 16}, 122 | resultTitle: { 123 | fontSize: 18, 124 | fontWeight: '600', 125 | color: '#FFD9E8', 126 | marginVertical: 8, 127 | }, 128 | resultInfo: {fontSize: 18, fontWeight: '600', color: '#DE95BA'}, 129 | }); 130 | -------------------------------------------------------------------------------- /screens/faceIDpermission.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | StyleSheet, 4 | View, 5 | Text, 6 | StatusBar, 7 | Platform, 8 | ScrollView, 9 | } from 'react-native'; 10 | import {SafeAreaView} from 'react-native-safe-area-context'; 11 | import {request, PERMISSIONS} from 'react-native-permissions'; 12 | 13 | export default function FaceIDPermissionScreen() { 14 | const [permissionResult, setPermissionResult] = React.useState('Not asked'); 15 | 16 | React.useEffect(() => { 17 | request(PERMISSIONS.IOS.FACE_ID).then((result) => { 18 | setPermissionResult(result); 19 | console.log(result); 20 | }); 21 | }, []); 22 | 23 | return ( 24 | <> 25 | 26 | 27 | 28 | Face ID Permission Needed 29 | 30 | This app needs access to your face ID. If you are not comfortable 31 | with this permission, you can go to settings and modify it at any 32 | time. 33 | 34 | 35 | 45 | Permission Result: 46 | 47 | 57 | {permissionResult} 58 | 59 | 60 | 61 | UNAVAILABLE: 62 | 63 | This feature is not available (on this device / in this context) 64 | 65 | 66 | 67 | DENIED: 68 | 69 | The permission has not been requested / is denied but requestable 70 | 71 | 72 | 73 | GRANTED: 74 | The permission is granted 75 | 76 | 77 | LIMITED: 78 | 79 | The permission is granted but with limitations 80 | 81 | 82 | 83 | BLOCKED: 84 | 85 | The permission is denied and not requestable anymore 86 | 87 | 88 | 89 | 90 | 91 | ); 92 | } 93 | const styles = StyleSheet.create({ 94 | root: {backgroundColor: '#4A266A', flex: 1}, 95 | container: { 96 | alignContent: 'center', 97 | alignSelf: 'center', 98 | marginHorizontal: 16, 99 | marginTop: 40, 100 | }, 101 | title: { 102 | fontSize: 24, 103 | fontWeight: '800', 104 | alignSelf: 'center', 105 | color: '#FFD9E8', 106 | }, 107 | description: { 108 | fontSize: 16, 109 | marginHorizontal: 16, 110 | fontWeight: '600', 111 | alignSelf: 'center', 112 | marginTop: 24, 113 | marginBottom: 16, 114 | color: '#FFD9E8', 115 | }, 116 | row: {flexDirection: 'row'}, 117 | results: {marginHorizontal: 16}, 118 | resultTitle: { 119 | fontSize: 18, 120 | fontWeight: '600', 121 | color: '#FFD9E8', 122 | marginVertical: 8, 123 | }, 124 | resultInfo: {fontSize: 18, fontWeight: '600', color: '#DE95BA'}, 125 | }); 126 | -------------------------------------------------------------------------------- /screens/micPermission.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | StyleSheet, 4 | View, 5 | Text, 6 | StatusBar, 7 | ScrollView, 8 | Platform, 9 | } from 'react-native'; 10 | import {SafeAreaView} from 'react-native-safe-area-context'; 11 | import {request, PERMISSIONS} from 'react-native-permissions'; 12 | 13 | export default function MicrophonePermissionScreen() { 14 | const [permissionResult, setPermissionResult] = React.useState('Not asked'); 15 | 16 | React.useEffect(() => { 17 | request( 18 | Platform.OS === 'ios' 19 | ? PERMISSIONS.IOS.MICROPHONE 20 | : PERMISSIONS.ANDROID.RECORD_AUDIO, 21 | ).then((result) => { 22 | setPermissionResult(result); 23 | console.log(result); 24 | }); 25 | }, []); 26 | 27 | return ( 28 | <> 29 | 30 | 31 | 32 | Microphone Permission Needed 33 | 34 | This app needs access to your microphone. If you are not comfortable 35 | with this permission, you can go to settings and modify it at any 36 | time. 37 | 38 | 39 | 49 | Permission Result: 50 | 51 | 61 | {permissionResult} 62 | 63 | 64 | 65 | UNAVAILABLE: 66 | 67 | This feature is not available (on this device / in this context) 68 | 69 | 70 | 71 | DENIED: 72 | 73 | The permission has not been requested / is denied but requestable 74 | 75 | 76 | 77 | GRANTED: 78 | The permission is granted 79 | 80 | 81 | LIMITED: 82 | 83 | The permission is granted but with limitations 84 | 85 | 86 | 87 | BLOCKED: 88 | 89 | The permission is denied and not requestable anymore 90 | 91 | 92 | 93 | 94 | 95 | ); 96 | } 97 | const styles = StyleSheet.create({ 98 | root: {backgroundColor: '#4A266A', flex: 1}, 99 | container: { 100 | alignContent: 'center', 101 | alignSelf: 'center', 102 | marginHorizontal: 16, 103 | marginTop: 40, 104 | }, 105 | title: { 106 | fontSize: 24, 107 | fontWeight: '800', 108 | alignSelf: 'center', 109 | color: '#FFD9E8', 110 | }, 111 | description: { 112 | fontSize: 16, 113 | marginHorizontal: 16, 114 | fontWeight: '600', 115 | alignSelf: 'center', 116 | marginTop: 24, 117 | marginBottom: 16, 118 | color: '#FFD9E8', 119 | }, 120 | row: {flexDirection: 'row'}, 121 | results: {marginHorizontal: 16}, 122 | resultTitle: { 123 | fontSize: 18, 124 | fontWeight: '600', 125 | color: '#FFD9E8', 126 | marginVertical: 8, 127 | }, 128 | resultInfo: {fontSize: 18, fontWeight: '600', color: '#DE95BA'}, 129 | }); 130 | -------------------------------------------------------------------------------- /screens/permissionList.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | StyleSheet, 4 | View, 5 | Text, 6 | StatusBar, 7 | TouchableOpacity, 8 | Platform, 9 | } from 'react-native'; 10 | import {SafeAreaView} from 'react-native-safe-area-context'; 11 | 12 | export default function PermissionsList({navigation}) { 13 | return ( 14 | <> 15 | 16 | 17 | 18 | Permission List 19 | navigation.navigate('CameraPermission')}> 22 | Camera 23 | 24 | navigation.navigate('MicrophonePermission')}> 27 | Microphone 28 | 29 | navigation.navigate('ContactsPermission')}> 32 | Contacts 33 | 34 | navigation.navigate('CalendarPermission')}> 37 | Calendar 38 | 39 | {Platform.OS === 'android' && ( 40 | navigation.navigate('SendSMSPermission')}> 43 | Messages 44 | 45 | )} 46 | {Platform.OS === 'ios' && ( 47 | <> 48 | navigation.navigate('FaceIDPermission')}> 51 | Face ID 52 | 53 | navigation.navigate('ReminderPermission')}> 56 | Reminders 57 | 58 | navigation.navigate('PhotosPermission')}> 61 | Photos Library 62 | 63 | 64 | )} 65 | 66 | 67 | 68 | ); 69 | } 70 | const styles = StyleSheet.create({ 71 | root: {backgroundColor: '#4A266A', flex: 1}, 72 | container: { 73 | alignContent: 'center', 74 | alignSelf: 'center', 75 | marginHorizontal: 16, 76 | marginTop: 32, 77 | }, 78 | title: { 79 | fontSize: 24, 80 | fontWeight: '800', 81 | alignSelf: 'center', 82 | color: '#FFD9E8', 83 | }, 84 | button: { 85 | backgroundColor: '#7F4A88', 86 | borderRadius: 32, 87 | justifyContent: 'center', 88 | marginTop: 24, 89 | alignSelf: 'center', 90 | width: 160, 91 | }, 92 | buttonText: { 93 | justifyContent: 'center', 94 | alignSelf: 'center', 95 | alignContent: 'center', 96 | fontSize: 18, 97 | fontWeight: '600', 98 | color: '#FFD9E8', 99 | margin: 16, 100 | }, 101 | }); 102 | -------------------------------------------------------------------------------- /screens/photosPermission.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | StyleSheet, 4 | View, 5 | Text, 6 | StatusBar, 7 | Platform, 8 | ScrollView, 9 | } from 'react-native'; 10 | import {SafeAreaView} from 'react-native-safe-area-context'; 11 | import {request, PERMISSIONS} from 'react-native-permissions'; 12 | 13 | export default function PhotoLibraryPermissionScreen() { 14 | const [permissionResult, setPermissionResult] = React.useState('Not asked'); 15 | 16 | React.useEffect(() => { 17 | request(PERMISSIONS.IOS.PHOTO_LIBRARY).then((result) => { 18 | setPermissionResult(result); 19 | console.log(result); 20 | }); 21 | }, []); 22 | 23 | return ( 24 | <> 25 | 26 | 27 | 28 | Photos Library Permission Needed 29 | 30 | This app needs access to your Photos. If you are not comfortable 31 | with this permission, you can go to settings and modify it at any 32 | time. 33 | 34 | 35 | 45 | Permission Result: 46 | 47 | 57 | {permissionResult} 58 | 59 | 60 | 61 | UNAVAILABLE: 62 | 63 | This feature is not available (on this device / in this context) 64 | 65 | 66 | 67 | DENIED: 68 | 69 | The permission has not been requested / is denied but requestable 70 | 71 | 72 | 73 | GRANTED: 74 | The permission is granted 75 | 76 | 77 | LIMITED: 78 | 79 | The permission is granted but with limitations 80 | 81 | 82 | 83 | BLOCKED: 84 | 85 | The permission is denied and not requestable anymore 86 | 87 | 88 | 89 | 90 | 91 | ); 92 | } 93 | const styles = StyleSheet.create({ 94 | root: {backgroundColor: '#4A266A', flex: 1}, 95 | container: { 96 | alignContent: 'center', 97 | alignSelf: 'center', 98 | marginHorizontal: 16, 99 | marginTop: 40, 100 | }, 101 | title: { 102 | fontSize: 24, 103 | fontWeight: '800', 104 | alignSelf: 'center', 105 | color: '#FFD9E8', 106 | }, 107 | description: { 108 | fontSize: 16, 109 | marginHorizontal: 16, 110 | fontWeight: '600', 111 | alignSelf: 'center', 112 | marginTop: 24, 113 | marginBottom: 16, 114 | color: '#FFD9E8', 115 | }, 116 | row: {flexDirection: 'row'}, 117 | results: {marginHorizontal: 16}, 118 | resultTitle: { 119 | fontSize: 18, 120 | fontWeight: '600', 121 | color: '#FFD9E8', 122 | marginVertical: 8, 123 | }, 124 | resultInfo: {fontSize: 18, fontWeight: '600', color: '#DE95BA'}, 125 | }); 126 | -------------------------------------------------------------------------------- /screens/remindersPermission.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | StyleSheet, 4 | View, 5 | Text, 6 | StatusBar, 7 | Platform, 8 | ScrollView, 9 | } from 'react-native'; 10 | import {SafeAreaView} from 'react-native-safe-area-context'; 11 | import {request, PERMISSIONS} from 'react-native-permissions'; 12 | 13 | export default function ReminderPermissionScreen() { 14 | const [permissionResult, setPermissionResult] = React.useState('Not asked'); 15 | 16 | React.useEffect(() => { 17 | request(PERMISSIONS.IOS.REMINDERS).then((result) => { 18 | setPermissionResult(result); 19 | console.log(result); 20 | }); 21 | }, []); 22 | 23 | return ( 24 | <> 25 | 26 | 27 | 28 | Reminders Permission Needed 29 | 30 | This app needs access to your reminders. If you are not comfortable 31 | with this permission, you can go to settings and modify it at any 32 | time. 33 | 34 | 35 | 45 | Permission Result: 46 | 47 | 57 | {permissionResult} 58 | 59 | 60 | 61 | UNAVAILABLE: 62 | 63 | This feature is not available (on this device / in this context) 64 | 65 | 66 | 67 | DENIED: 68 | 69 | The permission has not been requested / is denied but requestable 70 | 71 | 72 | 73 | GRANTED: 74 | The permission is granted 75 | 76 | 77 | LIMITED: 78 | 79 | The permission is granted but with limitations 80 | 81 | 82 | 83 | BLOCKED: 84 | 85 | The permission is denied and not requestable anymore 86 | 87 | 88 | 89 | 90 | 91 | ); 92 | } 93 | const styles = StyleSheet.create({ 94 | root: {backgroundColor: '#4A266A', flex: 1}, 95 | container: { 96 | alignContent: 'center', 97 | alignSelf: 'center', 98 | marginHorizontal: 16, 99 | marginTop: 40, 100 | }, 101 | title: { 102 | fontSize: 24, 103 | fontWeight: '800', 104 | alignSelf: 'center', 105 | color: '#FFD9E8', 106 | }, 107 | description: { 108 | fontSize: 16, 109 | marginHorizontal: 16, 110 | fontWeight: '600', 111 | alignSelf: 'center', 112 | marginTop: 24, 113 | marginBottom: 16, 114 | color: '#FFD9E8', 115 | }, 116 | row: {flexDirection: 'row'}, 117 | results: {marginHorizontal: 16}, 118 | resultTitle: { 119 | fontSize: 18, 120 | fontWeight: '600', 121 | color: '#FFD9E8', 122 | marginVertical: 8, 123 | }, 124 | resultInfo: {fontSize: 18, fontWeight: '600', color: '#DE95BA'}, 125 | }); 126 | -------------------------------------------------------------------------------- /screens/sendSMS.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | StyleSheet, 4 | View, 5 | Text, 6 | StatusBar, 7 | Platform, 8 | ScrollView, 9 | } from 'react-native'; 10 | import {SafeAreaView} from 'react-native-safe-area-context'; 11 | import {request, PERMISSIONS} from 'react-native-permissions'; 12 | 13 | export default function SendSMSPermissionScreen() { 14 | const [permissionResult, setPermissionResult] = React.useState('Not asked'); 15 | 16 | React.useEffect(() => { 17 | request( 18 | Platform.OS === 'ios' 19 | ? PERMISSIONS.IOS.CONTACTS 20 | : PERMISSIONS.ANDROID.SEND_SMS, 21 | ).then((result) => { 22 | setPermissionResult(result); 23 | console.log(result); 24 | }); 25 | }, []); 26 | 27 | return ( 28 | <> 29 | 30 | 31 | 32 | Send SMS Permission Needed 33 | 34 | This app needs access to your messages. If you are not comfortable 35 | with this permission, you can go to settings and modify it at any 36 | time. 37 | 38 | 39 | 49 | Permission Result: 50 | 51 | 61 | {permissionResult} 62 | 63 | 64 | 65 | UNAVAILABLE: 66 | 67 | This feature is not available (on this device / in this context) 68 | 69 | 70 | 71 | DENIED: 72 | 73 | The permission has not been requested / is denied but requestable 74 | 75 | 76 | 77 | GRANTED: 78 | The permission is granted 79 | 80 | 81 | LIMITED: 82 | 83 | The permission is granted but with limitations 84 | 85 | 86 | 87 | BLOCKED: 88 | 89 | The permission is denied and not requestable anymore 90 | 91 | 92 | 93 | 94 | 95 | ); 96 | } 97 | const styles = StyleSheet.create({ 98 | root: {backgroundColor: '#4A266A', flex: 1}, 99 | container: { 100 | alignContent: 'center', 101 | alignSelf: 'center', 102 | marginHorizontal: 16, 103 | marginTop: 40, 104 | }, 105 | title: { 106 | fontSize: 24, 107 | fontWeight: '800', 108 | alignSelf: 'center', 109 | color: '#FFD9E8', 110 | }, 111 | description: { 112 | fontSize: 16, 113 | marginHorizontal: 16, 114 | fontWeight: '600', 115 | alignSelf: 'center', 116 | marginTop: 24, 117 | marginBottom: 16, 118 | color: '#FFD9E8', 119 | }, 120 | row: {flexDirection: 'row'}, 121 | results: {marginHorizontal: 16}, 122 | resultTitle: { 123 | fontSize: 18, 124 | fontWeight: '600', 125 | color: '#FFD9E8', 126 | marginVertical: 8, 127 | }, 128 | resultInfo: {fontSize: 18, fontWeight: '600', color: '#DE95BA'}, 129 | }); 130 | --------------------------------------------------------------------------------