6

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?

1 Answer 1

8

Try using vendored_framework like explained here: Podspec Link Binary Library

spec.ios.vendored_frameworks = 'Frameworks/MyFramework.framework'
Sign up to request clarification or add additional context in comments.

1 Comment

I'm getting headers not found in my example app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.