Automatically configure iOS project settings (Team ID, version, display name, build number, iPhone-only) for React Native projects
npm install nexjaxA lightweight tool to automatically configure iOS project settings for React Native projects. Works with any React Native project (Expo, bare React Native, etc.).
- ✅ Auto-configure Team ID - Sets DEVELOPMENT_TEAM in Xcode project
- ✅ Auto-fill Version - Updates CFBundleShortVersionString from app.json (Expo) or package.json (bare RN)
- ✅ Auto-fill Build Number - Updates CFBundleVersion from app.json or config
- ✅ Auto-fill Display Name - Updates CFBundleDisplayName from app.json or package.json
- ✅ iPhone-only Support - Removes iPad orientations automatically
- ✅ Zero Dependencies - Pure Node.js, no external dependencies
- ✅ Works with any RN project - Supports both Expo (app.json) and bare React Native (package.json only)
``bash`
npm install --save-dev nexjax
`bash`
npx nexjax
1. Get your Team ID:
- Open Xcode → Settings → Accounts
- Select your Apple ID
- Copy your Team ID (format: ABC123DEF4)
2. Run the tool:
`bash`
npx nexjax YOUR_TEAM_ID
`
Or if installed locally:
bash`
npx nexjax YOUR_TEAM_ID
3. Edit ios.config.json (created automatically):
`json`
{
"teamId": "YOUR_TEAM_ID",
"version": "1.0.0",
"displayName": "MyApp",
"buildNumber": "1",
"iphoneOnly": true,
"permissions": {
"NSPhotoLibraryUsageDescription": "We need access to your photos...",
"NSCameraUsageDescription": "We need access to your camera..."
}
}
app.json
Note: For Expo projects, permission strings can also be set in → expo.ios.infoPlist and nexjax will automatically read them!
For Expo projects, add permissions in app.json:
`json`
{
"expo": {
"ios": {
"infoPlist": {
"NSPhotoLibraryUsageDescription": "We need access to your photos...",
"NSCameraUsageDescription": "We need access to your camera..."
}
}
}
}
For bare RN projects, add permissions in ios.config.json:
`json`
{
"permissions": {
"NSPhotoLibraryUsageDescription": "We need access to your photos...",
"NSCameraUsageDescription": "We need access to your camera..."
}
}
After running npx expo prebuild or any iOS build command:
`bash`
npx nexjax
Or add to your build scripts in package.json:
`json`
{
"scripts": {
"ios:build": "react-native run-ios && npx nexjax",
"ios:configure": "npx nexjax"
}
}
The tool creates ios.config.json in your project root with these settings:
`json`
{
"teamId": "ABC123DEF4",
"bundleIdentifier": "com.example.app",
"version": "1.0.0",
"displayName": "MyApp",
"buildNumber": "1",
"iphoneOnly": true,
"permissions": {
"NSPhotoLibraryUsageDescription": "We need access to your photos...",
"NSCameraUsageDescription": "We need access to your camera...",
"NSMicrophoneUsageDescription": "We need access to your microphone..."
}
}
The tool automatically reads from configuration files:
For Expo projects (with app.json):
- expo.version → Used for CFBundleShortVersionStringexpo.name
- → Used for CFBundleDisplayNameexpo.ios.buildNumber
- → Used for CFBundleVersionexpo.ios.supportsTablet
- → Determines iPhone-only settingexpo.ios.infoPlist.*
- → Permission strings (all optional)
For bare React Native projects (package.json only):
- package.json.version → Used for CFBundleShortVersionStringpackage.json.name
- → Used for CFBundleDisplayName
Nexjax can automatically configure iOS permission strings in Info.plist. Each permission is optional - only add the ones you need.
Configuration Priority:
1. ios.config.json → permissions (always works, overrides app.json)app.json
2. → expo.ios.infoPlist (Expo projects only)
For Expo projects: Can use either app.json or ios.config.json (or both - ios.config.json overrides)ios.config.json
For bare RN projects: Use → permissions (no app.json available)
Supported permission keys:
- NSPhotoLibraryUsageDescription - Photo library accessNSPhotoLibraryAddUsageDescription
- - Save photos to libraryNSCameraUsageDescription
- - Camera accessNSMicrophoneUsageDescription
- - Microphone accessNSLocationWhenInUseUsageDescription
- - Location when in useNSLocationAlwaysUsageDescription
- - Location alwaysNSContactsUsageDescription
- - Contacts accessNSCalendarsUsageDescription
- - Calendar accessNSRemindersUsageDescription
- - Reminders accessNSMotionUsageDescription
- - Motion & FitnessNSHealthShareUsageDescription
- - Health data readNSHealthUpdateUsageDescription
- - Health data writeNSBluetoothPeripheralUsageDescription
- - Bluetooth (deprecated, use NSBluetoothAlwaysUsageDescription)NSBluetoothAlwaysUsageDescription
- - Bluetooth alwaysNSSpeechRecognitionUsageDescription
- - Speech recognitionNSFaceIDUsageDescription
- - Face IDNSAppleMusicUsageDescription
- - Apple MusicNSSiriUsageDescription
- - SiriNSUserTrackingUsageDescription
- - App Tracking Transparency
For all settings (version, displayName, buildNumber, etc.):
1. ios.config.json - Primary source (can override everything)app.json
2. (Expo) or package.json (bare RN) - Source of truth
3. Command line argument - Overrides Team ID only
For permission strings specifically:
1. ios.config.json → permissions - Always works (Expo & bare RN)app.json
2. → expo.ios.infoPlist - Expo projects only (if no ios.config.json permissions)
Note:
- If app.json exists, it takes priority over package.json for version/nameapp.json
- If no , nexjax reads from package.json (bare RN projects)ios.config.json
- Permission strings work the same way: always works, app.json is optional (Expo only)
`bashConfigure with Team ID
npx nexjax YOUR_TEAM_ID
$3
`json
{
"scripts": {
"prebuild:ios": "cd ios && pod install",
"postbuild:ios": "npx nexjax",
"rebuild:ios": "npm run prebuild:ios && npm run postbuild:ios"
}
}
`$3
`json
{
"scripts": {
"prebuild:ios": "npx expo prebuild --platform ios --clean",
"postbuild:ios": "npx nexjax",
"rebuild:ios": "npm run prebuild:ios && npm run postbuild:ios"
}
}
`What It Does
$3
- Updates DEVELOPMENT_TEAM in ios/*.xcodeproj/project.pbxproj
- Preserves across rebuilds$3
- Updates CFBundleShortVersionString in Info.plist
- Updates CFBundleVersion in Info.plist$3
- Updates CFBundleDisplayName in Info.plist$3
- Removes UISupportedInterfaceOrientations~ipad from Info.plist
- Ensures app only runs on iPhone$3
- Updates permission strings in Info.plist
- Reads from app.json (Expo) or ios.config.json (bare RN)
- Only configures permissions that are provided (all optional)Project Structure
$3
`
your-project/
├── app.json ← Source of truth (version, name, buildNumber)
├── package.json
├── ios/ ← Generated by expo prebuild
│ ├── YourApp.xcodeproj/
│ │ └── project.pbxproj
│ └── YourApp/
│ └── Info.plist
└── ios.config.json ← Created automatically (Team ID, overrides)
`$3
`
your-project/
├── package.json ← Source of truth (version, name)
├── ios/
│ ├── YourApp.xcodeproj/
│ │ └── project.pbxproj
│ └── YourApp/
│ └── Info.plist
└── ios.config.json ← Created automatically (Team ID, buildNumber, overrides)
`Troubleshooting
$3
- Make sure you're in the React Native project root
- Run from the directory containing ios/ folder$3
- Make sure you've built the iOS project at least once
- For Expo: Run npx expo prebuild --platform ios first$3
- The tool will search for Info.plist automatically
- If not found, Team ID configuration will still work$3
- Make sure ios.config.json has teamId set
- Run the tool again after rebuilding iOS projectAPI
$3
`javascript
const { configureIOS } = require('nexjax');// Configure with Team ID
await configureIOS('/path/to/project', 'YOUR_TEAM_ID');
// Re-configure (uses config file)
await configureIOS('/path/to/project');
``MIT
Contributions welcome! This is a simple tool designed to be lightweight and dependency-free.