Automated Setup
One-command setup for React Native CodePush integration
Automated React Native Setup
Skip all manual configuration! Our automated setup script handles everything for you in just one command.
Quick Installation
Run this single command in your React Native project root to automatically configure CodePush:
curl -s -L https://docs.codepush.online/scripts/install-codepush.sh | bash📁 More Download Options
Need more control or want to download individual scripts?
View All Download Scripts⚡ What This Does
- ✅ Installs CodePush SDK and CLI
- ✅ Configures iOS (Info.plist, AppDelegate)
- ✅ Configures Android (strings.xml, MainApplication.java)
- ✅ Sets up JavaScript integration
- ✅ Creates deployment scripts and commands
- ✅ Generates environment-specific configurations
Alternative: Manual Download
If you prefer to download and review the script first:
curl -L https://docs.codepush.online/scripts/setup-codepush.js -o setup-codepush.jsnode setup-codepush.jsSetup Process
The setup script will guide you through the following steps:
Prerequisites Check
Validates React Native project structure and detects iOS/Android platforms.
Configuration Input
Prompts for CodePush server URL, app name, and deployment preferences.
Dependency Installation
Installs react-native-code-push and code-push-cli automatically.
Platform Configuration
Automatically modifies iOS and Android configuration files.
JavaScript Integration
Updates your main App component with CodePush integration.
Script Generation
Creates npm scripts and helper commands for easy deployment.
Files Modified
The setup script automatically modifies these files in your project:
🍎 iOS Configuration
ios/YourApp/Info.plistios/YourApp/AppDelegate.m- Xcode build configurations
🤖 Android Configuration
android/app/src/main/res/values/strings.xmlandroid/app/src/main/java/.../MainApplication.java- Build variant configurations
⚙️ JavaScript Integration
App.jsorApp.tsx- CodePush HOC wrapper
- Automatic sync configuration
📦 Project Files
package.json- npm scripts.gitignore- CodePush entriesCODEPUSH-README.md- documentation
Generated npm Scripts
After setup, you'll have these convenient commands available:
Initial Setup Commands
npm run codepush:login - Login to CodePush servernpm run codepush:create-app - Create apps and deploymentsnpm run codepush:keys - View deployment keysDeployment Commands
npm run codepush:deploy - Deploy to stagingnpm run codepush:promote:ios - Promote iOS to productionnpm run codepush:promote:android - Promote Android to productionManagement Commands
npm run codepush:history:ios - View iOS deployment historynpm run codepush:rollback:ios - Rollback iOS deploymentnpm run codepush:rollback:android - Rollback Android deploymentAfter Setup
🎉 Setup Complete! Next Steps:
- 1. Start your CodePush server
- 2. Run
npm run codepush:create-app - 3. Update deployment keys in your configuration files
- 4. Test with
npm run codepush:deploy - 5. Check the generated
CODEPUSH-README.mdfor details
Troubleshooting
Setup fails with permission errors
Run sudo npm install -g code-push-cli or use npx instead.
React Native project not detected
Ensure you're running the script from your React Native project root directory.
Build errors after setup
Clean and rebuild: cd ios && pod install && cd .. && npx react-native run-ios
Ready to Get Started?
The automated setup makes CodePush integration effortless. Get started in minutes!