How to specify a cocoa pod asset target

Viewed 967

I have created a cocoa pod framework that includes some image assets. These assets are included in the pod spec and I can see the image when I inspect the framework, however I'm unable to access it from my app. When I inspect the assets in the "Development Pods" section I noticed that the target is a bundle called Zapic-Zapic instead of the target Zapic. If I change the target membership to just "Zapic" everything works as expected and I can access the image via the bundle. How do I change the target in my framework so that if I don't need to manually change the target?

enter image description here

2 Answers

Great Daniel, Above answer is correct:)

Earlier we had to manually select the Pod target then clean and build but start facing really issue when integrating CI. I spent hours to find out why its creating another target for resoruce_bundle but not for resources (contains custom font). Finally it worked now.

 sp.source_files  = "POD_PATH/**/*.{swift,xib}","POD_PATH/Font/open-sans/*.{ttf,txt,xib}"

 sp.resources = 'POD_PATH/Assets.xcassets'
Related