react-native-permissions on iOS logs No permission handler detected
No permission handler detectedShort answer
On iOS, react-native-permissions only compiles the handlers you list in the Podfile. If the permission you ask for is not listed, the library logs that no handler was detected. Add it to setup_permissions, run pod install, add the Info.plist text and rebuild the app.
Fix it fast
1Find out which cause you have
Open the Podfile and look for the setup_permissions call. The permission named in the log message must appear in its list.
grep -n -A8 "setup_permissions" ios/Podfile2Match what you see, then jump to its fix
- 1
The log names a permission, for example No "Camera" permission handler detectedThe permission is not listed in setup_permissions in the PodfileFix - 2
The Podfile already lists the permission, yet the message staysThe Podfile changed but pod install was not run again, or the app was not rebuiltFix - 3
pod install prints [Permissions] Unknown permissions: ...The permission name in the Podfile is misspelled or not a supported nameFix
- 1
What does the error look like?
No permission handler detectedNo "Camera" permission handler detected
Cause 1 of 3
The permission is not listed in setup_permissions in the Podfile
1Check
The package README says only the permissions listed in setup_permissions are added. The native code includes a handler only when its files were built in, so an unlisted permission has no handler.
grep -n -B2 -A10 "setup_permissions" ios/Podfile2Fix
Add the permission name to the list, keeping the exact spelling used in the README, and load the setup script before the call.
# ios/Podfile
node_require('react-native-permissions/scripts/setup.rb')
setup_permissions([
'Camera',
'PhotoLibrary',
])3Verify
Run pod install; the permission's handler is now part of the project.
cd ios && pod installConfirmed by github.com
Cause 2 of 3
The Podfile changed but pod install was not run again, or the app was not rebuilt
1Check
The README says pod install must be run again each time you change this config. A JavaScript reload does not rebuild native code, so a running Metro session will not pick the change up.
ls -l ios/Podfile ios/Podfile.lock2Fix
Run pod install, then build and install the iOS app again from Xcode or the CLI.
cd ios && pod install
# then build and run again from Xcode3Verify
Request the permission again; the log message is gone and the system prompt shows.
# Xcode: Product > Run, then request the permission againConfirmed by github.com
Cause 3 of 3
The permission name in the Podfile is misspelled or not a supported name
1Check
The setup script matches each name in setup_permissions against the handler folders of the package. A name that matches none is reported as unknown and nothing is added for it.
cd ios && pod install 2>&1 | grep Permissions2Fix
Use a name from the README list, for example LocationWhenInUse, PhotoLibrary, Notifications or Microphone, with the same capital letters.
setup_permissions([
'LocationWhenInUse',
'Microphone',
])3Verify
pod install no longer prints the unknown-permissions line.
cd ios && pod install 2>&1 | grep PermissionsConfirmed by github.com
How do I stop it coming back?
- Treat the Podfile list and the JavaScript PERMISSIONS constants as a pair: when you request a new permission in code, add it to both in the same commit.
- Add the matching usage description to Info.plist for every permission you list; the README gives the key for each one.
- Run pod install after every change to the permissions list, and rebuild instead of reloading.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- TaskvareA task and project-management suite: React on the web, Flutter on mobile, TypeScript underneath.
Related fixes
Mobile apps
Running pod on a React Native project fails with can't find gem cocoapods
can't find gem cocoapods (>= 0.a) with executable pod
The pod command exists, but the Ruby that is running it has no CocoaPods gem.
3 causes, each with a fixMobile apps
Axios request works on iOS or in a browser but fails on Android with Network Error
AxiosError: Network Error
A React Native app has no CORS, so on Android a Network Error usually means the request never reached the server.
3 causes, each with a fixMobile apps
Axios returns Network Error in a React Native app on iPhone or the iOS Simulator
error.code is ERR_NETWORK and error.response is undefined
A Network Error means iOS stopped the request before any HTTP answer came back.
3 causes, each with a fixMobile apps
backgroundImage: url(...) does nothing in a React Native view
ImageBackground renders an empty area
In React Native the backgroundImage style draws linear and radial gradients, not pictures, so url(...) is ignored.
3 causes, each with a fixMobile apps
A custom font in React Native falls back to the system font
Unrecognized font family 'MyFont'
React Native does not report a missing font, it just draws the system font.
6 causes, each with a fixMobile apps
fetch fails with TypeError: Network request failed in React Native
Network request failed
Network request failed means the request never got an HTTP response, so there is no status code to read.
3 causes, each with a fix