Skip to content

Instantly share code, notes, and snippets.

@Bonney
Last active December 25, 2025 03:25
Show Gist options
  • Select an option

  • Save Bonney/79e28be05fcb19e2f9e1b418244c66e4 to your computer and use it in GitHub Desktop.

Select an option

Save Bonney/79e28be05fcb19e2f9e1b418244c66e4 to your computer and use it in GitHub Desktop.
Changing an app's icon in iOS 10.3 without showing the system alert dialog
// Change the app icon without showing the system alert
// The trick is to call setAlternateIconName(_:completionHandler:), then
// immediately show (then immediately hide) a temp ViewController.
// This seems to interrupt the system dialog box, which never shows.
if UIApplication.shared.supportsAlternateIcons {
UIApplication.shared.setAlternateIconName("nameOfAlternateIcon")
let tempViewController = UIViewController()
self.present(tempViewController, animated: false, completion: {
tempViewController.dismiss(animated: false, completion: nil)
})
}
@VictorZhang2014
Copy link

Not working actually.

@Bonney
Copy link
Author

Bonney commented Jan 7, 2021

Well, it was a hacky method from 4 years ago..

@ebhdeveloper
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment