Answers
Great question! Since your app supports only iOS 26 and later, you can leverage the latest streamlined APIs and Xcode 26 features to support alternate app icons more easily.
Here’s a step-by-step guide to add alternate app icons in Xcode 26 for iOS 26+:
1. Prepare Your Icon Assets
- Create your primary app icon and alternate app icons.
- Each icon set should follow the required sizes for iOS app icons (usually 1024x1024 and smaller variants are auto-generated).
- In your Assets.xcassets, create an AppIcon asset for your primary icon.
- Create additional app icon sets for your alternate icons:
- Right-click in the asset catalog → New App Icon → name it (e.g.,
AlternateIcon1
).
2. Update Info.plist
In iOS 26+, alternate app icons are declared in the Info.plist
under the new CFBundleIcons
dictionary with the key CFBundleAlternateIcons
.
The structure is like this:
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconName</key>
<string>AppIcon</string> <!-- Your primary icon set name -->
</dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>AlternateIcon1</key>
<dict>
<key>CFBundleIconName</key>
<string>AlternateIcon1</string> <!-- name of alternate icon set -->
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>AlternateIcon2</key>
<dict>
<key>CFBundleIconName</key>
<string>AlternateIcon2</string>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
</dict>
- Replace
AlternateIcon1
andAlternateIcon2
with your actual alternate icon asset names.
3. Change the App Icon Programmatically
Use the new API from iOS 26:
if UIApplication.shared.supportsAlternateIcons {
UIApplication.shared.setAlternateIconName("AlternateIcon1") { error in
if let error = error {
print("Error setting alternate icon: \(error.localizedDescription)")
} else {
print("Alternate icon set successfully")
}
}
}
- To switch back to the primary icon, pass
nil
:
UIApplication.shared.setAlternateIconName(nil)
4. User Interface (Optional)
You can add a UI in your app letting users pick the alternate icon, then call setAlternateIconName
.
5. Build and Test
- Run your app on a device or simulator with iOS 26 or later.
- Switch icons via your app UI and confirm the icon updates on the home screen.
Summary
- Create alternate icon sets in your asset catalog.
- Declare them in
Info.plist
underCFBundleIcons
→CFBundleAlternateIcons
. - Use
UIApplication.shared.setAlternateIconName(_:)
API to switch icons. - Since you only support iOS 26+, no need for backwards compatibility hacks.
If you want, I can help you generate the exact Info.plist
XML or Swift code snippet for your specific icon names. Just let me know!