Changing alternate icon for iPad

后端 未结 6 989
粉色の甜心
粉色の甜心 2021-02-07 02:24

I have a problem with changing app\'s icon on iPad. Everything is working fine on iPhone but on iPad I get this error :

[default] Failed to set preferred

6条回答
  •  忘掉有多难
    2021-02-07 02:55

    What I have noticed is that your plist has UIPrerenderedIcon set to NO

    Change it to YES

    It might be that the issue is with the rendering

    Edit 1: add the .png extension to see if it helps

    EDIT 2: Try changing the new icon's filename to ipadAlternate.png. Then change to the same name in the plist as it looks like there is some kind of mismatch with your plist and the icon file itself

    EDIT 3: Have you cleaned the DerivedData folder? I had an issue a while ago and nothing helped including cleaning the project etc. But I tried deleting everything in the /Users/YOURUSERNAME/Library/Developer/Xcode/DerivedData/ folder and it started working again. It is worth giving it a go.

    EDIT 4: Try doing step from EDIT 3. Then restart your project and delete all the alternative icon files from it. Choose move to trash and then CMD+SHIFT+K to clean. Then select CMD+B to build. Next add the icons back where they were. Check that the target is selected correctly and copy items if needed to be selected. For some reason Xcode lost track of your file and it is showing an error, no file.

    If that will not help then try the above steps. But first try moving the whole project to a different folder.

    EDIT 5: There is one more idea which you might try for yourself. Try deleting the plist file in the current project (keep a backup copy of it before deleting) then start a new project where the icon changing works fine. Add the plist from that project to this one. Check if the icon changing works. If yes then add all the missing keys you had in the previous project.

    WARNING: This is a last resort but this may work. Start a new project and set it up with the icons which you want alternating. Check if they work first then add all the code and dependencies from the project where it doesn't work. Just don't override the PLIST files.

    EDIT 6: Try deleting the app from the simulator or the device you are trying it on and reinstall it. The whole issue might be with the update and the leftovers from the previous version of the app.

    EDIT 7: Try copying the project to another mac and see if the problem persists. Which xcode version are you using?? If it is Xcode 9, perhaps try using the Xcode 10 beta.

提交回复
热议问题