Skip to main content

Version Targeting Guide

This guide explains how to target specific app versions when deploying updates through Source Push.

Understanding Version Targeting​

Version targeting allows you to control which versions of your app receive specific updates. This is crucial for:

  • Managing different app versions in production
  • Rolling out updates gradually
  • Handling version-specific features
  • Maintaining backward compatibility

Basic Version Targeting​

Exact Version Matching​

Target a specific app version:

srcpush release-react MyApp ios --targetBinaryVersion "1.2.3"

Version Range Targeting​

Target a range of versions:

# Greater than or equal to version 1.2.3
srcpush release-react MyApp ios --targetBinaryVersion ">=1.2.3"

# Specific version range
srcpush release-react MyApp ios --targetBinaryVersion ">=1.2.3 <2.0.0"

Advanced Targeting Strategies​

Semver Rules​

Source Push follows semantic versioning rules:

  1. Major Version (x.0.0): Breaking changes
  2. Minor Version (1.x.0): New features, backward-compatible
  3. Patch Version (1.0.x): Bug fixes

Complex Version Patterns​

# Multiple version ranges
srcpush release-react MyApp ios --targetBinaryVersion ">=1.2.3 <2.0.0 || >=3.0.0"

# Exclude specific versions
srcpush release-react MyApp ios --targetBinaryVersion ">=1.0.0 <2.0.0 !=1.2.3"

Platform-Specific Targeting​

iOS Version Targeting​

srcpush release-react MyApp ios \
--targetBinaryVersion "1.2.x" \
--description "iOS stability updates"

Android Version Targeting​

srcpush release-react MyApp android \
--targetBinaryVersion ">=1.2.0 <1.3.0" \
--description "Android performance improvements"

Best Practices​

1. Gradual Rollout Strategy​

# Initial rollout to v1.2.x
srcpush release-react MyApp ios \
--targetBinaryVersion "1.2.x" \
--rollout 25

# Expand to v1.1.x after validation
srcpush release-react MyApp ios \
--targetBinaryVersion ">=1.1.0" \
--rollout 50

2. Version-Specific Features​

# Release new feature only to latest version
srcpush release-react MyApp ios \
--targetBinaryVersion "2.0.0" \
--description "New features for v2.0.0"

# Stability updates for older versions
srcpush release-react MyApp ios \
--targetBinaryVersion ">=1.0.0 <2.0.0" \
--description "Stability improvements for v1.x"

3. Testing Different Versions​

# Development testing
srcpush release-react MyApp ios \
--targetBinaryVersion "2.0.0-beta" \
--deploymentName Staging

# Production release
srcpush release-react MyApp ios \
--targetBinaryVersion "2.0.0" \
--deploymentName Production

Monitoring and Metrics​

Track update distribution across versions:

srcpush deployment history MyApp Production

Troubleshooting​

Common Issues​

  1. Updates Not Reaching Users

    • Verify version syntax
    • Check app version in client
    • Validate deployment key
  2. Version Conflicts

    • Review targeting rules
    • Check for overlapping ranges
    • Verify semver compliance

Next Steps​