Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

plist bundle version values

Tags:

xcode

macos

plist

I want to set the Bundle Version in my plist. However, it appears that the value that is actually LOOKED at by finder to put the version when you look at more info is "bundle versions string, short" Editing this, however, requires opening the plist file, rather than just editing the "version" in the target settings.

Is there a way to either a) make the bundle version always equal the bundle version short, b) make finder look at the bundle version instead of the short string or c) make the short version appear in the edit target settings window?

Or, is there some better way I should be dealing with this?

thanks.

like image 618
Brian Postow Avatar asked Nov 23 '09 16:11

Brian Postow


People also ask

Does the bundle contain an info plist?

plist does not contain a CFBundleVersion (Bundle version) key or a CFBundleShortVersionString (Bundle versions string, short) key. Your app must provide and set both of these keys. See Setting the Version Number and Build String for more information.

What is bundle version string?

Bundle versions string, short (CFBundleShortVersionString) is a number comprising of three integers separated by dots. First one represents any major updates of the application, such as updates that implement new features or major changes. The second integer denotes revisions that implement less prominent features.

What is CF bundle version?

CFBundleVersion (String - iOS, OS X) specifies the build version number of the bundle, which identifies an iteration (released or unreleased) of the bundle. The build version number should be a string comprised of three non-negative, period-separated integers with the first integer being greater than zero.


1 Answers

Yes, you can use ${VARIABLE} style macros the Info.plist file.

We make a user-defined setting in the project called APP_VERSION, and then use ${APP_VERSION} in the CFBundleGetInfoString (Get Info string), CFBundleShortVersionString (Bundle versions string, short) and CFBundleVersion (Bundle version) keys. At build time, the variable gets filled in with the correct version.

Watch out though because sometimes a clean build is necessary for Xcode to update the Info.plist file as it does not do dependency checking against the variables.

like image 74
Ken Aspeslagh Avatar answered Sep 20 '22 17:09

Ken Aspeslagh