Xcode automatic version

Make sure developers have had such trouble:Version submitted wrong!

Version of the compiler and testing more,When the inevitable submitted only to find the wrong version number。Or is the background version number is correct,Reception forget to change the version number。In fact,Allows reception automatically obtain the version number of the background data,For example, this:

But

Background version still have to manually write ah! It fills the major version number,Different programs have their own different style,This is not a number and some even skipped,Then builds it? Every time to manually change,Or accidentally forget going to spend an hour to re-compile,This is a very boring thing。

In fact, you can make the build number (build) increment:

Add a compiled script in your project: Targets → your target → Build Phases → Run Script

Only you need to change the content of the script as follows:

note,If your project has multiple compile targets - such as the input method had pocketed input method and keyboard plug two main app,Then these two should be added,And you have to be consistent version number of the two projects,So that they would be uniform increments,When submitted no warning。

Original article written by Gerber drop-off:R0uter's Blog » Xcode automatic version

Reproduced Please keep the source and description link:https://www.logcg.com/archives/2539.html

About the Author

R0uter

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *