Unable to install alternate app icons in iOS 11

I cannot change the application icon to an alternate icon in iOS 11 (Xcode 9, beta 3).

However, it works fine in iOS 10.3 (with the following code):

if #available(iOS 10.3, *) { guard let iconName = MySingletonClass.sharedInstance.iconName() else { return } delay(0.01) { UIApplication.shared.setAlternateIconName(iconName, completionHandler: { (error) in if let error = error { print(error.localizedDescription) } else { print("Success!") } }) } } else { // Fallback on earlier versions } 

My plist is configured like this:

enter image description here

I find this strange because I used other applications that use alternative application icons in iOS 11. Is there a known bug with this in iOS 11?

Note. If you are wondering why I use delay, see this post.

+5
source share
2 answers

I solved this by implementing it in ViewController and not AppDelegate appDidFinishLaunchingWithOptions

You still need to run it for a delay in order for it to work, as related questions / answers indicate.

+2
source

If this does not help, disable the application icon assets. Helps me. I think there is some conflict between assets and plist icons.

0
source

Source: https://habr.com/ru/post/1269945/


All Articles