سؤال

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'
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top