ios-CFBundleVersion' and 'version' values inverted

What platform are you building for?

iOS

What framework are you building with?

Cordova

What is your build ID?

d1e49d4e-19b0-4bfa-9d16-54432c832812

What is your error message?

ios-CFBundleVersion’ and ‘version’ values ​​incorrectly (inverted)

Please describe the issue:

After days of failed attempts to upload a new build to the Apple Store, I discovered that VoltBuilder was sending the ios-CFBundleVersion and version values incorrectly (they were inverted).

Could you please confirm what the expected behavior should be?

In the version field, VoltBuilder was setting my app version (e.g. 1.1.4).
In ios-CFBundleVersion, it was setting the build number for that version (e.g. build 1, build 2, etc.).

After swapping the values — setting version to “1” and ios-CFBundleVersion to “1.1.4” — the app was successfully published to the Apple Store again.

Your log doesn’t contain enough details for me to determine what’s going on (it was a failed build due to a file missing). I can tell you that we don’t override the values you specify, so if this is a problem, it’s a problem with Cordova, and perhaps one that’s been recently introduced.

Are you able to provide me with the config.xml that worked, and the one that didn’t?

Sorry, I forgot to include the config.xml and the Voltbuilder.log.

I have the following error message for an unsuccessful build.

Set PRODUCT_BUNDLE_IDENTIFIER to com.netcontroll.xtag.
Set PRODUCT_NAME to XMenu Tag.
Set MARKETING_VERSION to 1.1.4.
Set CURRENT_PROJECT_VERSION to 17.

Project Setting Files:

    config.xml:
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" android-versionCode="18" id="com.netcontroll.xtag" ios-CFBundleVersion="17" version="1.1.4">
    <name>XMenu Tag</name>
    <description>App XTag</description>
    <platform name="ios">
        <edit-config file="*-Info.plist" mode="overwrite" target="CFBundleShortVersionString">
            <string>1.1.4</string>
        </edit-config>
        <edit-config file="*-Info.plist" mode="overwrite" target="CFBundleVersion">
            <string>17</string>
        </edit-config>


/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.4.99. (in target 'OneSignalXCFramework' from project 'Pods')
note: Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-O, expected -Onone (in target 'OneSignalXCFramework' from project 'Pods')
note: Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-O, expected -Onone (in target 'Pods-App' from project 'Pods')
note: Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-Owholemodule, expected -Onone (in target 'CordovaPlugins' from project 'CordovaPlugins')
note: Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-Owholemodule, expected -Onone (in target 'Cordova' from project 'Cordova')
note: Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-O, expected -Onone (in target 'App' from project 'App')
** ARCHIVE SUCCEEDED **

Adding xcodebuildArg: ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
Adding xcodebuildArg: LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"
2026-01-23 14:34:20.843 xcodebuild[97240:172009] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/kn/8gvj8x9d565gqj7094x61tcw0000gn/T/App_2026-01-23_14-34-20.841.xcdistributionlogs".
2026-01-23 14:34:21.198 xcodebuild[97240:172009] [MT] IDEDistribution: Command line name "app-store" is deprecated. Use "app-store-connect" instead.
Exported App to: /platforms/ios/build/Release-iphoneos
** EXPORT SUCCEEDED **

No scripts found for hook "after_compile".
No scripts found for hook "after_build".

