SVG Icon display and scaling issues, platform dependent.
See original GitHub issueDescription
If you replace the out of the box Maui app Icon background SVG image with an SVG that is a linear gradient, the background of the Android image is simply black. I’ve attached the project file. MauiApp1BackgroundSvg.zip
Changing the icons to a set of SVGs that are not the same size results in scaling issues on Android/Windos and iOS fails to build with the following error.
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): error : The stickers icon set or app icon set named "appicon" did not have any applicable content.
appiconfg.zip
iOS fails to build using those images with (Expand to see output summary)
1>Detected signing identity:
1> Bundle Id: com.companyname.mauiapp1
1> App Id: com.companyname.mauiapp1
1>Tool arch execution finished (exit code = 1).
1><?xml version="1.0" encoding="UTF-8"?>
1><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
1><plist version="1.0">
1><dict>
1> <key>com.apple.actool.compilation-results</key>
1> <dict>
1> <key>output-files</key>
1> <array>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/partial-info.plist</string>
1> </array>
1> </dict>
1> <key>com.apple.actool.document.warnings</key>
1> <array>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][iphone][20x20][][][2x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon20x20@2x.png is 28x40 but should be 40x40.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][ipad][20x20][][][2x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon20x20@2x.png is 28x40 but should be 40x40.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][ipad][29x29][][][2x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon29x29@2x.png is 41x58 but should be 58x58.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][ipad][40x40][][][2x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon40x40@2x.png is 57x80 but should be 80x80.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][iphone][60x60][][][3x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon60x60@3x.png is 127x180 but should be 180x180.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][iphone][20x20][][][3x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon20x20@3x.png is 42x60 but should be 60x60.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][ios-marketing][1024x1024][][][1x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appiconItunesArtwork.png is 724x1024 but should be 1024x1024.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][iphone][29x29][][][3x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon29x29@3x.png is 61x87 but should be 87x87.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][iphone][40x40][][][3x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon40x40@3x.png is 85x120 but should be 120x120.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][ipad][76x76][][][2x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon76x76@2x.png is 107x152 but should be 152x152.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][iphone][29x29][][][2x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon29x29@2x.png is 41x58 but should be 58x58.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][iphone][40x40][][][2x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon40x40@2x.png is 57x80 but should be 80x80.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][iphone][60x60][][][2x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon60x60@2x.png is 85x120 but should be 120x120.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> <dict>
1> <key>affected-items</key>
1> <array>
1> <string>./appicon.appiconset/[][ipad][83.5x83.5][][][2x][][][]</string>
1> </array>
1> <key>catalog</key>
1> <string>/Users/bryanroth/Library/Caches/Xamarin/mtbs/builds/MauiApp1/f3465ae35e4234fdd5ac71190cab8ace7b889ad4cd991046652d4e88051c893d/obj/Debug/net6.0-ios/iossimulator-x64/actool/cloned-assets/Assets.xcassets</string>
1> <key>message</key>
1> <string>appicon.appiconset/appicon83.5x83.5@2x.png is 118x167 but should be 167x167.</string>
1> <key>type</key>
1> <string>Ambiguous Content</string>
1> </dict>
1> </array>
1> <key>com.apple.actool.errors</key>
1> <array>
1> <dict>
1> <key>description</key>
1> <string>The stickers icon set or app icon set named "appicon" did not have any applicable content.</string>
1> </dict>
1> </array>
1></dict>
1></plist>
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): error : arch exited with code 1
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): error :
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): error : actool exited with code 1
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): error :
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon20x20@2x.png is 28x40 but should be 40x40.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon20x20@2x.png is 28x40 but should be 40x40.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon29x29@2x.png is 41x58 but should be 58x58.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon40x40@2x.png is 57x80 but should be 80x80.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon60x60@3x.png is 127x180 but should be 180x180.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon20x20@3x.png is 42x60 but should be 60x60.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appiconItunesArtwork.png is 724x1024 but should be 1024x1024.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon29x29@3x.png is 61x87 but should be 87x87.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon40x40@3x.png is 85x120 but should be 120x120.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon76x76@2x.png is 107x152 but should be 152x152.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon29x29@2x.png is 41x58 but should be 58x58.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon40x40@2x.png is 57x80 but should be 80x80.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon60x60@2x.png is 85x120 but should be 120x120.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): warning : appicon.appiconset/appicon83.5x83.5@2x.png is 118x167 but should be 167x167.
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.303\tools\msbuild\iOS\Xamarin.Shared.targets(842,3): error : The stickers icon set or app icon set named "appicon" did not have any applicable content.
1>Done building project "MauiApp1.csproj" -- FAILED.
Steps to Reproduce
-
Create a new Maui App with VS. (Visual Studio 2022 version 17.3 Preview 1.1)
-
Compile and execute on Android. Note the Icon:
-
Replace the provided appicon.svg (background file) with one that is a linear gradient
-
Clean the solution (must clean for the Icon to be replaced)
-
Rebuild and execute on an Android Emulator. (Android 9.0 API 28) Note icon background is black. On Windows/iOS you get a gradient with the color that’s been chosen in the project file:
-
Now replace the icon files with the ones in the zip file above.
-
Rebuild.
-
iOS will fail the build with sizing errors.
-
Windows/Android yields weird scaling.
Version with bug
6.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android, iOS, Windows
Affected platform versions
Android 9.0, API 28, iOS 15.4 (iPhone 12 Pro emulator), Windows 10.0.19041.0
Did you find any workaround?
Could not find a workaround
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8
Top GitHub Comments
yes, I fail to build the app for IOS after replacing the icon.
It is hidden in my issue about icon properties not working. Should be maybe a separate issue to be able to find it correctly, you are right. Android: https://github.com/dotnet/maui/issues/7305
Aspect ratio and properties issue on Windows: https://github.com/dotnet/maui/issues/7207