Missing AppIcon in Organiser

前端 未结 3 710
忘掉有多难
忘掉有多难 2021-02-07 13:07

I\'ve recently migrated my application to support iOS7 and during that process updated my app icons to use an Asset Catalog; which is all working great in the app. However, in O

3条回答
  •  盖世英雄少女心
    2021-02-07 14:01

    Yet another possible hiccup with migrating to Asset Catalog.

    There is two ways to define icons in project settings: CFBundleIconFiles since iOS3 and CFBundleIcons since iOS5. The older, despite being older, contrary to common sense about backward compatiblity, still takes precedence. I was using CFBundleIcons before migrating directly to Asset Catalog. And after i migrated, i removed the original files pointed to by CFBundleIcons because, you know, now i had the shiny new Asset Catalog, right? And XCode did three things:

    • it hides the visual editing of former CFBundleIcons from General project settings. Why would you need it when you already opted in for the shiny new Asset Catalog, right?
    • it does not remove the original CFBundleIcons key of Info.plist, though, by opting in for the Asset Catalog, you are saying clear and loud that you are not going below iOS5
    • it does not validate the said key either. No little red crossmarks anywhere, because the project settings UI which could display them, is not visible anymore

    The result is hidden, visually noneditable, possibly outdated/wrong key in Info.plist which takes precedence over what Asset Catalog created for you.

    Go open your Info.plist manually and delete CFBundleIcons, rebuild, reupload, and voilà, icon is back.

提交回复
热议问题