简体   繁体   中英

Cocoa Pods No header file found for local pod

I was testing the use of a podfile i am working on by doing the following ...

In my application i added the pod

pod "SampleSDK" , :local=>pod "SampleSDK", :local=>"~/Documents/Dev/iOS/MobSample"

and my pod spec file is as follows

Pod::Spec.new do |s|
  s.name         = "SampleSDK"
  s.version      = "1.0.2"
  s.summary      = "This is an Objective-C SDK for Sample."
  s.homepage     = "https://github.com/Sample/SampleSDK.git"

  s.source          = { :git => "https://github.com/Sample/SampleSDK.git",:tag => "v1.0.2"}
  s.public_header_files = 'SampleSDK-iosuniversal/SampleSDK.framework/Headers/*.h'
  s.preserve_paths    = SamplekSDK-iosuniversal/SampleSDK.framework'
  s.frameworks =  'Foundation', 'QuartzCore' , 'SystemConfiguration'
  s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/SampleSDK/Headers"', 'OTHER_LDFLAGS' => '$(inherited) -all_load -ObjC' }
end

pod spec validation is passed but when i do pod install no header files are present in LocalPods>>SampleSDK>>

Where am i going wrong? How should i proceed further?

The public_header_files is a positive filter of the source_files . In this case as all the headers are public you could replace the former with the later and the podspec should work as expected.

If that's actually what your Podfile looks like that is the issue. As shown in the documentation the purpose of the :local key is to allow you to point to the source of a library locally, while also using a podspec that's already part of the master repo . Update : Fabio pointed out to me that as it says in the docs the :local option does actually expect the the podspec in the folder as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM