Xcode 14 setAlternateIconName() stopped changing icon?

Viewed 16

I'm using the same code in a few projects to change the icon from the app settings, but yesterday it stopped working. I use UIApplication.shared.setAlternateIconName("AppIcon-1")

Here's my info.plist enter image description here

And I have AppIcon, AppIcon-1 and AppIcon-2 in Assets.

When I try to change the icon I get the following in log:

[default] +[LSApplicationProxy applicationProxyFor*] is not a supported method for getting the LSApplicationProxy for the current process, use +[LSBundleProxy bundleProxyForCurrentProcess] instead.

[default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}

[default] Attempt to map database failed: permission was denied. This attempt will not be retried.

[db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}````
1 Answers

enter image description here

This is how I implement it.

But for the iPad it has different approach

Related