setAlternateIconName dont work on ios 15

After upgrade on iOS 15 the app has loss the ability to change alternate icon. I didnt found any changes in documentation. How to set alternate icon on ios 15?

Just some checks, as you didn't provide much information:

  • have you checked info.plist, for app's primary and alternate icons using the CFBundleIcons key ?
  • Is the value of supportsAlternateIcons property set to true ?

Claude31, thanks for your answer.

• This is part of info.plist with icons parameters:

<key>CFBundleIcons</key>
	<dict>
		<key>CFBundleAlternateIcons</key>
		<dict>
			<key>aero</key>
			<dict>
				<key>CFBundleIconFiles</key>
				<array>
					<string>aero</string>
				</array>
				<key>UIPrerenderedIcon</key>
				<false/>
			</dict>
		</dict>
		<key>CFBundlePrimaryIcon</key>
		<dict>
			<key>CFBundleIconFiles</key>
			<array/>
		</dict>
	</dict>
	<key>CFBundleIcons~ipad</key>
	<dict>
		<key>CFBundleAlternateIcons</key>
		<dict>
			<key>aero</key>
			<dict>
				<key>CFBundleIconFiles</key>
				<array>
					<string>aero</string>
				</array>
				<key>UIPrerenderedIcon</key>
				<false/>
			</dict>
		</dict>
		<key>CFBundlePrimaryIcon</key>
		<dict>
			<key>CFBundleIconFiles</key>
			<array>
				<string></string>
			</array>
		</dict>
	</dict>

• No, supportsAlternateIcons property is set to false on ios 15. What could be wrong?

I could not check your info.plist structure, butI'm surprised not to find primary icon at top level.

Have a look here, it explains in details

h t t p s : / / w w w.hackingwithswift.com/example-code/uikit/how-to-change-your-app-icon-dynamically-with-setalternateiconname

• No, supportsAlternateIcons property is set to false on ios 15

How did you check ? Did you provide all icon sizes required ? have also a look at this old thread on the forum:

https://developer.apple.com/forums/thread/676555

Have you already solved this problem? I have the same issue 😔

Experiencing the same issue UIApplication.shared.supportsAlternateIcons is directly false from the system in iOS15, maybe they changed the API but not updated the docs.

I tried to check whether the project supports changing App icons, but the console shows supportsAlternateIcons is false. When I created a new demo to test, I found that regardless of whether CFBundleIcons is added, supportsAlternateIcons is true. Same environment, same main thread. So I think Apple should explain under what circumstances supportsAlternateIcons will be false, and how developers should adapt it?

Question: what happens to app with modified icons if from next update i'm gonna remove the possibility to change manually them? Does the system automatically restore the original one?

Did you add:

			ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;

to your project?

I think there is some optimisation in the build process, which ensures that only necessary AppIcon assets are added to your IPA.

setAlternateIconName dont work on ios 15
 
 
Q