Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods with custom framework

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?

like image 831
Thomas G. Avatar asked May 13 '14 10:05

Thomas G.


1 Answers

Try using vendored_framework like explained here: Podspec Link Binary Library

spec.ios.vendored_frameworks = 'Frameworks/MyFramework.framework'
like image 103
Poulet numéro 1687547878234 Avatar answered Sep 22 '22 13:09

Poulet numéro 1687547878234