0

I've been developing and publishing a Safari Web extension for a year or so. I build an archive of the app and upload it to App Store Connect and it has been working fine for both the MacOS and iOS app.

My old Mac was too old to run xcode 14 (which is now required to publish) so I had to get a new Mac. I'm trying to upload for the first time from the new Mac (and xcode 14). The xcode files are all in git/github and came over OK.

The upload of the iOS package worked but the MacOS one consistently fails with this error:

Asset validation failed

This bundle is invalid. The value for key CFBundleVersion [1] in the Info.plist file must contain a higher version than that of the previously uploaded version [34]. Please find more information about CFBundleVersion at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion

I don't know how to fix this. It doesn't say which Info.plist file but I have searched all of the files and there is no occurrence of CFBundleVersion in any of them on either the new Mac or the old one.

Googling this error I see reports of it occurring when the "Version" field in Xcode goes from something like 1.11 > 1.2 (e.g. CFBundleVersion must be higher than previous version) This is not the case for me. I am going from 1.6.6 to 1.6.7

Any ideas on things to try to be able to upload my new MacOS version?

Namaste
  • 203
  • 1
  • 10
  • I got this response from Apple: – Namaste May 10 '23 at 23:03
  • "You only receive this error in App Store Connect when the binary version number listed in the Info.plist of your previous binary is higher than your current binary upload. The version numbers listed in App Store Connect may not necessarily match the binary version number in your CFBundleVersion. Please check the binary version number of your previous upload to be sure that it's lower than your current upload. If you check this information and still have concerns, you need to submit a technical support request to Apple Developer Technical Support." – Namaste May 10 '23 at 23:15
  • It doesn't help much. None of my Info.plist files contains version numbers. They may be referring to the project.pbxproj file. I diffed the one from my old Mac (used for last upload) against the one on my new Mac and the only differences are where I changed 1.6.6 to 1.6.7 – Namaste May 10 '23 at 23:17

1 Answers1

0

OK I found a solution.

In xcode under the "General" tab for the four targets there is an "Identity" section. This has three fields: Bundle Identifier, Version and Build

I have always left "Build" as 1. But when I use "Distribute" in the organizer to upload my package there is an option "Manage Version and Build Number” and I have always had checked.

It appears that that option increments the "Build" number. But it never changes it in the Xcode project. I'm not sure where it keeps track of it - it is not in the package.

So the invisible build number must have got to 34 on my old Mac. So I changed the "Build" number in the xcode project to 35 for all 4 targets and I was able to upload.

I'm not sure if I will now have to manually increment the Build number every time I do a release. I will try not doing it for the next release and see what happens - the "Manage Version and Build Number” may do it for me.

Namaste
  • 203
  • 1
  • 10
  • Crazy that fixed for me as well. Clearly my Version was higher than previous, but Xcode still complained. I am not checking "Automatically update version" again! – Mikrasya Jun 11 '23 at 20:12