question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SVG Icon display and scaling issues, platform dependent.

See original GitHub issue

Description

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

  1. Create a new Maui App with VS. (Visual Studio 2022 version 17.3 Preview 1.1)

  2. Compile and execute on Android. Note the Icon: image

  3. Replace the provided appicon.svg (background file) with one that is a linear gradient

  4. Clean the solution (must clean for the Icon to be replaced)

  5. Rebuild and execute on an Android Emulator. (Android 9.0 API 28) Note icon background is black. image On Windows/iOS you get a gradient with the color that’s been chosen in the project file: image image

  6. Now replace the icon files with the ones in the zip file above.

  7. Rebuild.

  8. iOS will fail the build with sizing errors.

  9. 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:closed
  • Created a year ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
VincentBucommented, Jun 2, 2022

Did you get the iOS build failure when you use the 2nd set of icons discussed in this comment?

yes, I fail to build the app for IOS after replacing the icon.

1reaction
janseriscommented, May 31, 2022

Scaling issues already reported

Ah, sorry, Didn’t find that with my searching. Could you link the issue?

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enhancing PowerApps with SVG Icons - Perficient Blogs
Scalability: SVG icons are capable of scaling without losing any quality and are not dependent on resolution. They adapt to various screen ...
Read more >
6 Common SVG Fails (and How to Fix Them)
I'm editing these to reframe the image. The last two are the width and height of the coordinate system inside the viewport —...
Read more >
Small unscaled SVG rendering blurry and wrong in all ...
One easy way to tell if the issue is with the SVG renderer is to render it at double-size (or larger), then scale...
Read more >
SVG Scaling issues : r/Maya
Currently, If I import a 2cm X 2cm square into Maya, then I need to change the display grid to Gridlines every 1...
Read more >
115439 – High DPI mode: SVG icons should be ... - Bugzilla
The project deploys resolution appropriate 100% (so 96pdi) scaled PNG at three icon sizes small (sc 16x16) large (lc 24x24) and extra large...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found