Hi 黑子 刘,
Thank you for the sample project. Your alternate icons aren’t working because of several issues in the Info.plist file:
keyCFBundleIcons/key
dict
keyCFBundleAlternateIcons/key
dict
keychangeicon/key
dict
keyIcon files/key
array
stringchangeicon/string
/array
/dict
/dict
keyCFBundlePrimaryIcon/key
dict
keyCFBundleIconFiles/key
array
string/string
/array
keyCFBundleIconName/key
string/string
keyUIPrerenderedIcon/key
false/
/dict
keyUINewsstandIcon/key
dict
keyCFBundleIconFiles/key
array
string/string
/array
keyUINewsstandBindingEdge/key
stringUINewsstandBindingEdgeLeft/string
keyUINewsstandBindingType/key
stringUINewsstandBindingTypeMagazine/string
/dict
/dict
For CFBundlePrimaryIcon, you aren’t declaring an icon name. Since your main app icon is defined by the asset catalog, you should remove CFBundlePrimaryIcon from the Info.plist file.
Under CFBundleAlternateIcons, you have the key name Icon files. This should be CFBundleIconFiles.
UINewsstandIcon is no longer used. Newsstand was an iOS feature that was removed in iOS 9. You should also remove this from the Info.plist file.
On top of these Info.plist issues, you should provide icons that are correctly sized for every device. The details of these sizes for alternate app icons are documented in the User-Selectable App Icons section of the Human Interface Guidelines:
https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/app-icon/
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: