diff --git a/docs/IOS_VERSIONING.md b/docs/IOS_VERSIONING.md index e0565a4..116828c 100644 --- a/docs/IOS_VERSIONING.md +++ b/docs/IOS_VERSIONING.md @@ -39,7 +39,9 @@ The iOS app uses a two-part versioning system that ensures proper version manage - Extracts version from tag: `v1.0.70` → `1.0.70` - Counts commits: e.g., `280` - Updates Xcode project: `MARKETING_VERSION = 1.0.70`, `CURRENT_PROJECT_VERSION = 280` - - Builds and uploads to App Store Connect + - Builds the IPA with the updated version and build number + - Uploads to App Store Connect with explicit version (`app_version`) and build number (`build_number`) parameters + - This ensures App Store Connect correctly associates the uploaded build with the intended version 4. App Store Connect displays: "Version 1.0.70 (Build 280)" ## Important Notes @@ -106,13 +108,16 @@ CURRENT_PROJECT_VERSION = 285; # Use commit count from step 3 (from full his ## Troubleshooting -### Problem: App Store Connect shows "Version 1.0 (Build 1)" -**Cause**: A build was uploaded manually without using the CI/CD workflow +### Problem: App Store Connect shows "Version 1.0 (Build 1)" or wrong build selected +**Cause**: One of the following: +- A build was uploaded manually without using the CI/CD workflow +- The deployment workflow didn't explicitly specify which build to associate with the version (fixed in recent updates) **Solution**: 1. Delete the incorrect build from App Store Connect (if not yet submitted) 2. Create and push a proper version tag: `git tag v1.0.70 && git push origin v1.0.70` 3. Let the CI/CD workflow build and upload automatically +4. The workflow now explicitly specifies both version and build number during upload to ensure proper association ### Problem: Build upload fails with "Build version already exists" **Cause**: Trying to upload a build with the same build number as an existing build diff --git a/ios/App/fastlane/Fastfile b/ios/App/fastlane/Fastfile index b616589..1b9771d 100644 --- a/ios/App/fastlane/Fastfile +++ b/ios/App/fastlane/Fastfile @@ -413,6 +413,7 @@ platform :ios do UI.important("🔑 API Key configured: #{!api_key.nil?}") UI.important("📁 Metadata path: ./metadata") UI.important("📸 Screenshots path: ./metadata/en-US/screenshots") + UI.important("📱 Version: #{version_number}, Build: #{build_number}") # Retry configuration - can be customized via environment variables max_retries = ENV["FASTLANE_UPLOAD_MAX_RETRIES"] ? ENV["FASTLANE_UPLOAD_MAX_RETRIES"].to_i : 3 @@ -427,6 +428,8 @@ platform :ios do skip_metadata: false, skip_screenshots: false, metadata_path: "./metadata", # Relative path from fastlane directory + app_version: version_number, # Explicitly specify the version to update + build_number: build_number, # Explicitly specify which build to use for this version submit_for_review: false, precheck_include_in_app_purchases: false, force: true,