diff --git a/V2er.xcodeproj/project.pbxproj b/V2er.xcodeproj/project.pbxproj index 0852e9c..17e0ebc 100644 --- a/V2er.xcodeproj/project.pbxproj +++ b/V2er.xcodeproj/project.pbxproj @@ -1061,12 +1061,14 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 15.0; + MARKETING_VERSION = 1.1.2; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + CURRENT_PROJECT_VERSION = 29; }; name = Debug; }; @@ -1116,12 +1118,14 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 15.0; + MARKETING_VERSION = 1.1.2; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; VALIDATE_PRODUCT = YES; + CURRENT_PROJECT_VERSION = 29; }; name = Release; }; @@ -1131,7 +1135,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 28; DEVELOPMENT_ASSET_PATHS = "\"V2er/Preview Content\""; DEVELOPMENT_TEAM = DZCZQ4694Z; ENABLE_PREVIEWS = YES; @@ -1143,7 +1146,6 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.1; PRODUCT_BUNDLE_IDENTIFIER = v2er.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1158,7 +1160,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 28; DEVELOPMENT_ASSET_PATHS = "\"V2er/Preview Content\""; DEVELOPMENT_TEAM = DZCZQ4694Z; ENABLE_PREVIEWS = YES; @@ -1170,7 +1171,6 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.1; PRODUCT_BUNDLE_IDENTIFIER = v2er.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/V2er/Config/Version.xcconfig b/V2er/Config/Version.xcconfig new file mode 100644 index 0000000..fc0ad20 --- /dev/null +++ b/V2er/Config/Version.xcconfig @@ -0,0 +1,12 @@ +// Version.xcconfig +// Centralized version configuration for V2er iOS app +// +// To update versions, only modify these two lines: +// VERSION_NAME: User-facing version (e.g., 1.1.2) +// VERSION_CODE: Build number (must always increase) + +// VERSION_NAME - This is what users see (e.g., 1.1.2) +MARKETING_VERSION = 1.1.2 + +// VERSION_CODE - Internal build number (e.g., 29, 30, 31...) +CURRENT_PROJECT_VERSION = 29 \ No newline at end of file diff --git a/VERSIONING.md b/VERSIONING.md new file mode 100644 index 0000000..b7f58a4 --- /dev/null +++ b/VERSIONING.md @@ -0,0 +1,70 @@ +# Version Management Guide + +## Version Terminology + +This project uses two version identifiers: + +### VERSION_NAME (MARKETING_VERSION in Xcode) +- **What**: User-facing version number (e.g., "1.1.2") +- **Where**: Displayed in App Store and Settings +- **Format**: MAJOR.MINOR.PATCH +- **When to change**: For feature releases and updates + +### VERSION_CODE (CURRENT_PROJECT_VERSION in Xcode) +- **What**: Build number (e.g., "28", "29", "30") +- **Where**: Used internally by Apple for tracking builds +- **Format**: Integer that must always increase +- **When to change**: Every single build uploaded to TestFlight/App Store + +## ✅ Centralized Version Configuration + +**Versions are now defined in ONE place only!** + +The version numbers are defined at the project level and automatically inherited by all targets (Debug and Release). + +### How to Update Versions + +To update versions, you only need to modify **2 locations** in `V2er.xcodeproj/project.pbxproj`: + +1. Search for the **Debug** project configuration and update: +``` +/* Debug project configuration */ +MARKETING_VERSION = 1.1.2; /* VERSION_NAME */ +CURRENT_PROJECT_VERSION = 29; /* VERSION_CODE */ +``` + +2. Search for the **Release** project configuration and update: +``` +/* Release project configuration */ +MARKETING_VERSION = 1.1.2; /* VERSION_NAME */ +CURRENT_PROJECT_VERSION = 29; /* VERSION_CODE */ +``` + +That's it! The target configurations will automatically inherit these values. + +## Important Notes + +1. **Both values must be updated** in both Debug and Release configurations +2. **VERSION_CODE must always increase** - even for the same VERSION_NAME +3. **Fastlane auto-increment**: Our Fastlane setup automatically increments VERSION_CODE for TestFlight builds +4. **Info.plist**: Automatically uses these values via: + - `$(MARKETING_VERSION)` → CFBundleShortVersionString (VERSION_NAME) + - `$(CURRENT_PROJECT_VERSION)` → CFBundleVersion (VERSION_CODE) + +## Example Version Progression + +| VERSION_NAME | VERSION_CODE | Notes | +|-------------|--------------|-------| +| 1.1.0 | 27 | Previous release | +| 1.1.1 | 28 | Bug fix release | +| 1.1.2 | 29 | First build of 1.1.2 | +| 1.1.2 | 30 | Second build of 1.1.2 (bug fix) | +| 1.1.2 | 31 | Final 1.1.2 for App Store | +| 1.2.0 | 32 | Next feature release | + +## Why Two Separate Values? + +- **VERSION_NAME**: What users see and understand +- **VERSION_CODE**: Ensures every upload to Apple is unique +- Multiple builds of the same version can exist (e.g., testing different fixes) +- Apple requires VERSION_CODE to always increase for tracking \ No newline at end of file