Open danielkotzer opened 2 years ago
I get that same error when I run that on a pkg file. I'm not convinced it's meant to work with pkg files; if I run it on the .app bundle that was used to create the pkg, we get very different information back..
If you add --verbose
on the end of your command, near the end of the output you may spot this sort of thing:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>product-errors</key>
<array>
<dict>
<key>code</key>
<string>ProductIsBadArchive</string>
<key>description</key>
<string>Product archive "....pkg" is not a valid format</string>
</dict>
</array>
<key>tool-version</key>
<string>InstallCmds-822</string>
</dict>
</plist>
which is a bit more generic.
I can upload files to the mac store also with the Transporter app, there you can see clearly you can only upload to the app store either ipa files or pkg files, no other format, one for iPhones and one for mac apps, that's it. If I try to upload a pkg file to the mac store with Transporter I get a different error:
Could not create a temporary .itmap package for the app “GT.pkg”. Lookup application information from the web service failed.
maybe this will give you another clue, but for sure the mac store accepts only pkg files, nothing else. could be the error message you got "Product archive '....pkg' is not a valid format" means that this particular pkg file is not build correctly in the right format. xcrun altool --validate-app is just checking to see the file will be accepted to the mac store.
clearly something is wrong with the way the Air SDK is building the mac app from an Air file with adt, then the pkgbuild which is an internal command line within macOS can't build a proper file from this app and it is rejected because it can't find the Bundle Identifier, no other option, believe me I did everything possible, this must be a bug in Air, some one in the developer team needs to check what causes this error.
What is the error message you get with that --verbose
option via altool
? The attempt from which I copied the previous snippet was a pkg file that didn't have anything to do with AIR.. so it may just be that the error messages you're seeing are generic and aren't giving detailed enough information..
the result I get on Terminal when using the command line with the additional parameter --verbose is very long:
xcrun altool --validate-app -f --verbose GT.pkg -t macos -u MyName@gmail.com --password app-specific-password
2022-11-22 22:30:17.899 Verbose logging enabled.
2022-11-22 22:30:17.900 Will look for transporter at executable bundle relative path: /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/itms/bin/iTMSTransporter
2022-11-22 22:30:17.900 Looking for Transporter at path: /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/itms/bin/iTMSTransporter
2022-11-22 22:30:17.900 Looking for Transporter at path: /Applications/Xcode.app/Contents/Developer/usr/bin/../SharedFrameworks/ContentDeliveryServices.framework/itms/bin/iTMSTransporter
2022-11-22 22:30:17.900 Looking for Transporter at path: /Applications/Xcode.app/Contents/Developer/usr/bin/../itms/bin/iTMSTransporter
2022-11-22 22:30:17.900 Looking for Transporter at path: /Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter
2022-11-22 22:30:17.900 Looking for Transporter at path: /usr/local/itms/bin/iTMSTransporter
2022-11-22 22:30:17.900 Using default transporter location: /usr/local/itms/bin/iTMSTransporter
2022-11-22 22:30:17.900 iTMSTransporter is not available. Using REST APIs.
2022-11-22 22:30:18.925 jsonURL = https://contentdelivery.itunes.apple.com/WebObjects/MZLabelService.woa/json/MZITunesSoftwareService
2022-11-22 22:30:18.926 jsonRequest as dictionary = {
id = "20221122223018-661";
jsonrpc = "2.0";
method = generateAppleConnectToken;
params = {
Application = altool;
ApplicationBundleId = "com.apple.itunes.altool";
FrameworkVersions = {
"com.apple.itunes.connect.ITunesConnectFoundation" = "6.043 (14043)";
"com.apple.itunes.connect.ITunesConnectFoundationExtras" = "6.043 (14043)";
"com.apple.itunes.connect.ITunesPackage" = "6.043 (14043)";
};
OSIdentifier = "Mac OS X 12.5.0 (Unknown)";
Password = "hidden value";
Username = "MyName@gmail.com";
Version = "6.043 (14043)";
};
}
2022-11-22 22:30:18.926 Setting request length to: 517
2022-11-22 22:30:20.524 jsonResponse as string = {"result":{"ApplicationSettings":{"SkipValidateFirenzeSPIUsage":false,"PerformServerVerification":true,"ITunesSoftwareServiceAllowedPlatforms":[{"restApiPlatformEnum":"IOS","validationMethod":"ios","platformCriteria":{"plistEntries":{"MinimumOSVersion":"","LSRequiresIPhoneOS":""}},"displayName":"iOS App","sdkID":"com.apple.platform.iphoneos","restApiPlatformUTI":"com.apple.ipa","type":1,"xmlID":"ios","serverID":"Purple","platformDirectory":"iPhoneOS.platform"},{"restApiPlatformEnum":"MAC_OS","validationMethod":"osx","platformCriteria":{"plistEntries":{"LSMinimumSystemVersion":""}},"displayName":"macOS App","sdkID":"com.apple.platform.macosx","restApiPlatformUTI":"com.apple.pkg","type":2,"xmlID":"osx","serverID":"Firenze","platformDirectory":"MacOSX.platform"},{"validationMethod":"iap","displayName":"In-App Purchase","type":3,"serverID":"InAppPurchase"},{"restApiPlatformEnum":"TV_OS","validationMethod":"ios","platformCriteria":{"plistEntries":{"UIDeviceFamily":3}},"displayName":"tvOS App","sdkID":"com.apple.platform.appletvos","restApiPlatformUTI":"com.apple.ipa","type":4,"xmlID":"appletvos","serverID":"AppleTVOS","platformDirectory":"AppleTVOS.platform"},{"validationMethod":"ios","displayName":"watchOS","sdkID":"com.apple.platform.watchos","type":6,"platformDirectory":"WatchOS.platform"}],"IsEnabledForMasteredForItunes":false,"MZWebServiceValidateSoftwareSPIUsageMaximumSize":1048576,"TerritoriesAllowedToAlterPlusQuality":["JP"],"SkipValidatePurpleSPIUsage":false,"Notarization":{"Status":"DEPRECATED","Message":"altool has been deprecated for notarization and starting in late 2023 will no longer be supported by the Apple notary service. You should start using notarytool to notarize your software."},"IsDisplayArtistVisible":false,"MZWebServiceTimeOut":900,"ITunesCrashLogServiceAddress":"https://contentdelivery.itunes.apple.com/WebObjects/MZLabelService.woa/json/MZITunesProducerService","SkipValidateProductErrors":true,"IsISBNOptional":true,"softwareUserGuideFilePath":"https://help.apple.com/itc/apploader/","IsPublicationDateOptional":false,"BookSeriesSequenceNumberFormatter":"#.#;0;#0.#","IsVendorIDEditablePreferenceEnabled":true,"AllowsMetadataOnlyInitialImport":false,"ShouldPricingTabBeDisplayed":true,"VerifyZipIntegrity":true},"EnableJWTForAllCalls":false,"ShouldUseFeatures":null,"DSToken":"DAWTKNV323952cf8084a204fb20ab2508441a07d02d3f9b9319ba8100cd68c81b4df7b986ef8f1fced6c2cd5cfc789183a27aba99549a4996902fb9c22ca6b3d364c4426c4c6d04339b262116d047bf1786d9def0627d60001950f7aeb81459186e18b3b539f4a737e04d6731b77729713b8d35141915c5084814e585182c590431b1d755a78d1a2f4aa9c7d0d773f3e9e155190abd99908990e9d4d9826df582cd22b57aee972f5b196f0337c0c8ed1abc9ccc44d51aa097232ce5083b116f4072df26b4f0845643580da3bcad52ecb73deec4d28b81443fa5b688c933e2f72e7816df10d07a1cded35797839a42fa89744697baedb77cd3a6ac58f43eb8126692d19a4cf6721975d11ade8a08a25c9d7515d6863856162f8da9ceb6ac4efb7881253c630354b69975c81c3a4045754f310531dafc24bdbd35ff557ccc6f9ffef5efd43c01e564809f8abc1fdafb2141dd6b3b72676ab0c0c759ca8e4dde707bbc1da07a99a2683df925fdd6d9ddcd0277777348b03585a47V3","DSTokenCookieName":"myacinfo","ShouldUseRESTAPIs":false,"StreamingSettings":{"MultipartUploadsEnabled":true,"AssetDescriptionStreamingEnabled":false,"LogStreamingEnabled":true}},"id":"20221122223018-661","jsonrpc":"2.0"}
2022-11-22 22:30:20.526 Web service call (generateAppleConnectToken) result: {
ApplicationSettings = {
AllowsMetadataOnlyInitialImport = 0;
BookSeriesSequenceNumberFormatter = "#.#;0;#0.#";
ITunesCrashLogServiceAddress = "https://contentdelivery.itunes.apple.com/WebObjects/MZLabelService.woa/json/MZIT\U2026";
ITunesSoftwareServiceAllowedPlatforms = (
{
displayName = "iOS App";
platformCriteria = {
plistEntries = {
LSRequiresIPhoneOS = "";
MinimumOSVersion = "";
};
};
platformDirectory = "iPhoneOS.platform";
restApiPlatformEnum = IOS;
restApiPlatformUTI = "com.apple.ipa";
sdkID = "com.apple.platform.iphoneos";
serverID = Purple;
type = 1;
validationMethod = ios;
xmlID = ios;
},
{
displayName = "macOS App";
platformCriteria = {
plistEntries = {
LSMinimumSystemVersion = "";
};
};
platformDirectory = "MacOSX.platform";
restApiPlatformEnum = "MAC_OS";
restApiPlatformUTI = "com.apple.pkg";
sdkID = "com.apple.platform.macosx";
serverID = Firenze;
type = 2;
validationMethod = osx;
xmlID = osx;
},
{
displayName = "In-App Purchase";
serverID = InAppPurchase;
type = 3;
validationMethod = iap;
},
{
displayName = "tvOS App";
platformCriteria = {
plistEntries = {
UIDeviceFamily = 3;
};
};
platformDirectory = "AppleTVOS.platform";
restApiPlatformEnum = "TV_OS";
restApiPlatformUTI = "com.apple.ipa";
sdkID = "com.apple.platform.appletvos";
serverID = AppleTVOS;
type = 4;
validationMethod = ios;
xmlID = appletvos;
},
{
displayName = watchOS;
platformDirectory = "WatchOS.platform";
sdkID = "com.apple.platform.watchos";
type = 6;
validationMethod = ios;
}
);
IsDisplayArtistVisible = 0;
IsEnabledForMasteredForItunes = 0;
IsISBNOptional = 1;
IsPublicationDateOptional = 0;
IsVendorIDEditablePreferenceEnabled = 1;
MZWebServiceTimeOut = 900;
MZWebServiceValidateSoftwareSPIUsageMaximumSize = 1048576;
Notarization = {
Message = "altool has been deprecated for notarization and starting in late 2023 will no lo\U2026";
Status = DEPRECATED;
};
PerformServerVerification = 1;
ShouldPricingTabBeDisplayed = 1;
SkipValidateFirenzeSPIUsage = 0;
SkipValidateProductErrors = 1;
SkipValidatePurpleSPIUsage = 0;
TerritoriesAllowedToAlterPlusQuality = (
JP
);
VerifyZipIntegrity = 1;
softwareUserGuideFilePath = "https://help.apple.com/itc/apploader/";
};
DSToken = "DAWTKNV323952cf8084a204fb20ab2508441a07d02d3f9b9319ba8100cd68c81b4df7b986ef8f1fc\U2026";
DSTokenCookieName = myacinfo;
EnableJWTForAllCalls = 0;
ShouldUseFeatures = "
2022-11-22 22:30:20.561 jsonURL = https://contentdelivery.itunes.apple.com/WebObjects/MZLabelService.woa/json/MZContentDeliveryService
2022-11-22 22:30:20.562 jsonRequest as dictionary = {
id = "20221122223020-720";
jsonrpc = "2.0";
method = authenticateForSession;
params = {
Application = altool;
ApplicationBundleId = "com.apple.itunes.altool";
"DS_PLIST" = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n
2022-11-22 22:30:21.729 Waiting for 0 operations to complete 2022-11-22 22:30:21.729 ITunesSoftwareServiceFileLogging cleaning up 2022-11-22 22:30:21.729 Error: Validation failed for 'GT.pkg'. 2022-11-22 22:30:21.730 Error: Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in ‘GT.pkg’. Unable to validate your application. (-21017) { NSLocalizedDescription = "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in \U2018GT.pkg\U2019."; NSLocalizedFailureReason = "Unable to validate your application."; }
`
The attempt from which I copied the previous snippet was a pkg file that didn't have anything to do with AIR.. so it may just be that the error messages you're seeing are generic and aren't giving detailed enough information..
You say it has nothing to do with the pkg file, and I say it has, because the pkg file is only the shell of the app file, the installation app of the app inside of it, and here is a link to the same problem I have, and the solution is in the creation of the *.app file with xcodebuild command, so it is the way the xcodebuild is creating the app, which makes the plist file invisible because it is not in the right path. But in xcodebuild I have solution there, while if adt is the tool I'm using to create the app I have no control over it, so this is something the developer team should fix. https://developer.apple.com/forums/thread/706441
I'm not suggesting that it isn't the pkg file, more that the error message isn't conclusive enough because another (non-AIR) package that's working perfectly fine is also ending up with that same error message....
So just to check, can you try running the below command:
/usr/libexec/productutil --skip-attr-checks --package GT.pkg --expand ~/Documents/pkginfo
and then checking the contents of the files:
~/Documents/pkginfo/Distribution
~/Documents/pkginfo/package.id.pkg/PackageInfo
The link you pasted suggested that they had ended up with the pkg file within a folder that also had the pkg name hence they'd called altool with a folder name rather than a filename, presumably that's not what you're doing here though as you're not creating the package using the archive tool but just using pkgbuild..?
thanks
/usr/libexec/productutil --skip-attr-checks --package GT.pkg --expand ~/Documents/pkginfo <?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">
less ~/Documents/pkginfo/Distribution /Users/shai/Documents/pkginfo/Distribution: No such file or directory less ~/Documents/pkginfo/package.id.pkg/PackageInfo /Users/shai/Documents/pkginfo/package.id.pkg/PackageInfo: No such file or directory
The link you pasted suggested that they had ended up with the pkg file within a folder that also had the pkg name hence they'd called altool with a folder name rather than a filename, presumably that's not what you're doing here though as you're not creating the package using the archive tool but just using pkgbuild..?
The link suggested that some changes have been made to the xcodebuild command and it now requiers for the -exportPath parameter a directory, not a file name, and since a folder was created by the name of the pkg file, and the pkg file was written in it, he was validating the directory not the file.
So what happend because of that? the plist file was not found by the xcrun altool --validate-app command, because it was hiding in a place different then where it was supposed to be.
So, maybe when the Air SDK adt command line is creating the app file out of the *.air file, it is placing the plist file in a place where it can't be found by the xcrun altool --validate-app command? It is not where the xcrun altool --validate-app command line is expecting to see it. or it is not written correctly.
To try to solve this problem I tried to create the pkg file with this command after putting the app and the plist file in a folder called MyAppBundle, so I can add a plist file to it:
pkgbuild --root ./MyAppBundle --component-plist 'Info.plist' --identifier 'com.company.product' GT.pkg
and I constantly got errors about not being able to read the info.plist file.
So, maybe when the Air SDK adt command line is creating the app file out of the *.air file, it is placing the plist file in a place where it can't be found by the xcrun altool --validate-app command? It is not where the xcrun altool --validate-app command line is expecting to see it. or it is not written correctly.
Can we check this -> presumably then you have a folder which is GT.app..? From your original post:
pkgbuild --component GT.app --version 1.7.7 --install-location /Applications --sign "3rd Party Mac Developer Installer: mycompany, Inc. (xxxxxxxxxxxxx)" GT.pkg
pkgbuild: Adding component at /Applications/AIRSDK_MacOS/bin/GT.app
so can you do find /Applications/AIRSDK_MacOS/bin/GT.app -name "Info.plist"
and just check that the result is /Applications/AIRSDK_MacOS/bin/GT.app/Contents/Info.plist
?
I'm slightly concerned seeing your use of this under /Applications as traditionally I'd have thought this is only writable by the root user, wondering whether there may be some issue with permissions. So it perhaps would be better to output stuff somewhere under ~/Documents, particularly if you're using a relatively recent macOS version?
But then once you have the .app bunde and assuming it's set up properly with Info.plist
, MacOS
, Resources
etc under that initial Contents
folder, then the first pkgbuild
command is what we would use, giving it the component name. The use of the --root
option I've not tried. But something perhaps is going wrong at that stage, if the resulting PKG file can't even be extracted by the productutil
command?
thanks
Can we check this -> presumably then you have a folder which is GT.app..? From your original post:
In my original post I showed a post, in which the person creating the app using xcodebuild had to use the folder name as the destination of the build, which created a problem when using pkgbuild, and this made the plist hidden to the pkgbuild command and this created this error message I am dealing with, I was just suggesting that this message is shown when the plist is not found, at least in some cases. But I'm creating the app with adt, not with xcodebuild so I'm not nesseserally have a folder named GT.app, I don't know how adt is working, if it uses the xcodebuild and how. all I wanted to show it that this particular error message could be created if the plist is not found.
Your idea of taking the app creation out of the bin folder is a good idea, I took it out, into a folder called app on my desktop and did everything from there but didn't see any change, here is all the process I did in Terminal:
bash /Applications/AIRSDK_MacOS/bin/adt -package -target bundle GT.app GT.air
codesign --entitlements app.entitlements -f --options runtime --strict --timestamp -v -s "3rd Party Mac Developer Application: mycompany, Inc. (xxxxxxxxxx)" --deep "GT.app"
GT.app: replacing existing signature
GT.app: signed app bundle with Mach-O universal (x86_64 arm64) [com.company.product]
pkgbuild --component GT.app --version 1.7.7 --install-location /Applications --sign "3rd Party Mac Developer Installer: mycompany, Inc. (xxxxxxxxxx)" GT.pkg
pkgbuild: Adding component at /Users/name/Desktop/app/GT.app
pkgbuild: Signing package with identity "3rd Party Mac Developer Installer: mycompaney, Inc. (xxxxxxxxxxxxxx)" from keychain /Users/name/Library/Keychains/login.keychain-db
pkgbuild: Adding certificate "Apple Worldwide Developer Relations Certification Authority"
pkgbuild: Adding certificate "Apple Root CA"
pkgbuild: Wrote package to GT.pkg
xcrun altool --validate-app -f --verbose GT.pkg -t macos -u myname@gmail.com --password app-specific-password
2022-11-24 19:46:54.883 Verbose logging enabled.
2022-11-24 19:46:54.886 Will look for transporter at executable bundle relative path: /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/itms/bin/iTMSTransporter
2022-11-24 19:46:54.886 Looking for Transporter at path: /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/itms/bin/iTMSTransporter
2022-11-24 19:46:54.886 Looking for Transporter at path: /Applications/Xcode.app/Contents/Developer/usr/bin/../SharedFrameworks/ContentDeliveryServices.framework/itms/bin/iTMSTransporter
2022-11-24 19:46:54.886 Looking for Transporter at path: /Applications/Xcode.app/Contents/Developer/usr/bin/../itms/bin/iTMSTransporter
2022-11-24 19:46:54.886 Looking for Transporter at path: /Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter
2022-11-24 19:46:54.886 Looking for Transporter at path: /usr/local/itms/bin/iTMSTransporter
2022-11-24 19:46:54.886 Using default transporter location: /usr/local/itms/bin/iTMSTransporter
2022-11-24 19:46:54.886 iTMSTransporter is not available. Using REST APIs.
2022-11-24 19:46:56.463 jsonURL = https://contentdelivery.itunes.apple.com/WebObjects/MZLabelService.woa/json/MZITunesSoftwareService
2022-11-24 19:46:56.464 jsonRequest as dictionary = {
id = "20221124194656-241";
jsonrpc = "2.0";
method = generateAppleConnectToken;
params = {
Application = altool;
ApplicationBundleId = "com.apple.itunes.altool";
FrameworkVersions = {
"com.apple.itunes.connect.ITunesConnectFoundation" = "6.043 (14043)";
"com.apple.itunes.connect.ITunesConnectFoundationExtras" = "6.043 (14043)";
"com.apple.itunes.connect.ITunesPackage" = "6.043 (14043)";
};
OSIdentifier = "Mac OS X 12.5.0 (Unknown)";
Password = "hidden value";
Username = "myname@gmail.com";
Version = "6.043 (14043)";
};
}
2022-11-24 19:46:56.464 Setting request length to: 517
2022-11-24 19:46:57.892 jsonResponse as string = {"result":{"ApplicationSettings":{"SkipValidateFirenzeSPIUsage":false,"PerformServerVerification":true,"ITunesSoftwareServiceAllowedPlatforms":[{"restApiPlatformEnum":"IOS","validationMethod":"ios","platformCriteria":{"plistEntries":{"MinimumOSVersion":"","LSRequiresIPhoneOS":""}},"displayName":"iOS App","sdkID":"com.apple.platform.iphoneos","restApiPlatformUTI":"com.apple.ipa","type":1,"xmlID":"ios","serverID":"Purple","platformDirectory":"iPhoneOS.platform"},{"restApiPlatformEnum":"MAC_OS","validationMethod":"osx","platformCriteria":{"plistEntries":{"LSMinimumSystemVersion":""}},"displayName":"macOS App","sdkID":"com.apple.platform.macosx","restApiPlatformUTI":"com.apple.pkg","type":2,"xmlID":"osx","serverID":"Firenze","platformDirectory":"MacOSX.platform"},{"validationMethod":"iap","displayName":"In-App Purchase","type":3,"serverID":"InAppPurchase"},{"restApiPlatformEnum":"TV_OS","validationMethod":"ios","platformCriteria":{"plistEntries":{"UIDeviceFamily":3}},"displayName":"tvOS App","sdkID":"com.apple.platform.appletvos","restApiPlatformUTI":"com.apple.ipa","type":4,"xmlID":"appletvos","serverID":"AppleTVOS","platformDirectory":"AppleTVOS.platform"},{"validationMethod":"ios","displayName":"watchOS","sdkID":"com.apple.platform.watchos","type":6,"platformDirectory":"WatchOS.platform"}],"IsEnabledForMasteredForItunes":false,"MZWebServiceValidateSoftwareSPIUsageMaximumSize":1048576,"TerritoriesAllowedToAlterPlusQuality":["JP"],"SkipValidatePurpleSPIUsage":false,"Notarization":{"Message":"altool has been deprecated for notarization and starting in late 2023 will no longer be supported by the Apple notary service. You should start using notarytool to notarize your software.","Status":"DEPRECATED"},"IsDisplayArtistVisible":false,"MZWebServiceTimeOut":900,"ITunesCrashLogServiceAddress":"https://contentdelivery.itunes.apple.com/WebObjects/MZLabelService.woa/json/MZITunesProducerService","SkipValidateProductErrors":true,"IsISBNOptional":true,"softwareUserGuideFilePath":"https://help.apple.com/itc/apploader/","IsPublicationDateOptional":false,"BookSeriesSequenceNumberFormatter":"#.#;0;#0.#","IsVendorIDEditablePreferenceEnabled":true,"AllowsMetadataOnlyInitialImport":false,"ShouldPricingTabBeDisplayed":true,"VerifyZipIntegrity":true},"EnableJWTForAllCalls":false,"ShouldUseFeatures":null,"DSToken":"DAWTKNV323952cf8084a204fb20ab2508441a07d02d3df96a659d82c8e4416f6f518ba476ad9777eaf9d384b6fa20a0e996b4f52440306a7eec84dc843611a85aef927181fa8ff9c5d2057d987a0b455aabaf8cef54a2773f81b29db923ca90ef9645cd59e5e4d4497f8bacc2383f8ed874d215bb6b01de6eb7f1d1be1199e0df0655710b6715816526444f843970f1ff4144435efbc45397e0fc4dd369aff002be7761edbe2b441834cf63abe2579b70c176deec356aa09d27bd08207b02f3d5cf4c25e0e637da5607f3cf9791a96e7d3103b8a109ee07ad9ce1143592297499fe097d5e037f8407093300b3eb75cfd851d5e8fcccf4c97c3fc5b8da9386b0b7389479196b286bae939a1910d457b5d5011a5ca98e67c610c41ae404c4294f573bca3c2777d6bbc543bddf738d2d2e7b9089bfa16b9c973120f8cd2dcf51a5dd96c6aff6ff35ae7647664fd93a430498394fdb9e09c6bd1817e733ebfa4fae6d242ef7146714b5a583abed557efc28dc3052ee09a94585a47V3","DSTokenCookieName":"myacinfo","ShouldUseRESTAPIs":false,"StreamingSettings":{"MultipartUploadsEnabled":true,"AssetDescriptionStreamingEnabled":false,"LogStreamingEnabled":true}},"id":"20221124194656-241","jsonrpc":"2.0"}
2022-11-24 19:46:57.895 Web service call (generateAppleConnectToken) result: {
ApplicationSettings = {
AllowsMetadataOnlyInitialImport = 0;
BookSeriesSequenceNumberFormatter = "#.#;0;#0.#";
ITunesCrashLogServiceAddress = "https://contentdelivery.itunes.apple.com/WebObjects/MZLabelService.woa/json/MZIT\U2026";
ITunesSoftwareServiceAllowedPlatforms = (
{
displayName = "iOS App";
platformCriteria = {
plistEntries = {
LSRequiresIPhoneOS = "";
MinimumOSVersion = "";
};
};
platformDirectory = "iPhoneOS.platform";
restApiPlatformEnum = IOS;
restApiPlatformUTI = "com.apple.ipa";
sdkID = "com.apple.platform.iphoneos";
serverID = Purple;
type = 1;
validationMethod = ios;
xmlID = ios;
},
{
displayName = "macOS App";
platformCriteria = {
plistEntries = {
LSMinimumSystemVersion = "";
};
};
platformDirectory = "MacOSX.platform";
restApiPlatformEnum = "MAC_OS";
restApiPlatformUTI = "com.apple.pkg";
sdkID = "com.apple.platform.macosx";
serverID = Firenze;
type = 2;
validationMethod = osx;
xmlID = osx;
},
{
displayName = "In-App Purchase";
serverID = InAppPurchase;
type = 3;
validationMethod = iap;
},
{
displayName = "tvOS App";
platformCriteria = {
plistEntries = {
UIDeviceFamily = 3;
};
};
platformDirectory = "AppleTVOS.platform";
restApiPlatformEnum = "TV_OS";
restApiPlatformUTI = "com.apple.ipa";
sdkID = "com.apple.platform.appletvos";
serverID = AppleTVOS;
type = 4;
validationMethod = ios;
xmlID = appletvos;
},
{
displayName = watchOS;
platformDirectory = "WatchOS.platform";
sdkID = "com.apple.platform.watchos";
type = 6;
validationMethod = ios;
}
);
IsDisplayArtistVisible = 0;
IsEnabledForMasteredForItunes = 0;
IsISBNOptional = 1;
IsPublicationDateOptional = 0;
IsVendorIDEditablePreferenceEnabled = 1;
MZWebServiceTimeOut = 900;
MZWebServiceValidateSoftwareSPIUsageMaximumSize = 1048576;
Notarization = {
Message = "altool has been deprecated for notarization and starting in late 2023 will no lo\U2026";
Status = DEPRECATED;
};
PerformServerVerification = 1;
ShouldPricingTabBeDisplayed = 1;
SkipValidateFirenzeSPIUsage = 0;
SkipValidateProductErrors = 1;
SkipValidatePurpleSPIUsage = 0;
TerritoriesAllowedToAlterPlusQuality = (
JP
);
VerifyZipIntegrity = 1;
softwareUserGuideFilePath = "https://help.apple.com/itc/apploader/";
};
DSToken = "DAWTKNV323952cf8084a204fb20ab2508441a07d02d3df96a659d82c8e4416f6f518ba476ad9777e\U2026";
DSTokenCookieName = myacinfo;
EnableJWTForAllCalls = 0;
ShouldUseFeatures = "
2022-11-24 19:46:58.001 jsonURL = https://contentdelivery.itunes.apple.com/WebObjects/MZLabelService.woa/json/MZContentDeliveryService
2022-11-24 19:46:58.001 jsonRequest as dictionary = {
id = "20221124194658-457";
jsonrpc = "2.0";
method = authenticateForSession;
params = {
Application = altool;
ApplicationBundleId = "com.apple.itunes.altool";
"DS_PLIST" = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n
2022-11-24 19:46:58.972 Waiting for 0 operations to complete 2022-11-24 19:46:58.973 ITunesSoftwareServiceFileLogging cleaning up 2022-11-24 19:46:58.973 Error: Validation failed for 'GT.pkg'. 2022-11-24 19:46:58.973 Error: Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in ‘GT.pkg’. Unable to validate your application. (-21017) { NSLocalizedDescription = "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in \U2018GT.pkg\U2019."; NSLocalizedFailureReason = "Unable to validate your application."; } less ~/Documents/pkginfo/Distribution /Users/myname/Documents/pkginfo/Distribution: No such file or directory less ~/Documents/pkginfo/package.id.pkg/PackageInfo /Users/myname/Documents/pkginfo/package.id.pkg/PackageInfo: No such file or directory
I can't really see what might be going wrong with all of that. When we create the app bundle, we're not using any of the xcode tools so it's not like it would be a folder within a folder.. you've just got the "GT.app" bundle folder itself, and are adding this as a component using pkgbuild, so the pkg file should be correct...!
Are you able to use Finder, select both the .app bundle and the .pkg file (I assume they are both in the same folder there) and then right-click and do "Compress 2 items" and then send us the resulting zip file? You can upload to the below.. https://transfer.harman.com/requests/oGNQxhpVGSF6Egle9Ou4nY
thanks
Have send the files, give me another link and I'll send you the air file too, maybe you will find something there.
By the way the error I'm getting in the Transporter app can also be checked: Could not create a temporary .itmap package for the app “GT.pkg”. Lookup application information from the web service failed.
Thanks -> so, interestingly, the package file that you build using the "pkgbuild" command is not the format that the Transporter/validation tools need for uploading it to the App Store.
You can actually install that pkg file on your local machine (at least, we could; the AIR framework isn't code-signed in the app bundle there so you'd need to sign it with the ADT tool or manually with codesign) - so ultimately the pkg files are "correct" from the perspective of macOS, but not correct wrt the App Store stuff.
So, after a bit of googling, I think "pkgbuild" is the wrong thing and actually it's "productbuild" that should be used. Confusing... but I just tried this:
% productbuild --component GT.app --product GT.app/Contents/Info.plist GT2.pkg
and this created a GT2.pkg
file that then worked and expanded properly when I used that validation command.
You'd need to add back in the signing stuff but can you try that? For reference: step 21 of https://lessons.livecode.com/m/4071/l/876834-signing-and-uploading-apps-to-the-mac-app-store
thanks
You'd need to add back in the signing stuff but can you try that?
As you suggested, I tested this command line, but added the signing to it:
productbuild --component GT.app --product GT.app/Contents/Info.plist --sign "3rd Party Mac Developer Installer: mycompany, Inc. (xxxxxxxxxxx)" GT.pkg
got this error while validating:
xcrun altool --validate-app -f GT.pkg -t macos -u ... 2022-11-28 17:39:01.630 *** Error: Validation failed for 'GT.pkg'. 2022-11-28 17:39:01.631 *** Error: The Info.plist in the package must contain the CFBundleVersion key. Unable to validate your application. (-27001) { NSLocalizedDescription = "The Info.plist in the package must contain the CFBundleVersion key."; NSLocalizedFailureReason = "Unable to validate your application."; }
You said you got the app to be validated, I still get errors, maybe it is because my xcode is the latest version and so are my xcode command line tool.
Anyway I added the CFBundleVersion entry, manually to the info.plist file, the Air sdk needs to put it in automatically, that is one fix that needs to be made.
then I ran productbuild created a new pkg file with the fixed plist, and ran xcrun altool --validate-app to test it. the previous error was gone, but a new error message popped:
2022-11-28 18:32:49.111 *** Error: Asset validation failed Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon (ID: aabc4f2f-0555-43f0-8edc-1e984112adfb) (90236) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon (ID: aabc4f2f-0555-43f0-8edc-1e984112adfb)"; "original_server_error" = { code = "STATE_ERROR.VALIDATION_ERROR.90236"; detail = "Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon"; id = "aabc4f2f-0555-43f0-8edc-1e984112adfb"; status = 409; title = "Asset validation failed"; }; }
Googled this problem and found this link: https://stackoverflow.com/questions/30301179/missing-required-icons-when-submitting-app-with-application-loader
there seems to be something wrong with the icon.icns file, or maybe something wrong with the Assets.car file. The Assets.car is created manually I used to make it on xcode, but things have changed so now I created it online, I think it should be created automatically by the SDK. Apple keeps making changes and changes have to made to the Air SDK.
I would appreciate it if you help me find how to solve this current error.
Thank you for all the help.
Thanks for that .. so:
Anyway I added the CFBundleVersion entry, manually to the info.plist file, the Air sdk needs to put it in automatically, that is one fix that needs to be made.
Agreed, we're using the CFBundleShortVersionString
but it appears we need both of these now!
there seems to be something wrong with the icon.icns file
Yes, from the message it sounds like we need to also have 512x512 and 1024x1024 (double-resolution 512x512) in the icns file... you have png files of the right resolution within your package; can you please try adding them also to the application descriptor file? My understand was that we just used that icons
set from the app descriptor when generating the icns file, but we can also check as there may be extra requirements about naming conventions and the like..
thanks
I added the 512 and 1024 icons on FB 4.7 and created an air file swiched to my mini mac and on termial created macOs app: bash /Applications/AIRSDK_MacOS/bin/adt -package -target bundle GT.app GT.air
I checked to see in the GT.app content folder and saw that the icons folder contains these 2 icons and that the application.xml file, which contains the application descriptor information, contains them properly.
Added the CFBundleVersion entry in Info.plist after the CFBundleShortVersionString entry, like this:
<key>CFBundleVersion</key>
<string>1</string>
Then created the pkg file: productbuild --component GT.app /Applications --product GT.app/Contents/Info.plist --sign "3rd Party Mac Developer Installer: companyname, Inc. (xxxxxxxxxx)" GT.pkg productbuild: Adding component at /Users/myname/Desktop/app/GT.app productbuild: Signing product with identity "3rd Party Mac Developer Installer: companyname, Inc. (xxxxxxxxx)" from keychain /Users/myname/Library/Keychains/login.keychain-db productbuild: Adding certificate "Apple Worldwide Developer Relations Certification Authority" productbuild: Adding certificate "Apple Root CA" productbuild: Wrote product to GT.pkg productbuild: Supported OS versions: [Min: 10.6, Before: None]
then did the validation: xcrun altool --validate-app -f GT.pkg -t macos -u myname@gmail.com --app-specific-password
got back this: 2022-11-29 15:25:09.618 INFO: ContentDelivery version 2.141.101 (141101). 2022-11-29 15:25:09.620 INFO: Show Progress: Contacting Apple Services… 2022-11-29 15:25:11.135 INFO: Received build ID: 7d1fb265-08de-4333-a784-caf04a92b15d 2022-11-29 15:25:11.137 INFO: Show Progress: Making copy of ‘GT.pkg’… 2022-11-29 15:25:11.140 INFO: Show Progress: Preparing to verify ‘GT.pkg’… 2022-11-29 15:25:11.220 INFO: Show Progress: Analyzing package… 2022-11-29 15:25:19.915 INFO: Show Progress: Sending analysis to App Store Connect… 2022-11-29 15:26:18.815 INFO: COMPLETED - PART 1 - asset-description-75986EB0-BA7D-40DB-AEEF-CD12DF276A5E.xml - eTag: "C646956F0C1D799042754AFE3C016106" 2022-11-29 15:26:18.817 INFO: Show Progress: Waiting for App Store Connect analysis response… 2022-11-29 15:26:23.569 Error: ERROR: Asset validation failed (90242) The product archive is invalid. The Info.plist must contain a LSApplicationCategoryType key, whose value is the UTI for a valid category. For more details, see "Submitting your Mac apps to the App Store". (ID: f1384b6d-ecf6-440d-b93f-d88729fc907a) 2022-11-29 15:26:23.569 Error: ERROR: Asset validation failed (90296) App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list: [( "com.jewishsoftware.gemaratutor.pkg/Payload/GT.app/Contents/MacOS/Gemara-Tutor" )] Refer to App Sandbox page at https://developer.apple.com/documentation/security/app_sandbox for more information on sandboxing your app. (ID: 906c7a32-4c55-4e9d-a51d-eab01e387bf1) 2022-11-29 15:26:23.569 Error: ERROR: Asset validation failed (90236) Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon (ID: 794c100c-2784-42ee-a2fe-62dffb69dbd6) 2022-11-29 15:26:24.688 INFO: Show Progress: Sending SPI analysis to App Store Connect… 2022-11-29 15:26:35.861 INFO: COMPLETED - PART 2 - DTAppAnalyzerExtractorOutput-E401073E-4AA8-42AE-9ADF-B2621C409E65.zip - eTag: "993174D4F2748D739E470F734615C57D" 2022-11-29 15:28:58.684 INFO: COMPLETED - PART 3 - DTAppAnalyzerExtractorOutput-E401073E-4AA8-42AE-9ADF-B2621C409E65.zip - eTag: "FFF9D728BCC87324D293DE41607198C6" 2022-11-29 15:34:55.971 Error: ERROR: WILL RETRY PART 1. Failed with error: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=-4, NSUnderlyingError=0x6000038ccfc0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x600001586b20 [0x1f2034000]>{length = 16, capacity = 16, bytes = 0x100201bb11841c8e0000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <61F3C6B6-26B2-492E-8300-985462F2EA8C>.<5>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalUploadTask <61F3C6B6-26B2-492E-8300-985462F2EA8C>.<5>" ), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://store-032.blobstore.apple.com/itmspod11-assets-massilia-032001/PurpleSource112%2Fv4%2F2d%2F48%2F68%2F2d4868e5-256a-5ef5-a97f-751c0768d1ce%2F73q3lMJCMzVrl13jPevUq8rQ9cig8HANazIqbdWxz8M_U003d-1669728384406?uploadId=6bc2e030-6fe9-11ed-ad8d-d8c4978a0745&Signature=DDnxnHhlEmnS0RUzbRCmKY69iwg%3D&AWSAccessKeyId=MKIA474WIEZZVU5QMKHI&partNumber=1&Expires=1670333184, NSErrorFailingURLKey=https://store-032.blobstore.apple.com/itmspod11-assets-massilia-032001/PurpleSource112%2Fv4%2F2d%2F48%2F68%2F2d4868e5-256a-5ef5-a97f-751c0768d1ce%2F73q3lMJCMzVrl13jPevUq8rQ9cig8HANazIqbdWxz8M_U003d-1669728384406?uploadId=6bc2e030-6fe9-11ed-ad8d-d8c4978a0745&Signature=DDnxnHhlEmnS0RUzbRCmKY69iwg%3D&AWSAccessKeyId=MKIA474WIEZZVU5QMKHI&partNumber=1&Expires=1670333184, _kCFStreamErrorDomainKey=4} 2022-11-29 15:35:03.536 INFO: COMPLETED - PART 1 - DTAppAnalyzerExtractorOutput-E401073E-4AA8-42AE-9ADF-B2621C409E65.zip - eTag: "36D5BCD53AD4C33107D83D6EF232E2DC" 2022-11-29 15:35:03.539 INFO: Show Progress: Waiting for App Store Connect SPI analysis response… 2022-11-29 15:35:18.088 INFO: Show Progress: Verify failed. Asset validation failed The product archive is invalid. The Info.plist must contain a LSApplicationCategoryType key, whose value is the UTI for a valid category. For more details, see "Submitting your Mac apps to the App Store". (ID: f1384b6d-ecf6-440d-b93f-d88729fc907a) 2022-11-29 15:35:18.088 INFO:
VERIFY FAILED with 3 errors.
2022-11-29 15:35:18.089 Error: Validation failed for 'GT.pkg'. 2022-11-29 15:35:18.090 Error: Asset validation failed The product archive is invalid. The Info.plist must contain a LSApplicationCategoryType key, whose value is the UTI for a valid category. For more details, see "Submitting your Mac apps to the App Store". (ID: f1384b6d-ecf6-440d-b93f-d88729fc907a) (90242) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "The product archive is invalid. The Info.plist must contain a LSApplicationCategoryType key, whose value is the UTI for a valid category. For more details, see \"Submitting your Mac apps to the App Store\". (ID: f1384b6d-ecf6-440d-b93f-d88729fc907a)"; "original_server_error" = { code = "STATE_ERROR.VALIDATION_ERROR.90242"; detail = "The product archive is invalid. The Info.plist must contain a LSApplicationCategoryType key, whose value is the UTI for a valid category. For more details, see \"Submitting your Mac apps to the App Store\"."; id = "f1384b6d-ecf6-440d-b93f-d88729fc907a"; status = 409; title = "Asset validation failed"; }; } 2022-11-29 15:35:18.090 Error: Asset validation failed App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list: [( "com.jewishsoftware.gemaratutor.pkg/Payload/GT.app/Contents/MacOS/Gemara-Tutor" )] Refer to App Sandbox page at https://developer.apple.com/documentation/security/app_sandbox for more information on sandboxing your app. (ID: 906c7a32-4c55-4e9d-a51d-eab01e387bf1) (90296) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "App sandbox not enabled. The following executables must include the \"com.apple.security.app-sandbox\" entitlement with a Boolean value of true in the entitlements property list: [( \"com.jewishsoftware.gemaratutor.pkg/Payload/GT.app/Contents/MacOS/Gemara-Tutor\" )] Refer to App Sandbox page at https://developer.apple.com/documentation/security/app_sandbox for more information on sandboxing your app. (ID: 906c7a32-4c55-4e9d-a51d-eab01e387bf1)"; "original_server_error" = { code = "STATE_ERROR.VALIDATION_ERROR.90296"; detail = "App sandbox not enabled. The following executables must include the \"com.apple.security.app-sandbox\" entitlement with a Boolean value of true in the entitlements property list: [( \"com.companyname.appname.pkg/Payload/GT.app/Contents/MacOS/app-name\" )] Refer to App Sandbox page at https://developer.apple.com/documentation/security/app_sandbox for more information on sandboxing your app."; id = "906c7a32-4c55-4e9d-a51d-eab01e387bf1"; status = 409; title = "Asset validation failed"; }; } 2022-11-29 15:35:18.090 Error: Asset validation failed Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon (ID: 794c100c-2784-42ee-a2fe-62dffb69dbd6) (90236) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon (ID: 794c100c-2784-42ee-a2fe-62dffb69dbd6)"; "original_server_error" = { code = "STATE_ERROR.VALIDATION_ERROR.90236"; detail = "Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon"; id = "794c100c-2784-42ee-a2fe-62dffb69dbd6"; status = 409; title = "Asset validation failed"; }; }
Wow ... one step forward, two steps back ...! So from what I can see:
The first one - LSApplicationCategoryType
- will probably have to be something you add via the InfoAdditions
section of your app descriptor file, as we won't know what the best category is. See https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype?language=objc
The second one is something you need to do via code-signing - or if you prefer, if you add that sandbox entitlement into the Entitlements
section of the app descriptor file, and use ADT for signing, then it should get added.
The third one is still the icon ... I've just double-checked the conversion code and we do appear to handle both 512 and 1024 sized icons, but maybe there's something going wrong with how that's set up. I thought there was a utility that could tell what images were present in an icns file, but can't find that currently.. we'll need to check this further.
I added 2 entries to my app.entitlement file, which I use while signing the app; codesign --entitlements app.entitlements -f --options runtime --strict --timestamp -v -s "3rd Party Mac Developer Application: mycompany, Inc. (xxxxxxxxx)" --deep "GT.app"
this is the app.entitlements file content you have to have on the same folder as the app you want to sign:
<?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>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
</dict>
</plist>
the 2 lower entries I took from an empty macOS project I created in xcode and it had them on the app.entitlements file so I added these lines and now one error was gone. 2 more to go.
Added another entry to the info.plist file, this is what I'm adding right after the CFBundleShortVersionString entry:
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.education</string>
now while validating another error was gone, we are down to one error, the icon error. here is what I got from the validation command line: 2022-11-29 17:27:36.873 INFO: ContentDelivery version 2.141.101 (141101). 2022-11-29 17:27:36.875 INFO: Show Progress: Contacting Apple Services… 2022-11-29 17:27:39.678 INFO: Received build ID: ac6975ac-c4b9-45cc-a059-acd5e83dec1e 2022-11-29 17:27:39.679 INFO: Show Progress: Making copy of ‘GT.pkg’… 2022-11-29 17:27:39.682 INFO: Show Progress: Preparing to verify ‘GT.pkg’… 2022-11-29 17:27:39.756 INFO: Show Progress: Analyzing package… 2022-11-29 17:27:48.198 INFO: Show Progress: Sending analysis to App Store Connect… 2022-11-29 17:27:49.830 INFO: COMPLETED - PART 1 - asset-description-59CBEB90-A926-496E-A0E8-EA35C354F0F0.xml - eTag: "CA231B1C0B7927B8769F542EB6B21FA9" 2022-11-29 17:27:49.833 INFO: Show Progress: Waiting for App Store Connect analysis response… 2022-11-29 17:27:59.364 *** Error: ERROR: Asset validation failed (90236) Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon (ID: 0940cdda-2363-41b5-a124-ffd8f4a099ef) 2022-11-29 17:28:01.376 INFO: Show Progress: Sending SPI analysis to App Store Connect… 2022-11-29 17:28:11.087 INFO: COMPLETED - PART 1 - DTAppAnalyzerExtractorOutput-5D822822-5D41-49AB-801A-7C595C0B45D3.zip - eTag: "747E31CF808AC19721BD5A321C77D033" 2022-11-29 17:28:29.446 INFO: COMPLETED - PART 3 - DTAppAnalyzerExtractorOutput-5D822822-5D41-49AB-801A-7C595C0B45D3.zip - eTag: "C1C18EE75C0D2253FE6091E91F47BBFA" 2022-11-29 17:28:33.292 INFO: COMPLETED - PART 2 - DTAppAnalyzerExtractorOutput-5D822822-5D41-49AB-801A-7C595C0B45D3.zip - eTag: "CCBA14D95EBEA087013141A37D4F7960" 2022-11-29 17:28:33.295 INFO: Show Progress: Waiting for App Store Connect SPI analysis response… 2022-11-29 17:28:44.294 INFO: Show Progress: Verify failed. Asset validation failed Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon (ID: 0940cdda-2363-41b5-a124-ffd8f4a099ef) 2022-11-29 17:28:44.295 INFO:
VERIFY FAILED with 1 error.
2022-11-29 17:28:44.296 Error: Validation failed for 'GT.pkg'. 2022-11-29 17:28:44.296 Error: Asset validation failed Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon (ID: 0940cdda-2363-41b5-a124-ffd8f4a099ef) (90236) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon (ID: 0940cdda-2363-41b5-a124-ffd8f4a099ef)"; "original_server_error" = { code = "STATE_ERROR.VALIDATION_ERROR.90236"; detail = "Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon"; id = "0940cdda-2363-41b5-a124-ffd8f4a099ef"; status = 409; title = "Asset validation failed"; }; }
@ajwfrost I can second some of the issues found here (ie, things not done by the Air SDK)
1) I'm making my own icon.icns
file with all the expected icon sizes. Before codesigning, I swap it in:
cp -f -v "src/icons/Icon.icns" "$APP_PATH/Contents/Resources/Icon.icns"
I made the .icns file with a separate third party utility, but only had to do it once (or until I have to change the icon anyway). These are all the sizes/names within:
2) I'm adding three items to info.plist, using plutil
(also before codesigning ofc):
plutil -replace CFBundleVersion -string "$VERSION" "$APP_PATH/Contents/Info.plist"
plutil -replace CFBundleName -string "<App Name>" "$APP_PATH/Contents/Info.plist"
plutil -replace LSApplicationCategoryType -string public.app-category.your-app-type "$APP_PATH/Contents/Info.plist"
Thanks both .. one of our challenges has always been that we don't actually have any applications ourselves on the app stores! so actually I'm thinking we maybe should put the AIR SDK Manager up there, and then at least we can go through this whole process ourselves...
I'll get someone to look at that icon code asap then..
thanks
@waveofthought-code I don't suppose it's possible for us to get your icns file to check the contents of it? Upload link: https://transfer.harman.com/requests/Enub0cHajkcAcQh1n2oDlm thanks
Finally got it up to the mac store successfully. I used this online converter to convert one png image size 1024x1024 into one icns file containing all the necessary image sizes: https://www.aconvert.com/image/png-to-icns/
I replaced with it the icon.icns file in the content of the app
I added these 4 entries to the Info.splist because it gave errors when uploading the pkg file with transporter before I added the other 2:
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundleName</key>
<string>My App Name</string>
<key>CFBundleDisplayName</key>
<string>My App Name</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.education</string>
then created the pkg file as shown before with the right entitlements in the app.entitlements file. and uploaded it to iTunes with transporter, and it was successful, with one warning only:
We identified one or more issues with a recent delivery for your app, "App Name" 1.7.9 (1). Your delivery was successful, but you may wish to correct the following issues in your next delivery: ITMS-90889: 'Cannot be used with TestFlight because the bundle at “GT.app” is missing a provisioning profile. Main bundles are expected to have provisioning profiles in order to be eligible for TestFlight.'
I can't add a provision profile in FB 4.7 to an air file, so this is something that has to be added in the ADT command line creating the macOS app file, like in a parameter -provision and then I add the path to my provision profile.
Thanks - so I think we should be able to help with making a lot of this easier...
The icon from @waveofthought-code has the following sections:
ic04 (772 bytes) = 16x16
ic05 (2900 bytes) = 16x16 @2
ic11 (3314 bytes) = 16x16 @2
ic12 (11657 bytes) = 32x32 @2
ic07 (39896 bytes) = 128x128
ic13 (132169 bytes) = 128x128 @2
ic08 (132169 bytes) = 256x256
ic14 (455310 bytes) = 256x256 @2
ic09 (455310 bytes) = 512x512
ic10 (1454031 bytes) = 512x512 @2
info (310 bytes)
I would guess that one of the two 16x16 @2
images is used as the normal 32x32
image for non-retina displays but those are the identifiers/sizes mentioned by wikipedia..
So basically when you provide an icon to AIR in the app descriptor, we are using this to create an element in the icns file, but aren't having this duplication i.e. here you have the ic13
section which is identical to the ic08
section, both 256x256 sized images. So we'll need to update our code logic to do the same..
Plus it looks from the wikipedia entry that we may need to introduce compression for the RGB/ARGB images, currently we write them all out uncompressed but:
However, manually crafting icns files with uncompressed 24-bit RGB or ARGB images will not display properly – at least on newer macOS releases (tested on macOS 11)
See https://en.wikipedia.org/wiki/Apple_Icon_Image_format
The alternative of course, as this is just on mac, is that we dump all the images into a folder and call iconutil
on it so that we let Apple do the hard work... particularly given we don't know what to put in that info
block...
The alternative of course, as this is just on mac, is that we dump all the images into a folder and call
iconutil
on it so that we let Apple do the hard work... particularly given we don't know what to put in thatinfo
block...
It is not that we can't create an icon.icns file with the online converter mentioned above, and solve all these problems manually fixing the app file created by the adt command which is part of the Air SDK. But no doubt Air should be doing it for us to make the workflow natural, you can see what an icon.icns file created by xcode looks like and make Air create it.
@danielkotzer yes exactly, I think in this case the code to generate the icns file just wasn't updated to cope with the necessary changes that were introduced in more recent xcode versions.. but for sure, something I agree we should be doing automatically within the AIR tools/workflow.
Thank you, I appreciate your help very much.
Actually there was one little thing I have to add, after uploading my app to the mac store, it would not accept the build until I added one last thing to the Info.plist file:
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
so now the additions to the plist file has to include this list of entries:
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundleName</key>
<string>App Name</string>
<key>CFBundleDisplayName</key>
<string>App Name</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.education</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
now my app is waiting for review... 🙂
I'm glad you were able to add it as 'false' ... For macOS we do use openssl for some things so we'd fall into the "industry standard encryption" bracket, which is how we also manage to get away now with an "EAR99" ECCN (see https://www.adobe.com/legal/compliance.html)
Getting an error uploading my app to the mac store with "xcrun altool --validate-app...": Error is: " Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in ‘GT.pkg’."
Downloaded the latest Air SDK 50.0.1.3, on my PC and my Mini Mac. Created an air file containing my app with FB 4.7 on my PC with Air 50.0.1.3. Copied it to my Mini Mac and created a macos application, signed it properly but I get an error uploading it, an error that doesn't make sense. no ANEs in my app
Steps to Reproduce
this are the list of command lines I used in the Terminal application on my mini mac:
bash adt -package -target bundle GT.app GT.air codesign --entitlements app.entitlements -f --options runtime --strict --timestamp -v -s "3rd Party Mac Developer Application: mycompany, Inc. (xxxxxxxxxx)" --deep "GT.app" GT.app: replacing existing signature GT.app: signed app bundle with Mach-O universal (x86_64 arm64) [com.company.product] pkgbuild --component GT.app --version 1.7.7 --install-location /Applications --sign "3rd Party Mac Developer Installer: mycompany, Inc. (xxxxxxxxxxxxx)" GT.pkg pkgbuild: Adding component at /Applications/AIRSDK_MacOS/bin/GT.app pkgbuild: Signing package with identity "3rd Party Mac Developer Installer: mycompany, Inc. (xxxxxxxxxxxxxxxx)" from keychain /Users/myname/Library/Keychains/login.keychain-db pkgbuild: Adding certificate "Apple Worldwide Developer Relations Certification Authority" pkgbuild: Adding certificate "Apple Root CA" pkgbuild: Wrote package to GT.pkg xcrun altool --validate-app -f GT.pkg -t macos -u myname@gmail.com --password app-specific-password 2022-11-20 23:41:16.428 Error: Validation failed for 'GT.pkg'. 2022-11-20 23:41:16.429 Error: Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in ‘GT.pkg’. Unable to validate your application. (-21017) { NSLocalizedDescription = "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in \U2018GT.pkg\U2019."; NSLocalizedFailureReason = "Unable to validate your application."; }