Do I have to increment the the CFBundleVersion in my extension's Info.plist to ensure it overwrites existing ones? Or if doing so in the main app's Info.plist is enough?
I'm working on today extension, but I guess the question applies to all embedded binaries.
Bookmark this question. Show activity on this post. This is my first iOS app submission and I don't want my app rejected. This is from the Apple Docs: CFBundleVersion (String - iOS, OS X) specifies the build version number of the bundle, which identifies an iteration (released or unreleased) of the bundle.
The release or version number of the bundle. This key is a user-visible string for the version of the bundle. The required format is three period-separated integers, such as 10.14.1. The string can only contain numeric characters (0-9) and periods. Each integer provides information about the release in the format [ Major ]. [ Minor ]. [ Patch ]:
The "version" ( CFBundleVersion) is more of an internal version number that could change far more frequently than the public "short version". Personally I use the same for both but many people update the "version" on every build. Either way you typically update the "short version" when you release to Apple.
Increment Version Number:increment_version_numberaction can be used to increment the version number of the release. increment_version_number(bump_type: "major" # Automatically increment major version number)
Building on @atomkirk's answer, in my apps the version and build numbers are set in the xcodeproject
. So instead of I need to use xcodebuild
to pull out the relevant values:
buildNumber=$(xcodebuild -showBuildSettings -project App.xcodeproj | pcregrep -o1 "PROJECT_VERSION = ([0-9a-f\-]+)")
marketingVersion=$(xcodebuild -showBuildSettings -project App.xcodeproj | pcregrep -o1 "MARKETING_VERSION = ([0-9a-f\-.]+)")
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$SRCROOT/Share Extension/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $marketingVersion" "$SRCROOT/Share Extension/Info.plist"
I think Apple would actually prefer App Extensions to use the same bundle version as the app they are contained in. This is the email I have been getting from iTunes Connect with every submission:
We have discovered one or more issues with your recent delivery for "Awesome App". Your delivery was successful, but you may wish to correct the following issues in your next delivery:
CFBundleVersion Mismatch - The CFBundleVersion value '94' of extension 'Awesome App.app/PlugIns/Awesome App Today Extension.appex' does not match the CFBundleVersion value '99' of its containing iOS application 'Awesome App.app'.
CFBundleShortVersionString Mismatch - The CFBundleShortVersionString value '1.0' of extension 'Awesome App.app/PlugIns/Awesome App Today Extension.appex' does not match the CFBundleShortVersionString value '1.3.0' of its containing iOS application 'Awesome App.app'.
After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.
I can ignore these warnings and the build passes review but this is either a bug in iTunes Connect or the numbers should be the same. This doesn't actually make sense since the extension won't necessarily be updated at the same rate of the app. Anyways
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With