Switching App Icon at Runtime

Last updated: Jun 22, 2026

The Dynamic App Icon bridge lets your website switch the app's launcher icon at runtime — no rebuild or store update required. Upload up to 5 alternate icons from the dashboard and switch between them based on user preference, season, or any logic your website controls.

Switching the Icon

Send this message from your website to change the active app icon:

javascript
appilix.postMessage(JSON.stringify({
    type: "update_app_icon",
    props: {
        icon: 1
    }
}));

Parameters

ParameterTypeRequiredDescription
iconintegerYesIcon slot to activate (15), or 0 to restore the default app icon

Restoring the Default Icon

Pass icon: 0 to revert to the original icon set when the app was built:

javascript
appilix.postMessage(JSON.stringify({
    type: "update_app_icon",
    props: {
        icon: 0
    }
}));

Example: Let Users Pick Their Icon

javascript
document.querySelectorAll('.icon-option').forEach(function(btn) {
    btn.addEventListener('click', function() {
        if (typeof appilix === 'undefined') return;

        var slot = parseInt(btn.dataset.slot, 10);

        appilix.postMessage(JSON.stringify({
            type: "update_app_icon",
            props: {
                icon: slot
            }
        }));
    });
});
Tip: Always check typeof appilix !== 'undefined' before calling bridge methods so your website degrades gracefully in a regular browser.

Platform Notes

Android — Icon changes are not always instant. On some devices the launcher takes time to reflect the update. To confirm the change worked during testing, fully kill the app and reopen it — the new icon should appear. Additionally, some Android devices (particularly those with heavily customized launchers) may not support dynamic icon switching at all due to manufacturer restrictions.

iOS — Icon changes take effect almost immediately.