CFBundleShortVersionString of an app extension must match that of its containing parent app

Every time I try to update my newest sticker pack in Xcode, It gives me this error "warning: The CFBundleShortVersionString of an app extension ('1.2') must match that of its containing parent app ('1.0')."

Post not yet marked as solved Up vote post of reikangaaaru Down vote post of reikangaaaru
6.1k views

Replies

Yes, that’s correct.

To fix this, look at the Current Project Version (CURRENT_PROJECT_VERSION) and Marketing Version (MARKETING_VERSION) build settings in your project. The values for your app and appex must be the same. I usually do this by deleting these build settings from each target and setting them at the project level, which allows both targets to inherit the same value.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • Hi Quinn,

    I did that what you suggested. But I get now a new error: The CFBundleVersion of an app extension (null) must match that of its containing parent app ('3').

    I don't think we can entirely remove CURRENT_PROJECT_VERSION and MARKETING_VERSION for the targets.

Add a Comment

Thank you, I'm still unsure about one thing, how do I delete these build settings from each target and set them at the project level?

Have a read of Configuring the build settings of a target.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Build setting of a target documentation does not show me how to delete the existing settings. Although the Current Project Version (CURRENT_PROJECT_VERSION) and Marketing Version on my target and project level are same but I still get this error. any other solutions?

Xcode 15 does not show Version and Build settings for app extensions in Project > Targets > target > General any more. In Xcode 14 I have been manually changing those versions to keep them in sync (and avoid warnings or errors).

Moving the setting from target level to project level as suggested by Eskimo from Apple fixed the problem (and simplifies the workflow so that I do not need to manually keep the versions in sync).

How to move the settings?

  • Go to Project > main target > Build Settings. Enable "Levels".
  • Enter CURRENT_PROJECT_VERSION into Filter.
  • Edit the value for the project level (double click on the empty value in the project column).
  • Remove the value for the main target level (single click the value in the target column, press Delete key on keyboard).
  • Similarly for the MARKETING_VERSION. Enter it into Filter, enter the value for the project level, remove it from target level.

Then, for each app extension target (Project > an app extension target > Build Settings):

  • Remove the project level value for both settings.
  • However changing the version in Project > main target > General > Identity > Version (or Build) changes the version at target level not on project level (so it will get you out of sync).

  • @marian.cerny what if I have different environments, dev, prod, staging schemes, and each of these have different versions. (Btw I am using Flutter, and my application version is available in the Runner target, so what would be in this case your approach)

Add a Comment