Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode archive uses 1.0 (1) instead of correct version number

This is a problem others have faced but the resolutions I have seen offered don't seem to work in my situation. (See Xcode is not archiving to the specified version number and Xcode Archive does not match with my build value after Xcode auto update to 14)

I am using Xcode 14.2 to create a watch app, building for "Any watchOS device(...)". When I create an archive, Xcode labels version 1.0 (1), which does not match my settings.

Any ideas on what I could try to remediate this?

What I have tried:

  • Clean the build folder
  • Hardcode the version numbers in the target's "Info" tab
  • Letting App Store Connect auto-manage my build number when I submit the build for validation (it goes to 1.0 (8) given that I've previously had a 1.0 (7) build).
  • Add the CFBundleVersion and CFBundleShortVersionString parameters to the plist for the target.

My archive

enter image description here

My target settings for the "watchOS" target:

"General" tab:

enter image description here

**"Info" tab: **

The values for "Bundle version" and "Bundle version (short)" appear to be hard-coded. If I edit them and move off the tab and then come back to it, they return to "$(CURRENT_PROJECT_VERSION)" and "$(MARKETING_VERSION)" respectively.

enter image description here

"Build Settings" tab:

These match what's in the "General" tab.

enter image description here

(FWIW, my settings for the "watchOS Intents Extension" target march the settings above.

like image 339
user709029 Avatar asked Oct 16 '25 14:10

user709029


1 Answers

I was able to resolve this issue by changing the Build Settings of the iOS target in my watch-only app. Specifically, Build Settings --> Versioning --> Current Project Version and Marketing Version.

This workaround worked for me... but I don't consider it a long term fix.

like image 197
lepolt Avatar answered Oct 19 '25 02:10

lepolt