Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't publish iOS due to: The App Store Icon in the asset catalog in 'myapp.app' can't be transparent nor contain an Alpha Channel. #11124

Closed
tradegear opened this issue Nov 5, 2022 · 11 comments
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/iOS 🍎 t/bug Something isn't working
Milestone

Comments

@tradegear
Copy link

Description

Despite my best effort across at least 15 hours of my time the past couple of days, I am unable to get the App Store to accept my published build due to "Invalid App Store Icon".

My app is complete after 3 months of work.
And I can't publish my app.

I have tried to follow the guidance of the youtube documentation (Versluis and Montemagno) where they show us this only takes a few clicks. 15 hrs != a few clicks.
I have even tried working around the PNG issue by manually recreating all of the PNG files in the best way I can try to remove all transparency.
When I accept the resulting payload that VS generates during the creation of the Archive process (and then I try to publish/buid via VS, and then try it via XCode), or I manually edit the 8 PNG files I can locate in the Archive process (that do not exist within the Publish folder), and again either try to publish it via the "Publish" Wizard in Win11 VS2022 17.3.6, (which results in a generic unhelpful error - wish it would carry through the true error from the app store), or I copy the build to the Mac and load it through Xcode,
By searching the folder
C:\Users\myname\AppData\Local\Xamarin\iOS\Archives\2022-11-05\myApp 11-05-22 3.57 PM.xcarchive\Products\Applications\myApp.app
for any *.png, and manually editing them to put a non-white background on them (perhaps this is my error - I'm not a graphic artist)...
I then do the steps in the "Publish Archive" process in VS (and if fails with generic error message), so then I pull the full archive folder to Mac, refer to it in XCode, answer its questions (connecting it to my signing certificate, etc), and then in Xcode I get this error - every time - even though I have seemingly manually satisfied its restriction on transparency (or I have trusted VS to resizetizerize the *.svg into necessary *.png); here is the error:

Asset validation failed
Invalid App Store Icon. The App Store Icon in the asset catalog in 'myapp.app' can't be transparent nor contain an Alpha Channel. (ID: )

So, I don't know what to do within the construct of a .NET Maui app relative to the MauiIcon MauiSplashImage, MauiIcon, to get VS to generate acceptable app store icons, nor am I able to do (or how would I know?) what to fix manually.

It's the weekend 11/5/2022 and this was supposed to be to the users 11/4/2022 because they tested it all via side-loaded Android. And I can't deliver it to the IOS users because of an icon error, and I'll be suffering a penalty because it is not done on time and using .net Maui was my recommendation. Does anybody who knows these secrets do consulting on this, because I'm committed to making this project work and it must be delivered ASAP or I'll there is significant impact. Can I bribe anyone for help?

Steps to Reproduce

  1. Build a project.
  2. Include a custom *.svg for icons, splash page.
  3. Have already setup a machine connected to a Mac with Xcode, a connected iPhone, certificates created, an Apple Developer account, an App Store with the matching Bundle ID, so that you have a target to aim the app file into.
  4. Do the publish via VS or via Xcode.
  5. See the error.

Link to public reproduction project repository

I can't upload this code due to IP concerns.

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

current on Mac Monterey, VS 2022 17.3.6 iPhone 11 15.6

Did you find any workaround?

I tried manually editing PNG files to remove transparency.

Relevant log output

No response

@tradegear tradegear added the t/bug Something isn't working label Nov 5, 2022
@AndreasReitberger
Copy link

Hi, I recently uploaded my app to TestFlight with no issues.
I'm using .NET 7 with the preview version of visual also.
Also I set a background color for the icon.

<!-- App Icon -->
		<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#000000" />

Maybe setting here a color, fixes your issue.

@ikeoriaku123
Copy link

@tradegear I've been there and feel your frustration. What I did in my own case was to take the appicon.svg example created by microsoft and simply changed the background color. Use your own icon as the foregroundfile and you should be alright

@jsuarezruiz jsuarezruiz added platform/iOS 🍎 area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer labels Nov 7, 2022
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Nov 7, 2022
@ghost
Copy link

ghost commented Nov 7, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@tradegear
Copy link
Author

tradegear commented Nov 7, 2022

I just "newed-up" a cute bot maui project. I edited the project file so it looks like my app that I have prepared for the apple app store (bundle ID). Via VS "publish" function, I tried pushing it to the App store. That fails in VS with an ambiguous error
"App Store bundle validated failed for archive MyApp "altool" exited with code 1."
Whether I intentionally provide an incorrect application-specific password for the publication to the app store, or any other error, this is the generic (and highly unhelpful) error that one receives.
Each time after receiving this error, I located the archive in the C:\Users\larry\AppData\Local\Xamarin\iOS\Archives<date>...etc..
I copied this over to my Mac manually.
I open this archive (double-click) into Xcode.
I then try to publish it to the app store via the Xcode process.
This morning with the "newed-up" cute-bot maui project, it passed the initial validation and was uploaded (gee, now I have to figure out the whole versioning thing of this process!)
So, I know a couple things:

  1. The VS publish process that uses "altool" is proven to not work. I reported this to the VS via "my feedback", and it was recommended I try changing my apple-provided application-specific password. Ugh, really? Conclusion: just use the VS Publish function to create the archive, and assume (a) it will fail when VS tries to push it (b) you must copy it to your Mac and do it through Xcode.
  2. The "newed-up" cute-bot maui project has "whatever" settings in its *.svg that are sufficient for the resizetizer to generate acceptable PNG files.
  3. Assume Microsoft doesn't mind that every app will appear in the App store with the ".NET" purple icon, because it sure seems pretty much impossible for someone (a) without a graphical design background (b) nor tools to know how to properly supply an SVG file for it to work properly. To whomever makes design decisions - this is a real pain point.

I will (a) try to implement ikeoriaku123 (THANK YOU!) recommended workaround and see if I can get some meaningful non-".NET" icons to appear for ios and android, and also acceptable to the app store. Then (b) I will copy over my actual project code implementation from my old project into this new cute bot app, in the expectations of preserving the acceptable graphics settings. I've had to restart from a new cute bot app and re-enter my code from the old project about four times in the past couple months due to weird stuff for which no solution was offered, so restarting from new project was the only workaround I could come up with.

@FM1973
Copy link

FM1973 commented Dec 31, 2022

In my case setting a background color for the app icon like @AndreasReitberger proposed works.

@glihm
Copy link

glihm commented Jan 31, 2023

In my case also the color set to #000000 works.

glihm added a commit to glihm/docs-maui that referenced this issue Feb 1, 2023
Currently, App Store Connects will systematically fails when a `<MauiIcon>` is added without any `Color` value. By default, the background is then considered as transparent, which triggers a 100% fails while uploading the archive to App Store Connect (even by using Xcode or command line tools provided by Apple).
In order to fix that, related to this [issue](dotnet/maui#11124) in the `maui` repository, it can be very helpful to warn users that a background must be provided. I tested on `svg` and `png` format, this solved the issue as mentioned in the linked issue.

For this reason, applying a **CAUTION** is, in my opinion, relevant. We are saving lot's of time to developers and avoiding tremendous frustration.
davidbritch added a commit to dotnet/docs-maui that referenced this issue Feb 2, 2023
* Add caution about iOS AppIcon background color

Currently, App Store Connects will systematically fails when a `<MauiIcon>` is added without any `Color` value. By default, the background is then considered as transparent, which triggers a 100% fails while uploading the archive to App Store Connect (even by using Xcode or command line tools provided by Apple).
In order to fix that, related to this [issue](dotnet/maui#11124) in the `maui` repository, it can be very helpful to warn users that a background must be provided. I tested on `svg` and `png` format, this solved the issue as mentioned in the linked issue.

For this reason, applying a **CAUTION** is, in my opinion, relevant. We are saving lot's of time to developers and avoiding tremendous frustration.

* Update app-icons.md

* Update app-icons.md

* Update app-icons.md

---------

Co-authored-by: David Britch <davidbritch@users.noreply.github.com>
@smitha-cgi
Copy link

@tradegear I've been there and feel your frustration. What I did in my own case was to take the appicon.svg example created by microsoft and simply changed the background color. Use your own icon as the foregroundfile and you should be alright

Thanks so much for this! After trying to manipulate my icon image for hours and getting nowhere, I found your suggestion and it worked immediately. I ended up using a high-quality 1024x1024 JPG for the foreground file and set the color property to #000000 as well. Not sure that it was required but not changing it now that I finally was able to submit something successfully.

@Welchen
Copy link

Welchen commented Mar 20, 2023

Thanks for this post. The color setting fixed my issue as well.

@JudicialCafe
Copy link

:-( Still having this issue even while adding the color. I also tried and used the default svg icon file from a newed up solution, but still can get transported to validate the ipa??

@jfversluis
Copy link
Member

"Fixed" by adding a note to the docs

@AuriR
Copy link

AuriR commented Dec 3, 2023

For the PNG I used, I had some transparent pixels. I used paint.net and created a new all-black layer, then merged the main icon down. Then I exported PNG 24-bit. Then it built and processed fine. Maybe I missed a warning during compile or archiving time?

@github-actions github-actions bot locked and limited conversation to collaborators Jan 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests