Reputation: 143
I am using cocoa pods for publishing my code. I do use few png images as image assets and few are pdf vector images for image views. Both png and pdf are under "image.xcassets"
My podspec currently specify bundle by using below code
myApp.resource_bundle = {
"myApp" => "project/app/Assets/**/*.{storyboard,xib,strings,xcassets}"
}
My question is do since all my png and pdf images are inside image.assets, do i need to specify separately those under resource bundle or since i do specify xcassets it will be taken care. I mean everything under xcassets will be get include?
solution 1
myApp.resource_bundle = {
"myApp" => "project/app/Assets/**/*.{storyboard,xib,strings,xcassets}"
}
solution 2
myApp.resource_bundle = {
"myApp" => "project/app/Assets/**/*.{storyboard,xib,strings,xcassets,png,pdf}"
}
which one is correct?
Upvotes: 2
Views: 2534
Reputation: 1946
Solution 1 is itself is more than enough to include xcassets
in the pod. Since it is iOS specific, you can specify it as myApp.ios.resource_bundle
instead of myApp.resource_bundle
.
You can find more details on ios.resource_bundle
here.
More details on resource_bundle and xcassets can be found here
You can also PodAsset as a dependency to your podspec to access assets from Pods.
Upvotes: 3