Need initializer to load UIApplicationShortcutIcon image from bundle

Originator:brenneke
Number:rdar://26628689 Date Originated:06/03/2016
Status:Open Resolved:
Product:iOS SDK Product Version:9.3
Classification:Enchancement Reproducible:yes
 
Summary:
+[UIApplicationShortcutIcon iconWithTemplateImageName:] takes a filename for the image to load, but if the image is in an XCAsset file, then the Asset must be in the Application's mainBundle, and not a separate resource bundle.  It would be useful to be able to pass the bundle to search as well, so I can keep the shortcut icon in a separate resource bundle with the rest of my images.

i.e. please give us +[UIApplicationShortcutIcon inconWithTemplateImageName:inBundle:]

Use case:  I have one app that that I ship 7 customized versions of for different customers.  All the shared resources are kept in a shared resource bundle that only gets built once and then included in all the apps.  Since UIApplicationShortcutIcon cannot search in bundles other than the main bundle, I currently have to keep them in a separate XCAsset file that gets rebuilt with each app even though it's identical.

Steps to Reproduce:
1. call UIApplicationShortcutIcon iconWithTemplateImageName: with the name of an image in a xcasset within a resource bundle (not main bundle).

Expected Results:
2. image loads.

Actual Results:
3. image fails to load.  Search header for api that lets you specify the bundle.  find it lacking.  file a radar.

Version:
iOS 9.3.2 (Xcode 7.3.1)

Notes:


Configuration:
iPhone 6s, 128GB AT&T

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!