13

I'm attempting to create a Podspec for: https://github.com/sincerely/shiplib-ios-framework

Pod Lint passes & the files are being added to the project but it does not link the binary "Sincerely" file. The sample project build fails due to missing files when importing via: <Sincerely/filename.h>

 Pod::Spec.new do |s|
  s.name  = 'ShipLib'
  s.version = '1.4'
  ...
  s.source = {
    :git => 'https://github.com/sincerely/shiplib-ios-framework.git',
    :tag => 's.version.to_s'
  } 
  s.library = 'Sincerely'
  s.source_files = 'Sincerely.framework','Sincerely.framework/Headers/*.h'
  s.resources = 'Sincerely.framework/Resources/*.{png,nib}'
  s.frameworks = 'AddressBook', 'AddressBookUI', 'SystemConfiguration', 'CoreTelephony'
  s.xcconfig  =   { 'LIBRARY_SEARCH_PATHS' =>  '$(PODS_ROOT)/ShipLib/' }
end

Edit:

Pod::Spec.new do |s|
  s.name  = 'ShipLib'
  s.version = '1.4'
  s.platform = :ios
  s.summary = 'Allow users to send printed photos from your app.'
  s.author = { 'Sincerely' => '[email protected]' }
  s.homepage = 'https://github.com/sincerely/shiplib-ios-framework'
  s.license = { :file => 'LICENSE', :type => 'Commercial' }
  s.source = {
    :git => 'https://github.com/sincerely/shiplib-ios-framework.git',
    :tag => 's.version.to_s'
  }
  s.frameworks = 'AddressBook', 'AddressBookUI', 'SystemConfiguration', 'CoreTelephony'
  s.ios.vendored_frameworks = 'Sincerely.framework'
end

2 Answers 2

14

Headers will not be copied for frameworks, and should not be specified as source files. If all you are looking to do is add the framework as a vendored_framework. This is new in CP 0.23.0.

From the Documentation

  spec.ios.vendored_frameworks = 'Frameworks/MyFramework.framework'

Edit:
Remove all the stuff about the .framework from s.source_files. Source files are just that, files, not frameworks.

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks, I'm still failing with "ld: framework not found Sincerely" ... even though I can now see the framework under Pods Project
Can you post your full, new podfile?
Added the full Podspec to the question
Thanks, I cleaned some of that up. The original "Framework not found" problem persists though. Any thoughts?
Are you sure you're not overriding Framework Search Paths? They should match your Pods.xcconfig
0

I guess your project maybe lack Sincerely library in Sincerely.framework. And if you are using sourcetree to manage project, it is the sourcetree's bug that cause the problem. Sourcetree does not detect the Sincerely library.

Comments

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.