Migrate from AppFlow to CodePushGo
AppFlow Configuration Reference
Before migrating, note your current AppFlow configuration in capacitor.config.ts:
import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = { plugins: { LiveUpdates: { appId: 'your-app-id', channel: 'Production', autoUpdateMethod: 'background', // or 'always latest', 'force update' maxVersions: 2 } }};This configuration will help map AppFlow features to CodePushGo equivalents.
Update Strategy Migration
Background Updates (Default)
If using AppFlow’s default background updates:
// CodePushGo equivalent in capacitor.config.ts{ plugins: { CapacitorUpdater: { autoUpdate: 'atBackground', autoDeletePrevious: true } }}Force Updates
If using AppFlow’s force update strategy:
// CodePushGo equivalent in capacitor.config.ts{ plugins: { CapacitorUpdater: { autoUpdate: 'always', keepUrlPathAfterReload: true } }}
// Required JavaScript codeimport { CapacitorUpdater } from '@capgo/capacitor-updater';import { SplashScreen } from '@capacitor/splash-screen';
CapacitorUpdater.addListener('appReady', () => { SplashScreen.hide();});
CapacitorUpdater.notifyAppReady();Always Latest Updates
If using AppFlow’s always latest strategy, implement with CodePushGo:
import { CapacitorUpdater } from '@capgo/capacitor-updater';import { App } from '@capacitor/app';
async function setupAlwaysLatest() { App.addListener('resume', async () => { const result = await CapacitorUpdater.download({ url: 'your-update-url' }); if (result) { await CapacitorUpdater.set({ id: result.id }); } });}API Method Migration
| AppFlow Method | CodePushGo Equivalent | Notes |
|---|---|---|
sync() | download() | Downloads new updates |
reload() | set() | Applies updates immediately |
setConfig() | setChannel() | Updates channel configuration |
Example Migration
// AppFlow codeimport * as LiveUpdates from '@capacitor/live-updates';const result = await LiveUpdates.sync();if (result.activeApplicationPathChanged) { await LiveUpdates.reload();}
// CodePushGo equivalentimport { CapacitorUpdater } from '@capgo/capacitor-updater';const bundle = await CapacitorUpdater.download({ url: 'your-update-url'});if (bundle) { await CapacitorUpdater.set({ id: bundle.id });}Why migrate to CodePushGo?
With Ionic AppFlow’s shutdown announcement, migrating to CodePushGo provides a seamless transition for your mobile app development workflow. CodePushGo offers enhanced features, better performance, and significant cost savings while maintaining all the critical functionality you need.
Key Benefits
- Faster update delivery (< 1 minute vs 10 minutes)
- More affordable pricing ($14/month vs $499/month)
- End-to-end encryption included in all plans
- Enhanced control over update channels
- Comprehensive CI/CD integration options
Migration Steps
1. Live Updates Migration
Remove Previous Dependencies
npm uninstall @ionic/appflow# Remove any AppFlow-specific configurations from capacitor.config.jsonInstall CodePushGo
npm install @capgo/capacitor-updaternpx cap syncUpdate Configuration
Add CodePushGo configuration to your capacitor.config.json:
{ "plugins": { "CapacitorUpdater": { "autoUpdate": "atBackground" } }}2. CI/CD Migration
Capgo provides flexible CI/CD options:
Option 1: Use Your Existing CI/CD
Follow our detailed tutorials for setting up CI/CD with popular platforms:
Option 2: CI/CD Done For You
Let us handle your CI/CD setup with our managed service.
3. Channel Setup
- Create channels in CodePushGo dashboard:
npx @capgo/cli channel create productionnpx @capgo/cli channel create staging- Configure channel settings:
# Set up production channelnpx @capgo/cli channel update production --no-downgrade --no-upgrade
# Set up staging channelnpx @capgo/cli channel update staging4. Testing the Migration
- Test Live Updates
# Create and upload a test bundlenpx @capgo/cli bundle create --channel staging- Verify Update Reception
- Install the app on a test device
- Check that updates are received correctly
- Verify update installation process
- Test recovery functionality
- Validate CI/CD Pipeline
- Make a test commit
- Verify build process
- Check automatic deployment
- Confirm channel assignment
Troubleshooting
Common Issues
Updates Not Received
- Verify channel configuration
- Check device logs
- Ensure proper network connectivity
- Validate bundle version format
Build Pipeline Issues
- Verify GitHub Actions configuration
- Check signing certificates
- Validate environment variables
- Review build logs
Version Conflicts
- Check version numbering
- Verify channel constraints
- Review update conditions
Next Steps
- Register for a CodePushGo account
- Follow our quickstart guide
- Set up CI/CD integration
- Configure live updates
For enterprise teams requiring dedicated support during migration, schedule a call with our team.
Remember to test thoroughly in a staging environment before deploying to production. Our support team is available to help if you encounter any issues during migration.