With Xcode 13+ no need to work with files/plist manually anymore.
You just need to set to **YES** the “**Include All App Icon Assets**” setting under build settings. Or click on "Your Target" - General - App Icons and Launch Screen - Include All App Icon Assets.
[![Include app icon assets][1]][1]
After that just add icons to xcassets catalog. (Also works with Single Size icons).
Better **avoid using symbols** in the name of icons.
It didn't work for me on iPad with icon name "**Icon-Red**", but it worked fine with "**IconRed**"
Swift sample
UIApplication.shared.setAlternateIconName("IconRed", completionHandler: nil)
Obj-C sample
[[UIApplication sharedApplication] setAlternateIconName:@"IconRed" completionHandler:nil];
[1]: https://i.stack.imgur.com/co9RC.png
With Xcode 13+ no need to work with files/plist manually anymore.
You just need to set to **YES** the “**Include All App Icon Assets**” setting under build settings. Or click on "Your Target" - General - App Icons and Launch Screen - Include All App Icon Assets.
[![Include app icon assets][1]][1]
After that just add icons to xcassets catalog. (Also works with Single Size icons).
Better **avoid using symbols** in the name of icons.
It didn't work for me on iPad with icon name "**Icon-Red**", but it worked fine with "**IconRed**"
Use the code provided in the previous answers.
Swift sample
UIApplication.shared.setAlternateIconName("IconRed", completionHandler: nil)
Obj-C sample
[[UIApplication sharedApplication] setAlternateIconName:@"IconRed" completionHandler:nil];
[1]: https://i.stack.imgur.com/co9RC.png