I have an .app which I want to distribute on the AppStore. The AppStore page is set up. I would like to upload a first build. I create a .pkg file with
pkgbuild --install-location ~/Applications --component ./AppName.app ./PkgFileName.pkg
This succeeds, and if I run this file created locally it correctly installs in the applications folder. After this I would like to validate this file with altool:
xcrun altool --validate-app -f ./PkgFileName.pkg -t osx -u <my_apple_id> -p @keychain:"altoolpass"
This fails with the following message:
*** Error: Validation failed for 'PkgFileName.pkg'.
*** Error: Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in ‘PkgFileName.pkg’. Unable to validate your application. (-21017)
{
NSLocalizedDescription = "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in \U2018<app_name>\U2019.";
NSLocalizedFailureReason = "Unable to validate your application.";
}
I'm stumped by this, because the original .app file contains an Info.plist in .app/Contents/Info.plist, and this file has the CFBundleIdentifier key, and the value is the same as we set up on the AppStore page. Why is it still giving me this error?