How to dynamically change an app icon

Asked on 08/02/2024

1 search

To dynamically change an app icon, you can leverage the new features introduced in iOS 18. Specifically, iOS 18 allows app icons and widgets to appear in light, dark, or tinted versions. This means you can customize each version of your app icon to ensure it looks great in different modes.

Here are the steps to dynamically change your app icon:

  1. Prepare Icon Variants: Create light, dark, and tinted versions of your app icon. The human interface guidelines have updated icon templates and best practices for adapting your icons to these new appearances.

  2. Update Asset Catalog: Use Xcode to add these icon variants to your asset catalog. Xcode now supports dark and tinted app icon variants that you can drop right into your asset catalog.

  3. Implement in Code: Use the appropriate APIs to switch between these icon variants based on the user's system settings or other conditions in your app.

For more detailed guidance, you can refer to the session Platforms State of the Union (45:58) where these new customization options are discussed.

Relevant Sessions