2026-01-23 14:34:24,515 - Validating app for upload...
2026-01-23 14:35:03,145 - Output: Running altool at path '/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Frameworks/AppStoreService.framework/Support/altool'...
2026-01-23 14:34:47.902 ERROR: [altool.6000006D8180] [ContentDelivery.Uploader.6000006D8180] Validation failed (409) Invalid Version. The build with the version “9” can’t be imported because a later version has been closed for new build submissions. Choose a different version number. (ID: fd06122d-c549-46ee-a231-a422998aa30a)
2026-01-23 14:34:47.903 ERROR: [altool.6000006D8180] [ContentDelivery.Uploader.6000006D8180] Validation failed (409) This bundle is invalid. The value for key CFBundleShortVersionString [1.1.4] in the Info.plist file must contain a higher version than that of the previously approved version [14]. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: a6cf0218-d745-4217-b454-84a6a3ec4bf1)
2026-01-23 14:35:03.069  INFO: [altool.6000006D8180] [ContentDelivery.Uploader.6000006D8180] 
=======================================
VERIFY FAILED with 2 errors, 0 warnings, 0 messages
=======================================
2026-01-23 14:35:03.071 ERROR: [altool.6000006D8180] Validation failed for '/ios.app-store.ipa'.
2026-01-23 14:35:03.071 ERROR: [altool.6000006D8180] Validation failed Invalid Version. The build with the version “9” can’t be imported because a later version has been closed for new build submissions. Choose a different version number. (ID: fd06122d-c549-46ee-a231-a422998aa30a) (409)
 {
    NSLocalizedDescription = "Validation failed";
    NSLocalizedFailureReason = "Invalid Version. The build with the version \U201c9\U201d can\U2019t be imported because a later version has been closed for new build submissions. Choose a different version number. (ID: fd06122d-c549-46ee-a231-a422998aa30a)";
    NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Validation failed\" UserInfo={status=409, detail=Invalid Version. The build with the version \U201c9\U201d can\U2019t be imported because a later version has been closed for new build submissions. Choose a different version number., id=fd06122d-c549-46ee-a231-a422998aa30a, code=STATE_ERROR.VALIDATION_ERROR, title=Validation failed, NSLocalizedFailureReason=Invalid Version. The build with the version \U201c9\U201d can\U2019t be imported because a later version has been closed for new build submissions. Choose a different version number., NSLocalizedDescription=Validation failed}";
    "iris-code" = "STATE_ERROR.VALIDATION_ERROR";
}
2026-01-23 14:35:03.071 ERROR: [altool.6000006D8180] Validation failed This bundle is invalid. The value for key CFBundleShortVersionString [1.1.4] in the Info.plist file must contain a higher version than that of the previously approved version [14]. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: a6cf0218-d745-4217-b454-84a6a3ec4bf1) (409)
 {
    NSLocalizedDescription = "Validation failed";
    NSLocalizedFailureReason = "This bundle is invalid. The value for key CFBundleShortVersionString [1.1.4] in the Info.plist file must contain a higher version than that of the previously approved version [14]. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: a6cf0218-d745-4217-b454-84a6a3ec4bf1)";
    NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Validation failed\" UserInfo={status=409, detail=This bundle is invalid. The value for key CFBundleShortVersionString [1.1.4] in the Info.plist file must contain a higher version than that of the previously approved version [14]. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring, id=a6cf0218-d745-4217-b454-84a6a3ec4bf1, code=STATE_ERROR.VALIDATION_ERROR, title=Validation failed, NSLocalizedFailureReason=This bundle is invalid. The value for key CFBundleShortVersionString [1.1.4] in the Info.plist file must contain a higher version than that of the previously approved version [14]. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring, NSLocalizedDescription=Validation failed}";
    "iris-code" = "STATE_ERROR.VALIDATION_ERROR";
}

2026-01-23 14:35:03,149 - [ContentDelivery.Uploader.6000006D8180] Validation failed (409) Invalid Version.
The build with the version “9” can’t be imported because a later version has been closed for new build submissions.
Choose a different version number.
(ID: fd06122d-c549-46ee-a231-a422998aa30a)
See log for more details.
2026-01-23 14:35:03,149 - reset_keychain
2026-01-23 14:35:03,247 - Output: 
2026-01-23 14:35:03,247 - Build failed 81de8f0a-7dd4-4447-b867-227748c5a9ea
2026-01-23 14:35:04,117 - Output: Package                   Current  Wanted  Latest  Location                               Depended by
onesignal-cordova-plugin    3.3.3   3.3.3  5.2.19  node_modules/onesignal-cordova-plugin  ***

2026-01-23 14:35:04,121 - Uploading voltbuilder.log...

*I also have an adjustment that I need to make in the config.xml for the build to work.

