I am implementing custom app icons for my iOS app, and everything works in the simulator. But when I try on device I get errrors:
+[LSApplicationProxy applicationProxyFor*] is not a supported method for getting the LSApplicationProxy for the current process, use +[LSBundleProxy bundleProxyForCurrentProcess] instead.
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:]}
Attempt to map database failed: permission was denied. This attempt will not be retried.
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:]}
It shows a pop-up that the icon was changed, but the icon in the pop-up is empty, and the app’s icon turns into the default white blank icon. Only after I reboot the phone, the icon displays correctly.
Any help would be welcome.
2
Answers
In my case issue was only showing up on one particular device. After I changed the app's bundle identifier, the issue was solved.
I’ve found the solution looking into Apples example project:
https://developer.apple.com/documentation/xcode/configuring_your_app_to_use_alternate_app_icons
Take a look into the Build-Settings:
You need to set the Alternate App Icons Sets as references here.
After you’ve built the app, you can check out the generated Info.plist inside the "AlternateAppIcon.app" file (right click "Show Package content").
You can now see the format of the the top-level keys CFBundleIcons and CFBundleIcons~ipad. The entries under the key CFBundleAlternateIcons contain the references to the alternative icons.
I used this as a blue-print for my projects Info.plist and now it is working again. Both on iPhone and iPad.