dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.05k stars 1.73k forks source link

MAUI iOS - None of the input catalogs contained a matching stickers icon set or app icon set named "appicon" #14721

Closed aboulinguez closed 8 months ago

aboulinguez commented 1 year ago

Description

During the build of my MAUI app project (before running it on iOS) I got this error :

None of the input catalogs contained a matching stickers icon set or app icon set named "appicon". C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.2.1024\tools\msbuild\iOS\Xamarin.Shared.targets

In my .csproj :

<ItemGroup>
    <None Remove="Resources\AppIcon\icon.svg" />
</ItemGroup>

<ItemGroup>
    <MauiIcon Include="Resources\AppIcon\icon.svg" />
</ItemGroup>

The fact is before that, I was not able to change my app icon and splashcreen by replacing the default files given in the MAUI app project template. I got this error when I try to use a new icon file instead of the default one that I have deleted from the project.

Steps to Reproduce

Create a new MAUI app project

Delete both "appicon.svg" and "appiconfg.svg" files from the project.

Add a new svg file to be the new icon.

Set this new file build action to MauiIcon

Try to run the project on a physical iOS device

Link to public reproduction project repository

https://bitbucket.org/aboulinguez/issuemaui_2023-04-22

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

VS 17.5.33516.290 ; maui-ios 7.0.59/7.0.100 ; ios 16.2.1024/7.0.100

Did you find any workaround?

No workaround found

Relevant log output

No response

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

TomDacquinDMS commented 1 year ago

any workaround suggestions? I'm unable to publish my app because of this

n3oea commented 1 year ago

I too have this issue. I can run/debug on Android devices and the emulator, but nothing works when targeting iOS.

Howellpeebles commented 1 year ago

I had two entries for XSAppIconAssets for some reason, and was receiving this error. So I removed it, and it built.

Jake-Derrick commented 1 year ago

In the info.plist you have

<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>

The AppIcon file name is icon.svg

What worked for me was making sure those name matched, ex rename the svg to appicon.svg or in info.plist to icon.appiconset

ChrisAllisonMalta commented 12 months ago

I had the same problem what fixed it for me was renaming my icon file from "orpheus_icon.png" to "orpheus.png" and changing this line in the info.plist to Assets.xcassets/orpheus.appiconset

dreamcodestudio commented 10 months ago

same error on build, for me help only setting default name appicon.png or appicon.svg for iOS platform, but it would be nice if custom naming working without custom editing Assets.xcassets config.

ghost commented 9 months ago

Hi @aboulinguez. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Zhanglirong-Winnie commented 9 months ago

Verified this issue with Visual Studio Enterprise 17.9.0 Preview 2.1. Not repro on iOS platforms. As Jake-Derrick said, you need to right-click info.plist to open it in XML (Text) Editor mode, and edit the appicon.appiconset name to be consistent with the name of the svg image you added. Screenshot 2024-01-09 174146