Removing Shine/Gloss effect on the iPhone through UIPrerenderedIcon not working on device

后端 未结 9 2188
温柔的废话
温柔的废话 2020-12-14 19:03

I have tried to use the UIPrerenderedIcon/\"Icon already includes gloss and bevel\" on the Info.plist of my app and it worked perfectly on the Simulator, but not on the real

相关标签:
9条回答
  • 2020-12-14 19:11

    Muffle,

    I had this issue and it resolved after I deleted the app off the device. Not sure why yours won't.

    Right click on the info.plist file in XCode and Open-As a plain text file. Make sure your text file reads like this in the area for the pre-rendered icon:

    <key>UIPrerenderedIcon</key>
    <true/>
    

    I also had a strange occurence (in another app) where the info.plist file I THOUGHT I was using was set correctly. Then I opened up the file directly in the mac Finder window and it turns out XCode was using the wrong info.plist file. That's a long shot in your case, but wouldn't hurt to give it a try for a quick sanity check.

    Hope that helps,

    Rob

    0 讨论(0)
  • 2020-12-14 19:14

    Check the info plist, it's different for the new XCode/iOS5.

        <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>Icon.png</string>
                <string>Icon@2x.png</string>
            </array>
            <key>UIPrerenderedIcon</key>
            <true/> <--------------------------------here it is
        </dict>
    </dict>
    
    0 讨论(0)
  • 2020-12-14 19:16

    As Alex Stone said, in iOS 5 you have to edit it in 2 places.

    Remove Icon Gloss

    0 讨论(0)
  • 2020-12-14 19:16
    Yes this need two set at two places as described in above figure.
    
    
    If you want to set value dynamically using command from shell script or terminal, you can do that as below:
    
    /usr/libexec/PlistBuddy -c "Set :UIPrerenderedIcon YES" YOUR_PLIST_FILE_PATH
    
    /usr/libexec/PlistBuddy -c "Set :CFBundleIcons:CFBundlePrimaryIcon:UIPrerenderedIcon YES" YOUR_PLIST_FILE_PATH 
    
    **NOTE:** [Fore being helpful to the developer who want to set this using command]
    
    0 讨论(0)
  • 2020-12-14 19:23

    I set “Icon already includes gloss effects = YES” In the info.plist, search this part:

    <key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>myIcon.png</string>
            </array>
        </dict>
    </dict>
    

    Now, add this 2 lines:

           <key>UIPrerenderedIcon</key>
           <false/>
    

    At the end, It must to be:

    <key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>myIcon.png</string>
            </array>
            <key>UIPrerenderedIcon</key>
            <true/>
        </dict>
    </dict>
    
    0 讨论(0)
  • 2020-12-14 19:30

    Just a note in case anyone stumbles across this question with the same issue using Xcode 5.0 and an asset catalog for app icons. There is a checkbox in the asset catalog Attributes Inspector that should be checked:

    enter image description here

    0 讨论(0)
提交回复
热议问题