Reputation: 121
I want to add my Assets.xcassets into my pod, so I have added the following to my podspec
s.source_files = ['Classes/**/*.{h,m,swift,json,strings,xib,storyboard}']
s.resource_bundles = {'mysystem' => 'Classes/Resources/Assets.xcassets'}
I keep getting this error after I do pod lib lint
- ERROR | [iOS] unknown: Encountered an unknown error (Unable to find other source ref for `Contents.json` for target `mysystem`.) during validation.
Here is what it looks like inside of my resources folder
I have tried a lot of different other things instead but none worked:
s.resources = ['Classes/Resources/Assets.xcassets']
s.source_files = ['Classes/**/*.{h,m,swift,json,strings,xib,storyboard, xcassets}']
Upvotes: 2
Views: 4679
Reputation: 688
The reason why this error can occur is that this Contents.json
sits somewhere in source folder (that we specify in .podspec
file).
You should double check that your source folder includes only code and nothing else.
Upvotes: 3
Reputation: 101
I got the exact same error. The solution is,
Move the assets from Source to it's parent folder.
Project Structure
And the podspec looks like this
s.ios.deployment_target = '13.0'
s.source_files = 'Source/**/**'
s.swift_version = '5.0'
s.platforms = {
"ios": "13.0"
}
s.resource_bundles = {
'MotionToastView' => ['MotionToastView/**']
}
Upvotes: 5