BLACK FRIDAY SALE: Save 50% on all my Swift books and bundles! >>

How to correctly setup Assets catalogs for frameworks and main app?

Forums > iOS


I have an app that uses 3 modules created as frameworks and those have their own asset catalogs but these assets are not available unless they are also present in the Asset catalog for main app. AFAIK when you build an app Xcode should combine all catalogs into file right?

Also when I don't have assets in the frameworks then Xcode complains in the debug output that asset could not be loaded from the frameworks bundle.

Thanks for help.

Ideally I would want to not have to duplicate the assets.



Hm...not sure how that would work. At first i thought you just have multiple targets with separate AssetCatalogues which i used right now and it all works, but when frameworks have their own assets is somewhat new to me.

Right now you have to have the same assets in the main + framework? If it combines all the catalogues than you should be fine?


Well the issue is duplication. These frameworks contain screens which have icons hence the need for Asset catalog. If I dont add these assets to the main app they dont load, if they are not added to the frameworks then Xcode complains in the log and who knows what problems can this bring..


Hacking with Swift is sponsored by Guardsquare

SPONSORED AppSweep by Guardsquare helps developers automate the mobile app security testing process with fast, free scans. By using AppSweep’s actionable recommendations, developers can improve the security posture of their apps in accordance with security standards like OWASP.

Learn more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.