This will not work:*

<?xml version="1.0" encoding="UTF-8"?>
<widget
xmlns = "https://www.w3.org/ns/widgets"
id = "com.netcontroll.xtag"
android-versionCode = "18"
ios-CFBundleVersion = "1.1.4"
version = "18">

This will work:

<?xml version="1.0" encoding="UTF-8"?>
<widget
xmlns = "https://www.w3.org/ns/widgets"
id = "com.netcontroll.xtag"
android-versionCode = "1.1.4"
ios-CFBundleVersion = "18"
version = "18">

I think I need a bit more information to understand:

  1. What is the version of your app in App Store Connect?
  2. What version are you trying to pass as the iOS version? 1.1.4?
  3. The error log says something about passing version 9 - this doesn’t match either of your config.xml snippets.
  4. The error log also says that CFBundleShortVersionString is set to 1.1.4, but the previously approved version was 14. This is likely why it failed.

Please give me a bit more info and I can continue looking into this.

This was the first version we published on the App Store in April 2024:

android-versionCode="5"
ios-CFBundleVersion="1.0.3"
version="{version}"

<edit-config target="CFBundleShortVersionString" file="*-Info.plist" mode="overwrite">
    <string>4</string>
</edit-config>

After that, we published several other versions using the same config.xml structure, up to the latest one, which was 1.1.3 (August 2025):

id="com.netcontroll.xtag"
android-versionCode="15"
ios-CFBundleVersion="1.1.3"
version="{version}"

<edit-config target="CFBundleShortVersionString" file="*-Info.plist" mode="overwrite">
    <string>15</string>
</edit-config>

Then we tried to upload version 1.1.4 (December/2025), and it only worked after switching the versionCode and CFBundleVersion values, as shown below:

id="com.netcontroll.xtag"
android-versionCode="1.1.4"
ios-CFBundleVersion="18"
version="18"

For this one, we removed the CFBundleShortVersionString configuration from config.xml.

For the new version, if we keep the older configuration style (as shown below), we get an error mentioning version “9”. We don’t know where this value comes from, since we submitted version 18 and we don’t have this value in our config.xml snippets..

We always set CFBundleShortVersionString to the same value as versionCode(like 1.0.3, 1.1.3, 1.1.4), so we do not understand why it says the previously approved version was 14.

id="com.netcontroll.xtag"
android-versionCode="1.1.4"
ios-CFBundleVersion="18"
version="{version}"

<edit-config target="CFBundleShortVersionString" file="*-Info.plist" mode="overwrite">
    <string>18</string>
</edit-config>

Thank you for all these details. Can you please share a screenshot of what App Store Connect reports as your current app version?

I have these two images.

The first one is when we were able to generate the APK for version 1.1.4 after making the adjustments I sent above.

It already appeared normally in the publishing portal, and the version was captured correctly (but we sent it in the field android-versionCode="1.1.4").

The second image is from the build selection step to publish the application. It is possible to see that in the Build column (Compilação) it shows 1.1.4 or 1.1.3, and in the Version column (Versão) it shows 17 and 15 respectively.

Looking at this, I believe there’s been some confusion as to what versions in Cordova correspond to various fields in App Store Connect:

ios-CFBundleVersion (in config.xml): This sets what is referred to as the build number. This is not user visible, but rather a build of a particular version. It must be incremented on each upload. If this field isn’t set, version is used in config.xml You can read more about this here: CFBundleVersion | Apple Developer Documentation

CFBundleShortVersionString: This is the user visible version. You can read more about this here: CFBundleShortVersionString | Apple Developer Documentation

You can read more about this here: Set the version number and build string - Xcode Help

Now the tricky thing here is that Cordova generally doesn’t set CFBundleShortVersionString - and I believe then App Store Connect defaults back to the CFBundleVersion. But in your case you are setting both, so you must comply with the App Store’s guidelines - that is that CFBundleVersion must be incremented each time you upload a new build, but CFBundleShortVersionString is what will be seen by the end users.

Hopefully this can help you sort this out.