I’m trying to upload an app to the AppStore for testing with TestFlight.
At the end of the upload, I obtain a message stating:
This bundle is invalid. The value for key CFBundleVersion [2-15] in the Info.plist file must be a period-separated list of at most three non-negative integers. Please find more…
There is no CFBundleVersion
in my Info.plist. I can see it only in the Target Properties. I checked every other Info.plist of the packages I import with SPM or Carthage and they use <key>CFBundleVersion</key><string>1</string>
.
I tried to change the value in the Target Properties, using a simple digit, but this doesn’t help.
I tried adding CFBundleVersion
and other CFBundle*
keys in the Info.plist, but that didn’t help either.
What is stopping my upload?
My Info.plist:
<?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>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
</dict>
</array>
</dict>
</dict>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
2
Answers
I finally discover that in a binary xcframework downloaded with Carthage CFBundleVersion was "2-15". I didn't notice before because
grep
showed me the content of the other imported Info.plist files, but onlyBinary file .../Info.plist matches
for this xcframework and I skipped it.Updated the binary xcframework, I was able to upload the app.
Yes, there is. Because you’re viewing the plist file in
Property List
mode. You can change the view mode toSource Code
to see the keyCFBundleVersion
It’s something like:
And you may need to double-check the current version in
Project -> Targets -> General
. Its location is inIdentity
section.