我在几个项目中使用了相同的代码来改变应用程序设置中的图标,但是昨天它停止工作了。我使用UIApplication.shared.setAlternateIconName("AppIcon-1")
这是我的info.plist

我有AppIcon,AppIcon-1和AppIcon-2的资产。
当我试图更改图标时,我会在日志中得到以下内容:
[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:]}````发布于 2022-09-21 13:11:54

我就是这样实现的。
但是对于iPad,它有不同的方法
https://stackoverflow.com/questions/73800600
复制相似问题