Skip to main content

3 posts tagged with "Tutorial"

Step-by-step guides and tutorials

View All Tags

Setting up the Source Push CLI for Over-the-Air Updates

· One min read
Hebert
FullStack Software Developer | Node.js, Laravel, React.js, React Native

The Source Push CLI makes it easy to manage your OTA deployments from the command line. To get started:

npm install -g srcpush
srcpush login --accessKey <your-access-key>

After logging in, you can create deployments and release updates to your users.

For more detailed usage examples, see the CLI documentation.

Advanced Deployment Strategies with Source Push

· 2 min read
Hebert
FullStack Software Developer | Node.js, Laravel, React.js, React Native

Deploying updates to your React Native app requires careful planning and execution. In this guide, we'll explore different deployment strategies available with Source Push and when to use them.

Understanding Deployment Environments

Source Push supports multiple deployment environments out of the box:

# Create staging and production deployments
srcpush deployment add MyApp Staging
srcpush deployment add MyApp Production

This allows you to test updates before rolling them out to all users.

Staged Rollouts

Staged rollouts help minimize the impact of potential issues by gradually releasing updates to users:

# Release to 25% of users initially
srcpush release-react MyApp ios --rollout 25

# Once confident, increase to 100%
srcpush deployment history MyApp Production
srcpush rollout MyApp Production v5 100

A/B Testing

Test different versions of your app with specific user segments:

# Release version A
srcpush release-react MyApp ios -d Production-A

# Release version B
srcpush release-react MyApp ios -d Production-B

Automatic Rollbacks

Source Push includes automatic rollback protection:

srcpush release-react MyApp ios --rollback-enabled true

This will automatically roll back if an update causes crashes above your defined threshold.

Best Practices

  1. Always Test in Staging

    srcpush release-react MyApp ios -d Staging
    # Verify in staging before promoting
    srcpush promote MyApp Staging Production
  2. Monitor Update Metrics

    • Track download success rates
    • Monitor crash reports
    • Watch adoption rates
  3. Version Targeting

    srcpush release-react MyApp ios --target-binary-version "~1.2.3"
  4. Emergency Updates

    srcpush release-react MyApp ios --mandatory true

CI/CD Integration

Automate your deployments with our CI/CD integrations:

# GitHub Actions example
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Source Push CLI
run: npm install -g @srcpush/code-push-cli
- name: Release Update
run: srcpush release-react MyApp ios -d Staging
env:
SRCPUSH_TOKEN: ${{ secrets.SRCPUSH_TOKEN }}

Monitoring Deployments

Keep track of your deployments using our monitoring tools:

# Check deployment history
srcpush deployment history MyApp Production

# View specific deployment details
srcpush deployment info MyApp Production

Conclusion

Effective deployment strategies are crucial for maintaining app stability and user satisfaction. Source Push provides all the tools you need to implement sophisticated deployment workflows that match your team's needs.

For more detailed information, check out our deployment documentation and CI/CD integration guides.

Migrating from CodePush to Source Push - A Complete Guide

· 3 min read
Hebert
FullStack Software Developer | Node.js, Laravel, React.js, React Native

With Microsoft's announcement about App Center's CodePush service retirement in March 2025, many teams are looking for alternatives. This guide will walk you through migrating your React Native app from CodePush to Source Push with minimal disruption.

Why Source Push?

Before diving into the migration process, here's why Source Push is the ideal choice:

  • Drop-in Replacement: Compatible with existing CodePush SDK
  • Performance: 3.5x faster update delivery
  • Cost-Effective: Up to 70% cost savings
  • Feature Parity+: All CodePush features plus additional capabilities

Migration Steps

1. Install Source Push CLI

First, install our CLI tool:

npm install -g @srcpush/code-push-cli

2. Create Source Push Account

Sign up at console.srcpush.com and create your organization.

3. Register Your App

# Log in to Source Push
srcpush login

# Register your app
srcpush app add MyApp

# Add deployment environments
srcpush deployment add MyApp Staging
srcpush deployment add MyApp Production

4. Update SDK Configuration

iOS (Info.plist)

<key>CodePushServerURL</key>
<string>https://api.srcpush.com</string>

Android (strings.xml)

<string moduleConfig="true" name="CodePushServerUrl">https://api.srcpush.com</string>

5. Update Deployment Keys

Replace your CodePush deployment keys with Source Push keys:

# Get your deployment keys
srcpush deployment ls MyApp -k

# Update keys in your app configuration

6. Test the Migration

  1. Release a Test Update

    srcpush release-react MyApp ios -d Staging
  2. Verify Update Download

    srcpush deployment history MyApp Staging

7. Update CI/CD Pipeline

Update your CI/CD configuration to use Source Push:

# Before (CodePush)
- name: Deploy to CodePush
run: appcenter codepush release-react -a owner/MyApp -d Staging

# After (Source Push)
- name: Deploy to Source Push
run: srcpush release-react MyApp ios -d Staging
env:
SRCPUSH_TOKEN: ${{ secrets.SRCPUSH_TOKEN }}

Migration Checklist

✅ Install Source Push CLI
✅ Create Source Push account
✅ Register app and create deployments
✅ Update SDK configuration
✅ Replace deployment keys
✅ Test update delivery
✅ Update CI/CD pipelines
✅ Monitor metrics after migration

Best Practices During Migration

  1. Gradual Rollout

    • Start with staging environment
    • Use staged rollouts for production
    srcpush release-react MyApp ios -d Production --rollout 25
  2. Version Targeting

    • Target specific app versions during transition
    srcpush release-react MyApp ios --target-binary-version ">=1.2.3"
  3. Monitoring

    • Monitor update metrics closely
    • Set up alerts for any issues
    • Keep deployment history for rollback capability

Common Issues and Solutions

Update Not Downloading

Check server URL configuration:

srcpush deployment info MyApp Production

Authentication Issues

Verify token and permissions:

srcpush login
srcpush whoami

CI/CD Integration

Test authentication in CI environment:

srcpush login --accessKey <your-access-key>

Need Help?

Our support team is ready to help with your migration:

  1. Check our migration documentation
  2. Contact [email protected]

Next Steps

After completing the migration:

  1. Set up monitoring and alerts
  2. Configure automatic rollbacks
  3. Explore advanced features like A/B testing
  4. Review our deployment strategies guide

Start your migration today and ensure a smooth transition before App Center's CodePush retirement.