I am unable to change the app's 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 set-up like so:
I find it odd because I have used other apps that use alternate app icons in iOS 11. Is there a known bug with this in iOS 11?
Note: If you're wondering why I'm using the delay, see this post