iOS Swift Newbie Gotcha Reminders #2 — Apple Generic Versioning is not enabled

Raymond
iOS Newbies
Published in
2 min readJan 30, 2019

--

This is a series of of XCode / Swift / iOS Programming Gotchas to remind myself and many other beginner programmers whom are stressing out with these errors when developing their own iOS apps via XCode.

Learning is a process of making many mistakes.

2. Apple Generic Versioning is not enabled

In every project Apple requires us to specify a build number. Mind you, there is a difference between Version Number and Build Number.

You may read all about the differences here:

Most common error to occur is Apple rejects submission to appstore/testflight due to build number being the same as previous upload.

Solution: Use Fastlane

Fastlane is a cli that we can use to automate app builds/testing/deployments/releases to appstore.

One of the many features Fastlane has is it can help us auto increment build number each time we run a build to upload to Testflight.

The simple command to include in our Fastfile is:

increment_build_number

Next, we also need to remember to set the following setting to allow for fastlane to automanage our build number within our project build settings

Finally on every fastlane build, we will be able to verify the build number has incremented via Current Project Version within your project build settings.

Done!

References:

--

--