简体   繁体   中英

How to change an iOS application icon programmatically with image from URL?

There is a lot of useful information on how to change the app icon programmatically using "setAlternateIconName" in Swift. According to the documentation of apple, the name of the alternate icon has to be declared in the CFBundleAlternateIcons key of the app's Info.plist file.

Now, I don't want to use pre-saved jpg./png. images to change the app icon. Instead, I'd like to download an image from a URL from within the app and us this downloaded image as the app icon . Obviously, it's not possible to just add the URL to Info.plist in the appropriate field.. Is there a way to solve this problem?

Best, Nik

除了在 Info.plist 中的 CFBundleAlternateIcons 中设置的图标之外,无法将应用程序图标设置为自定义图标

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM