Wednesday, 15 May 2019

Does Both Referencing an Asset Catalogue and Including it from a Framework Create Duplication?

As discussed here & here, the only apparent way to host re-usable images in a Framework's .xcassets file, then use those images in the storyboard / XIB of an app, is to manually create a reference to that catalog file directly within the app's project. This puts the assets within the app's main bundle, and avoids this error when trying to use them via Interface Builder:

Could not load the "ImageName" image referenced from a nib in the bundle with identifier "BundleName"

My question, though, is: Does this lead to duplication of the assets at build-time? Is iOS smart enough not to double-up assets which are both:

  • Referenced in the app's main bundle and
  • Included in the bundle of an embedded framework

If this does lead to duplication, what other approach can achieve the same result more efficiently?



from Does Both Referencing an Asset Catalogue and Including it from a Framework Create Duplication?

No comments:

Post a Comment