I want to generate an podspec-file which has an custom framework, one class and a third party framework as dependency.
The single class refers to the custom framework by including one header of that framework. If I run
pod lib lint
this error appears :
- ERROR | [xcodebuild] /Users/xyz/Documents/iOS/Apps/Sample/Core/Sample.h:10:9: fatal error: 'CustomFramework/Bar.h' file not found
The related part of my podspec file looks like this:
s.source_files = 'Core/*' , 'Core/CustomFramework.framework/Headers/*.h'
s.preserve_paths = 'Core/CustomFramework.framework/**/*'
s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"${PODS_ROOT}/Headers"' }
s.frameworks = 'CustomFramework'
s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC' , 'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/CustomFramework/Headers"'}
s.dependency 'MapBox', '1.1.0'
The single class inherits from class of the MapBox framework.
I feel like I miss something but can not figure out what. Any suggestions or hints?
Try using vendored_framework
like explained here: Podspec Link Binary Library
spec.ios.vendored_frameworks = 'Frameworks/MyFramework.framework'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With