Change iOS app icon in a WKWebView-based Swift app during runtime

Creating icons for app

Changing the app icon in a non-static way, but DYNAMICALLY (aka programmatically!) on iOS can be a bit tricky, especially if you’re using a WKWebView to display your app’s content. However, using a tool like WebViewGold makes the process much easier.

WebViewGold is a pre-built iOS and Android app template that allows you to easily create a native app from a website. It includes a number of useful features, one of which is the Dynamic App Icon API. This API allows you to change the app icon on the fly, without having to resubmit your app to the App Store.

After downloading WebViewGold, the Dynamic App Icon API allows developers to change the app icon with the click of a button using WebViewGold. Up to three alternative app icons can be chosen from the default app icon. Upon successful completion, the user will be notified. To change the app icon, a new version of the app with the new icon must be published, or the URL can be linked to one of the following formats: “changeicon://icon1”, “changeicon://icon2”, “changeicon://icon3”, or “changeicon://default”. To set alternative app icons, navigate to the “AppIconAlternate” folder in the app files and replace the template icons with the correct file name format and size. A demonstration and testing page and a more detailed guide on app icon specifications can also be viewed.