Is there a way to get the current application icon in a cocoa-touch app? Thank you.
If you use asset catalogues, then you can simply use:
UIImage* appIcon = [UIImage imageNamed:@"AppIcon60x60"];
Asset catalogues seem to standardize filenames for app icons.
Certainly if you need to list all app icons in your bundle you can look it up in CFBundleIconFiles branch of info dictionary.
Using KVC you can easily get that in a single line of code:
NSArray* allIcons = [[[NSBundle mainBundle] infoDictionary] valueForKeyPath:@"CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles"];
Resulting array will contain all app icon names available in your bundle. Any of these names can be used to retrieve icon using +[UIImage imageNamed:]
<__NSCFArray 0x15d54260>(
AppIcon29x29,
AppIcon40x40,
AppIcon60x60
)