Menu

1 / 5

The iOS Build Number That Stayed at 1: Three Failed Fixes and One That Worked

DEV Community: ios·Nesim Razon·about 2 hours ago
#41IIf1wR
#devtoios#devto#dev#build#number
Reading 0:00
15s threshold

Every upload to App Store Connect needs a build number higher than the one before it. Our cloud pipeline kept producing a package whose build number was 1, no matter what we changed. It took three attempts to find out why. This is the story and the fix, for anyone who builds iOS apps from a generated Xcode project without a Mac of their own.

The symptom

The upload step failed with an error saying the bundle version must be higher than the previously uploaded one. The first upload of an app always works, so the problem only shows from the second build on. The number shown for the build on the store side was 1 every time.

Two numbers are involved. The marketing version, such as 1.0, is what people see. The build number, CFBundleVersion, only has to increase with every upload of the same marketing version.

Attempt one: archive flags

The build tool has a way of passing extra flags to the archive command, so we passed the build number there. Nothing changed.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.