Posts

Post not yet marked as solved
6 Replies
I was able to resolve this by: Adding an Info.plist file containing CFBundleVersion and CFBundleShortVersionString keys Adding INFOPLIST_FILE = <Path to Info.plist> to project.pbxproj Deleting GENERATE_INFOPLIST_FILE entirely from project.pbxproj In addition to getting rid of the "Cannot find" message, this was the only way I was able to get marketing versions to work. xcrun agvtool new-marketing-version <version> appears to be a no-op when using GENERATE_INFOPLIST_FILE. Here's a minimal example Info.plist file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleVersion</key> <string>1.0</string> <key>CFBundleShortVersionString</key> <string>1.0</string> </dict> </plist> Those two values will be altered by xcrun agvtool new-version -all <version> and xcrun agvtool new-marketing-version <version>, respectively. One important note: Anything specified with INFOPLIST_KEY_ in your project.pbxproj will no longer apply once you've opted out of GENERATE_INFOPLIST_FILE. You'll need to move those values into your new Info.plist file. For example, if you use INFOPLIST_KEY_LSUIElement = YES, you'll need to add <key>LSUIElement</key><true/> to your Info.plist. If I were Apple, I'd modify xcrun agvtool to 1) check if GENERATE_INFOPLIST_FILE = YES and 2) if so, insert e.g. INFOPLIST_KEY_CFBundleVersion = <version> into project.pbxproj instead of trying to modify Info.plist.