title: iOS Alternate Icon not changing
body: <p>I have followed few tutorials on setting alternative icons in iOS but I cannot get it to work properly. The important part in my Info.plist looks like this:</p>
  
  <pre><code>&lt;key&gt;CFBundleIcons&lt;/key&gt;
  &lt;dict&gt;
      &lt;key&gt;CFBundlePrimaryIcon&lt;/key&gt;
      &lt;dict&gt;
          &lt;key&gt;CFBundleIconFiles&lt;/key&gt;
          &lt;array&gt;
              &lt;string&gt;default&lt;/string&gt;
          &lt;/array&gt;
          &lt;key&gt;UIPrerenderedIcon&lt;/key&gt;
          &lt;false/&gt;
      &lt;/dict&gt;
      &lt;key&gt;CFBundleAlternateIcons&lt;/key&gt;
      &lt;dict&gt;
          &lt;key&gt;six&lt;/key&gt;
          &lt;dict&gt;
              &lt;key&gt;CFBundleIconFiles&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;six&lt;/string&gt;
              &lt;/array&gt;
              &lt;key&gt;UIPrerenderedIcon&lt;/key&gt;
              &lt;false/&gt;
          &lt;/dict&gt;
          &lt;key&gt;crazy&lt;/key&gt;
          &lt;dict&gt;
              &lt;key&gt;CFBundleIconFiles&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;crazy&lt;/string&gt;
              &lt;/array&gt;
              &lt;key&gt;UIPrerenderedIcon&lt;/key&gt;
              &lt;false/&gt;
          &lt;/dict&gt;
      &lt;/dict&gt;
  &lt;/dict&gt;
  </code></pre>
  
  <p>And the code for the view controller, very simple:</p>
  
  <pre><code>class ViewController: UIViewController {
  
  @IBOutlet weak var segment: UISegmentedControl!
  
  override func viewDidLoad() {
      super.viewDidLoad()
      segment.addTarget(self, action: #selector(segmentChanged(_:)), for: .valueChanged)
      // Do any additional setup after loading the view, typically from a nib.
  }
  
  @objc func segmentChanged(_ sender: UISegmentedControl) {
      var icon: String?
      switch sender.selectedSegmentIndex {
      case 1:
          icon = "six"
      case 2:
          icon = "crazy"
      default:
          icon = nil
      }
      changeIcon(icon)
  }
  
  func changeIcon(_ icon: String?) {
      if UIApplication.shared.supportsAlternateIcons {
          UIApplication.shared.setAlternateIconName(icon, completionHandler: { (error) in
              print("\(error?.localizedDescription)")
          })
      }
    }
  }
  </code></pre>
  
  <p>When the method gets called I get prompt saying </p>
  
  <blockquote>
    <p>You have changed the icon for "App".</p>
  </blockquote>
  
  <p>But the icon that is displayed is the default one
  My icon files are named: six@2x.png, six@3x.png, crazy@2x.png, crazy@3x.png, default@2x.png, default@3x.png
  Why is it not changing? Are there any special steps for putting the image files in the project? I have put mine in the "res" folder</p>
  
  <p>Project:
  <a href="https://www.dropbox.com/s/nboslz2s6gagvwl/AltIcon.zip?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/nboslz2s6gagvwl/AltIcon.zip?dl=0</a></p>