0

I can read that changing the app icon programmatically at runtime is not possible, at least since iOS 3.0.

But... I regulary can see on "App" websites apps that can put icons on the springboard. The first I remember is that kind of app that you give a friend's picture from your album, and it creates an icon so you can call him just clicking on that icon:

http://itunes.apple.com/fr/app/speedtouch-the-best-home-screen/id378360978?mt=8
http://itunes.apple.com/fr/app/desktop-shortcut/id421701004?mt=8
http://itunes.apple.com/fr/app/appbutler-app-organizer/id327391626?mt=8
http://itunes.apple.com/fr/app/tap4music/id365578914?mt=8

So I guess, is it still impossible to change the app icon programmatically at runtime?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Oliver
  • 23,072
  • 33
  • 138
  • 230
  • Does this answer your question? [iOS Changing App icon at runtime](https://stackoverflow.com/questions/12191233/ios-changing-app-icon-at-runtime) – Cœur Feb 26 '20 at 18:08

3 Answers3

5

Update

Apple have changed this, you can do this now: https://developer.apple.com/documentation/uikit/uiapplication/2806818-setalternateiconname

Original Answer

What you're thinking of here are WebClips, which are basically shortcuts to websites on the home screen. An actual application cannot change it's icon at runtime, as it's defined in the static Info.plist file.

The only exception to this rule is Newsstand applications.

Community
  • 1
  • 1
Ell Neal
  • 6,014
  • 2
  • 29
  • 54
  • Making a call via a website ? Opening an iTunes album via a Website shortcut ? Can you explain how this can be done ? So then what about opening my app through a shortcut ? – Oliver Jan 31 '12 at 02:01
  • You might be able to hack some redirects and respond to a custom URL scheme to make this open your app, but I've never tried anything like it before so I can't speak to its integrity. – Ell Neal Jan 31 '12 at 02:06
1

This is now possible in iOS 10.3 using the UIApplication.setAlternateIconName(_:completionHandler:) API.

See my answer to this question: https://stackoverflow.com/a/44966454/233602

Cœur
  • 37,241
  • 25
  • 195
  • 267
Andrew Ebling
  • 10,175
  • 10
  • 58
  • 75
-1

Changing your actual icon (other than, e.g, badging) would require changing the app bundle. I'm pretty sure that you don't have write access to the bundle, and in any event this should change the code signature, causing the OS to prevent launching.

So, no. Apps can put links to web sites, but not change their own app.

Conrad Shultz
  • 8,748
  • 2
  • 31
  • 33