1

setAlternateIconName method does not change the icon in IOS 13. It changes the app icon but suddenly changes back to the default one. But same method works in IOS 11 and 12 without any issues.

  • Here is the [documentation](https://developer.apple.com/documentation/uikit/uiapplication/2806818-setalternateiconname) for that method. If you include the code that you are using, someone may be able to point out if you are doing something incorrectly. – Anu6is Oct 04 '19 at 10:58
  • Yes. I'm using the same method in the documentation. Unfortunately it's not working in IOS 13 ```UIApplication *application = [UIApplication sharedApplication]; if ([application supportsAlternateIcons]) { [application setAlternateIconName:appIcon completionHandler:^(NSError * _Nullable error) { }]; } ``` – Chamitha Narawita Oct 04 '19 at 11:34

3 Answers3

0

I had a similar issue. Rebooting the phone fixed it.

kevinstueber
  • 2,926
  • 3
  • 26
  • 26
0

I've observed the same issue on iOS 13.1. Looks like an OS bug as updating to iOS 13.3 has resolved the issue.

applejack42
  • 1,155
  • 9
  • 18
0

My two cents for Xcode after 13, and SwiftUI.

(in SwiftUI Plist never exist all...)

Now You have to add single keys directly in Info Tab in Xcode:

enter image description here

The tricky part is not to EXACTLY add every single item to have:

enter image description here

I reported hearer the XLM keys, but to be honest I spicily made a copy and past from: https://github.com/steventroughtonsmith/AlternateIconTest

directly in XCODE.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleAlternateIcons</key>
    <dict>
        <key>Test1</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>Test1</string>
            </array>
            <key>UIPrerenderedIcon</key>
            <false/>
        </dict>
        <key>Test2</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>Test2</string>
            </array>
        </dict>
    </dict>
    <key>CFBundlePrimaryIcon</key>
    <dict>
        <key>CFBundleIconFiles</key>
        <array>
            <string>AppIcon60x60</string>
        </array>
    </dict>
</dict>
</plist>
ingconti
  • 10,876
  • 3
  • 61
  • 48