Support of iOS 5.0 icons with XCode 5

前端 未结 7 844
走了就别回头了
走了就别回头了 2021-02-04 12:06

I\'m using the new asset catalog AppIcon to set the right icons for iOS 5 (in theory), 6 and 7. Unfortunately, when installing the application on my iPad 1 (with iOS 5.1.1), the

7条回答
  •  别那么骄傲
    2021-02-04 12:40

    I've found better solution working on iOS 5 with asset catalog.

    Set this in Info.plist (other icons sections like CFBundleIcons are generated and overwritten by Xcode, so leave them empty):

    CFBundleIconFiles
    
        AppIcon57x57.png
        AppIcon72x72.png
        AppIcon57x57@2x.png
        AppIcon72x72@2x.png
    
    

    and add just two more icons in your resources (outside assets):

    AppIcon72x72.png
    AppIcon72x72@2x.png
    

    This way you will have only two icons duplicated in your bundle.

    The source of problem is that asset catalog generates such icons with ~ipad suffixes which iOS 5 doesn't understand, so we have to add these files without ~ipad suffix manually. iOS 6 doesn't have this problem and finds proper icons with and without ~ipad suffix.

    Use icon name (AppIcon or Icon or anything else) as you set in your asset catalog.

提交回复
热议问题