UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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

Forums > iOS

Hi,

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 Assets.car 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.

3      

@emin  

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?

3      

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..

3      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

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.