Missing AppIcon in Organiser

前端 未结 3 714
忘掉有多难
忘掉有多难 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:03

    Yeah while using the Asset Catalog, you may need to do the following to get the App's Icon linked and working for Ad-Hoc distributions / production to be seen in Organiser, Test flight and possibly unknown AppStore locations.


    After creating the Asset Catalog, take note of the name of the Launch Images and App Icon names listed in the .xassets in Xcode.

    By Default this should be

    • AppIcon
    • LaunchImage

    [To see this click on your .xassets folder/icon in Xcode.] (this can be changed, so just take note of this variable for later)


    What is created now each build is the following data structures in your .app:

    For App Icons:

    iPhone

    • AppIcon57x57.png (iPhone non retina) [Notice the Icon name prefix]
    • AppIcon57x57@2x.png (iPhone retina)

    And the same format for each of the other icon resolutions.

    iPad

    • AppIcon72x72~ipad.png (iPad non retina)
    • AppIcon72x72@2x~ipad.png (iPad retina)

    (For iPad it is slightly different postfix)


    Main Problem

    Now I noticed that in my Info.plist in Xcode 5.0.1 it automatically attempted and failed to create a key for "Icon files (iOS 5)" after completing the creation of the Asset Catalog.

    If it did create a reference successfully / this may have been patched by Apple or just worked, then all you have to do is review the image names to validate the format listed above.

    Final Solution:

    Add the following key to you main .plist

    I suggest you open your main .plist with a external text editor such as TextWrangler rather than in Xcode to copy and paste the following key in.

    CFBundleIcons
    
        CFBundlePrimaryIcon
        
            CFBundleIconFiles
            
                AppIcon57x57.png
                AppIcon57x57@2x.png
                AppIcon72x72~ipad.png
                AppIcon72x72@2x~ipad.png
            
        
    
    

    Please Note I have only included my example resolutions, you will need to add them all.


    If you want to add this Key in Xcode without an external editor, Use the following:

    • Icon files (iOS 5) - Dictionary
    • Primary Icon - Dictionary
    • Icon files - Array
    • Item 0 - String = AppIcon57x57.png And for each other item / app icon.

    Now when you finally archive your project the final .xcarchive payload .plist will now include the above stated icon locations to build and use.

    Do not add the following to any .plist: Just an example of what Xcode will now generate for your final payload

    IconPaths
    
        Applications/Example.app/AppIcon57x57.png
        Applications/Example.app/AppIcon57x57@2x.png
        Applications/Example.app/AppIcon72x72~ipad.png
        Applications/Example.app/AppIcon72x72@2x~ipad.png
    
    

提交回复
热议问题