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?
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.