Mergeable Libraries & Image assets

We are unable to access images from an Asset catalog that is part of a dynamic framework that is mergeable, on Debug configuration, when running on an actual device under certain circumstances when using Xcode 16.4 and targeting iOS.

If anywhere in the app we call the Bundle(identifier:) initializer for whatever ID, subsequent calls to UIImage(named:in:with:) for images in the framework's bundle return nil. We have verified that the bundle (path) and the name of image & assets target memberships are correct, and that Assets.car has the images.

Additionally the only way to make UIImage(named:in:with:) work is to use Bundle(for:) where BundleFinder is part of the mergeable library, non private NSObject class. Anything else and the re-exported bundle is returned which has no assets.

For now, I suggest sticking with the class-based Bundle(for:) API. @Aris-Sarris was able to get me a reproducible project through other means, so I am looking into details around Bundle(identifier:).

— Ed Ford,  DTS Engineer

To follow-up on what I wrote above, we consider Bundle(identifier:) not working to access resources after applying mergable libraries to be a bug (r. 160980281), and so please use the class-based Bundle(for:) initializer while we investigate that issue further.

— Ed Ford,  DTS Engineer

Mergeable Libraries & Image assets
 
 
Q