rn-build-check
v1.0.0
Published
π CLI tool to detect missing & deprecated permissions in React Native projects. Scans AndroidManifest.xml & Info.plist before building AAB/TestFlight. Flags Google Play deprecated permissions (READ_MEDIA_IMAGES, WRITE_EXTERNAL_STORAGE). Ensures complianc
Downloads
14
Maintainers
Keywords
Readme
rn-build-check
π CLI tool to check React Native projects for missing permissions in AndroidManifest.xml and Info.plist before building AAB files or TestFlight releases.
Why?
Building React Native apps for production requires proper permission configuration. This tool helps you:
- β Detect missing permissions by scanning your source code
- β οΈ Identify deprecated Android permissions (like READ_MEDIA_IMAGES/VIDEO)
- π¨ Catch permission issues early before build failures
- π± Support both Android and iOS platforms
- π― Google Play Store compliance checks
Installation
Global Installation
npm install -g rn-build-checkRun with npx (no installation)
npx rn-build-checkUsage
Run the command in your React Native project root:
# Check both Android and iOS
npx rn-build-check
# Check only Android permissions
npx rn-build-check --android
# Check only iOS permissions
npx rn-build-check --ios
# Check a specific project path
npx rn-build-check --path /path/to/projectWhat It Checks
Android (AndroidManifest.xml)
Detects usage of:
- π· Camera APIs (react-native-camera, expo-camera, etc.)
- π Location APIs (Geolocation, expo-location)
- πΎ Storage/File APIs (react-native-fs, DocumentPicker)
- π€ Microphone (Audio recording)
- π± Bluetooth (react-native-ble-manager)
- π Contacts (react-native-contacts)
- π Calendar (react-native-calendar-events)
- π Push Notifications
Flags deprecated permissions:
- β
READ_MEDIA_IMAGES- Remove for non-gallery apps - β
READ_MEDIA_VIDEO- Remove for non-gallery apps - β οΈ
WRITE_EXTERNAL_STORAGE- Deprecated in Android 10+
iOS (Info.plist)
Detects missing keys:
NSCameraUsageDescriptionNSPhotoLibraryUsageDescriptionNSLocationWhenInUseUsageDescriptionNSMicrophoneUsageDescriptionNSContactsUsageDescription- And more...
Example Output
π Scanning React Native project...
π± Android Analysis
βββββββββββββββββββββββββββββββββββββββββββββββ
β
Found Permissions:
β’ android.permission.CAMERA
β’ android.permission.INTERNET
β Missing Permissions:
β’ android.permission.ACCESS_FINE_LOCATION
β³ Detected in: src/screens/MapScreen.js
β οΈ Deprecated/Problematic Permissions:
β’ android.permission.READ_MEDIA_IMAGES [ERROR]
β³ Google Play Store requires removal for non-gallery apps
β³ Action: Remove unless your app is a gallery app
π iOS Analysis
βββββββββββββββββββββββββββββββββββββββββββββββ
β
Found Permission Keys:
β’ NSCameraUsageDescription
"We need camera access for profile photos"
β Missing Permission Keys:
β’ NSLocationWhenInUseUsageDescription
β³ Detected in: src/screens/MapScreen.js
β³ Add to Info.plist: <key>NSLocationWhenInUseUsageDescription</key>
β³ With description: <string>Your usage description</string>
βββββββββββββββββββββββββββββββββββββββββββββββ
Summary: 1 Android missing, 1 deprecated | 1 iOS missingHow It Works
- Scans your source code for API usage patterns (e.g.,
Geolocation.getCurrentPosition()) - Checks package.json for permission-requiring dependencies
- Parses AndroidManifest.xml to find declared Android permissions
- Parses Info.plist to find declared iOS permission keys
- Compares detected usage vs declared permissions
- Reports missing, deprecated, and problematic permissions
CI/CD Integration
The tool exits with code 1 if issues are found, making it perfect for CI/CD:
# .github/workflows/build.yml
- name: Check permissions
run: npx rn-build-checkSupported Packages
Automatically detects permissions needed by popular libraries:
- react-native-camera / expo-camera
- @react-native-community/geolocation
- react-native-image-picker
- react-native-fs / expo-file-system
- react-native-ble-manager
- react-native-contacts
- @react-native-firebase/messaging
- And many more...
Requirements
- Node.js >= 14.0.0
- React Native project with standard structure
Contributing
Contributions are welcome! Please open an issue or PR if you:
- Find missing permission patterns
- Want to add support for new libraries
- Discover bugs or have feature requests
License
MIT
Author
Built for React Native teams to catch permission issues before they become build problems.
Note: This tool performs static analysis and may not catch all permission requirements. Always test your app thoroughly on both platforms.
