Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions V2er.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down Expand Up @@ -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;
};
Expand All @@ -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;
Expand All @@ -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 = "";
Expand All @@ -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;
Expand All @@ -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 = "";
Expand Down
12 changes: 12 additions & 0 deletions V2er/Config/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +1 to +12
Copy link

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Version.xcconfig file defines version values but isn't being used in the project configuration. The project.pbxproj file contains hardcoded version values instead of referencing this configuration file. Either remove this file or update the project to actually use it by including it in the build configurations.

Suggested change
// 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

Copilot uses AI. Check for mistakes.
70 changes: 70 additions & 0 deletions VERSIONING.md
Original file line number Diff line number Diff line change
@@ -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.
Comment on lines +27 to +43
Copy link

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation states versions need to be updated in 2 locations, but with the Version.xcconfig file present, this creates confusion about the actual source of truth. The documentation should either reference the xcconfig file as the single source or clarify why both approaches exist.

Suggested change
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.
To update versions, simply edit the values in the `Version.xcconfig` file at the root of the project:

MARKETING_VERSION = 1.1.2 // VERSION_NAME
CURRENT_PROJECT_VERSION = 29 // VERSION_CODE


All targets (Debug and Release) will automatically inherit these values from the xcconfig file. You do **not** need to update any values in `project.pbxproj`.

> **Note:** If you previously updated version numbers in `project.pbxproj`, you can now manage them exclusively in `Version.xcconfig` for consistency and simplicity.

Copilot uses AI. Check for mistakes.

## 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
Loading