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:

One-command setup:
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:

Download and run manually:
curl -L https://docs.codepush.online/scripts/setup-codepush.js -o setup-codepush.js
node setup-codepush.js

Setup Process

The setup script will guide you through the following steps:

1

Prerequisites Check

Validates React Native project structure and detects iOS/Android platforms.

2

Configuration Input

Prompts for CodePush server URL, app name, and deployment preferences.

3

Dependency Installation

Installs react-native-code-push and code-push-cli automatically.

4

Platform Configuration

Automatically modifies iOS and Android configuration files.

5

JavaScript Integration

Updates your main App component with CodePush integration.

6

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.plist
  • ios/YourApp/AppDelegate.m
  • Xcode build configurations

🤖 Android Configuration

  • android/app/src/main/res/values/strings.xml
  • android/app/src/main/java/.../MainApplication.java
  • Build variant configurations

⚙️ JavaScript Integration

  • App.js or App.tsx
  • CodePush HOC wrapper
  • Automatic sync configuration

📦 Project Files

  • package.json - npm scripts
  • .gitignore - CodePush entries
  • CODEPUSH-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 server
npm run codepush:create-app - Create apps and deployments
npm run codepush:keys - View deployment keys

Deployment Commands

npm run codepush:deploy - Deploy to staging
npm run codepush:promote:ios - Promote iOS to production
npm run codepush:promote:android - Promote Android to production

Management Commands

npm run codepush:history:ios - View iOS deployment history
npm run codepush:rollback:ios - Rollback iOS deployment
npm run codepush:rollback:android - Rollback Android deployment

After Setup

🎉 Setup Complete! Next Steps:

  1. 1. Start your CodePush server
  2. 2. Run npm run codepush:create-app
  3. 3. Update deployment keys in your configuration files
  4. 4. Test with npm run codepush:deploy
  5. 5. Check the generated CODEPUSH-README.md for 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!