Versioning and Xcode
If you’ve ever used
agvtool to manage versioning your project you know it’s a pain. Among other complaints, I’d rather not have version information buried in project files (or have to modify that project file to bump the version).
My initial reaction was to extract the version into something like an xcconfig file and use plist pre-processing to inject it into the Info.plist. The issue there is that Xcode doesn’t correctly pick up changes to the xcconfig file (it’s presumably looking at mod times of the
Info.plist file itself), so any version bumps require a clean build to pick up.
My next thought was to use a build rule to process the
Info.plist file manually. The downside there is that you need to change the
INFOPLIST_FILE build setting to point to the processed file in the derived sources directory, but doing so disables Xcode’s built-in editing...
Continue reading →