Is UIApplication.setAlternateIconName still available to use?

I writing swift code to change the app icon using setAlternateIconName and flutter MethodChannel to invoke swift.

 UIApplication.shared.setAlternateIconName(iconName) { error in
    if let error = error {
        print("Error setting alternate icon: \(error.localizedDescription)")
        result(FlutterError(code: "ICON_CHANGE_ERROR", message: error.localizedDescription, details: nil)) // Send error back to Flutter
    } else {
        print("App icon changed successfully!")
        result(nil) // Success!
    }
}

But I got an error message the requested operation couldn't be completed because the feature is not supported when using it on iOS 17+.

So, Is setAlternateIconName still available?

PS. In XCode, the code hinting shows that setAlternateIconName is still not deprecated.

setAlternateIconName(_:completionHandler:) is not deprecated and works as expected. Please let me know if you're able to reproduce the issue using Configuring Your App to Use Alternate App Icons sample project.

  • If you're unable to reproduce the issue in the sample project, then the issue might originate from Flutter. In that case, you should reach out to Flutter support channel for support.
Is UIApplication.setAlternateIconName still available to use?
 
 
Q