Overview
Modern mobile apps require explicit user permission to access sensitive features like camera, location, and notifications. This guide shows you how to properly request and handle permissions across platforms.Permission Types
Common permissions in Expo apps:- Camera: Take photos and videos
- Microphone: Record audio
- Location: Access device location
- Notifications: Send push notifications
- Photos/Media Library: Access saved photos
- Contacts: Access user contacts
- Calendar: Access calendar events
- Reminders: Access iOS reminders
Installation
Most Expo SDK packages include their own permission methods:Requesting Permissions
Basic pattern
All Expo permission APIs follow a similar pattern:Permission hook
Create a reusable hook for any permission:hooks/usePermission.ts
components/CameraButton.tsx
Common Permissions
- Camera
- Location
- Media Library
- Notifications
- Contacts
Permission States
Understanding permission status
Handling different states
Platform Differences
- iOS
- Android
iOS-specific considerations
Permission descriptions required:Add usage descriptions inapp.json:app.json
- iOS only allows asking twice
- After second denial, must use Settings
- “Don’t Allow” vs “Ask Next Time”
Best Practices
1. Request permissions in context
2. Explain why you need permission
3. Handle all permission states
4. Graceful degradation
5. Check before requesting
Debugging Permissions
Log permission status
Reset permissions (development)
- iOS
- Android
Troubleshooting
App crashes when requesting permission
App crashes when requesting permission
iOS: Ensure you’ve added the usage description to Rebuild after adding:
app.json:npx expo prebuild --cleanPermission denied without showing prompt
Permission denied without showing prompt
- User previously denied with “Don’t ask again” (Android)
- User denied twice already (iOS)
- Direct user to Settings with
Linking.openSettings()
Permission granted but feature not working
Permission granted but feature not working
- Check for additional permissions (e.g., location + background location)
- Verify device settings (Location Services enabled)
- Check for OS restrictions (parental controls)
Permission prompt not appearing
Permission prompt not appearing
- Verify you’re calling
requestAsync()not justgetAsync() - Check permission isn’t already granted or permanently denied
- Ensure you’ve declared the permission in app.json (Android)