airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
206 stars 11 forks source link

error 103: application.icon.image152x152 is an unexpected element/attribute #2544

Open cybomon opened 1 year ago

cybomon commented 1 year ago

Using AIR 50.2.1

Submitting IPA to app loader fails with missing icon files of 152 px and 1024 px. Adding these dimensions to the app xml under the icon node produces an error from adt:

%appxml%.xml(44): error 103: application.icon.image152x152 is an unexpected element/attribute

Oddly, another app has the same node defined (different filename) and it throws no error from adt: image152x152>icons/Icon-App-76x76@2x.png</image152x152

ajwfrost commented 1 year ago

Hi

image152x152 was added in AIR 3.9, can you check that the icon it refers to is definitely 152x152 pixels?

Also, wondering if you're using an Assets.car file? We tend to recommend using the below script and guidelines: https://github.com/distriqt/AIR-ImageScripts

thanks

Andrew

cybomon commented 1 year ago

Hi Andrew, I figured out the adt error, there was a duplicate entry of that node. Yes, I'm using the asset.car file but thank you for linking that script. I've been using xcode and it's a pain. I'm still getting failure through the app loader when submitting the IPA. For some reason adt isn't packaging the icon files I have in the app xml. It doesn't throw an error either though. But when I look in the IPA they aren't there. So for example in the icon subdirectory in the IPA I see there are 11 icon files, but in the app xml there are 25 defined in the icon node. I've done a compare with another app that went through and the app xml is almost the exact same except for the asset filenames and their paths. Could it be the asset.car I produced isn't kosher or something?

EDIT: Though it's not packaging all the files defined in the app xml, it is in fact packaging the 152x152 and the 1024x1024!. So I have no idea what the application loader is complaining about. Unless it doesn't like the Assset.car? But then why wouldn't it just say that? I will check the info.plist in the package for a ref.

This is the error from app loader:

ERROR: ERROR ITMS-90023: "Missing required icon file. The bundle does not contain an app icon for iPad of exactly '152x152' pixels, in .png format for iOS versions >= 10.0. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface" [2023-03-23 16:17:25 EDT]
ERROR: ERROR ITMS-90704: "Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/."
cybomon commented 1 year ago

In the info.plist in the IPA I do see this:

CFBundleIconFiles
            <array>
                <string>Icon-Iphone-180.png</string>
                <string>Icon-Ipad-152.png</string>

Which isn't the name I provided for the 152.png resource via adt, I see this in the root of the IPA so it must come from the Assets.car? However I don't see anything for 1024 px. So the plist references a valid 152 px icon that is packaged in the root. So what's with this error? Maybe it just doesn't like the assets.car?

cybomon commented 1 year ago

@ajwfrost I tried out the https://github.com/distriqt/AIR-ImageScripts, it makes the icon files but it seems to fail at asset.car creation, and it's missing some icon files compared to the example:

And then the folder out structure has icons but no asset car:

out

ajwfrost commented 1 year ago

That may be happening if the actool is the wrong one .. if you try just running xcrun actool from the command line, does it work? You may need to do something like sudo xcode-select -s /Applications/Xcode.app or similar I think..

cybomon commented 1 year ago

xcrun actool didn't run, then I did the xcode command you gave and then xcrun actool did execute, silently. Then I tried the AIRimagescript tool again, in a new window. But the exact same outcome unfortunately.

ajwfrost commented 1 year ago

Just spotted the earlier comments too; the 1024x1024 icon shouldn't be included in the bundle itself as a separate file, but just in the assets.car file, so this png is stripped out by ADT. Similarly, all the filenames are changed (to match what Apple had originally suggested, although now apparently there are different filenames but they're not actually important, it's just the sizes that have to match).

From the errors then:

ERROR ITMS-90023: "Missing required icon file. The bundle does not contain an app icon for iPad of exactly '152x152' pixels, in .png format for iOS versions >= 10.0

So your bundle should contain a PNG with the right size and this must also be referenced from the Info.plist file. This should happen as long as your app descriptor file has the image152x152 entry that points to the exact-size image..

ERROR ITMS-90704: "Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog

Which should be sorted out by the script to create the assets.car file from a 1024x1024 PNG file...

In that generate script, in the line where it runs actool, it redirects the output to null (something like >/dev/null 2>/dev/null or similar?) -> if you delete those parts and run it again, you should see any warnings from the tool itself?

cybomon commented 1 year ago

So I basically copied the exact app xml from the submitted app and it's asset structure, overwrote all the icon files with the same filenames just the new app icon. Exact same error. I'm still seeing that adt is not including all the icon files that are in the app xml for this app. So <image152x152>icons/Icon-App-76x76@2x.png</image152x152> is in the icon node in the app xml but it's not packaged in the IPA and adt doesn't throw an error. Here's the thing, it's not packaged in the app that submitted successfully to the app loader either. So it must be apple looks for those two inside assets.car and my assets.car file is broken some how. I'll try to troubleshoot the script with what you've provided. I wish we could just provide one large icon and have the stores handle all this on the back end.

cybomon commented 1 year ago

@ajwfrost I removed the redirect to null part of that line and got this:

<?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.actool.errors</key>
    <array>
        <dict>
            <key>description</key>
            <string>Unknown argument '--include-all-app-icons'.</string>
        </dict>
    </array>
</dict>
</plist>
 - Assets.car: actool complete
cp: /Users/%username%/Documents/AIR-ImageScripts-master/.air-icon-generation-tmp/Assets.car: No such file or directory
========== COMPLETE ==============

Perhaps my version of xcode / tools is too old for this script? I'm using xcode ver 10.1.

marchbold commented 1 year ago

@cybomon Yes xcode 10 is very old we are currently expecting 14 for this script.

cybomon commented 1 year ago

Oh so that's why, sorry I should of included that with the air version. I was fiddling with xcode and generating the assets.car and I had the assets target membership selected for the app, but not for the test and uitest folders. I selected that and rebuilt. Then I noticed the asset.car was significantly larger. I became excited. It worked and passed the app loader! So it was asset.car being exported without those assets. Thanks for all your troubleshooting and guidance it helped out a lot!

It would be awesome to use that appicon generate script however. I wonder if there's a way to just get that actool running, but then it might have dependencies too.