1

With the new iOS 10.3 beta I heard that you can change the icon of your app programmatically using a PNG file included in your app and mentioning it in your Info.plist. I have successfully done this using images that were already in my app at build-time. My idea was that you could set the image to whatever you want, by getting a PNG representation of a UIImage and then saving it to a PNG file inside your app bundle, so that when the icon is changed it will be changed to that UIImage.

Let's say I have a PNG file (ic_custom.png) in my app here:

https://i.stack.imgur.com/eGsYm.jpg

How would I save a UIImage to this exact file (so that Info.plist could still read it), and could I access it using the setAlternateIcon method in Swift 3? If you can't write to it, then is there a way that the Info.plist could still access it if it were in the Documents directory?

Wilson Gramer
  • 702
  • 8
  • 23
  • You can't modify your Bundle files – Leo Dabus Feb 08 '17 at 15:19
  • @LeoDabus Is there a way to link the Info.plist to the documents directory somehow? – Wilson Gramer Feb 08 '17 at 19:01
  • I expect Apple does not want apps to be able to do what you want. The icon images have to be pre-defined - and reviewable by Apple. It looks like the Major League Baseball app has used this to allow customers to change the app icon to the logo of their favorite team. – Daniel Mar 31 '17 at 19:37

0 Answers0