Cocoa podspec and path for dependency

扶醉桌前 提交于 2019-12-03 11:03:11

You should use the :path keyword in your Podfile :

pod 'AFNetworking', :path => '~/Documents/AFNetworking/AFNetworking.podspec'

Tips: If you don't know the path, you can drag & drop the file in your Podfile and it will display it.

EDIT

I did not understand correctly what the OP was asking for, here is the correct answer:

  1. Put the local dependency inside your pod's folder root directory,
  2. In your Podspec file, just add s.ios.dependency 'YourPodName/YourPodDependencyFolder'

After that, create a subspace like so:

s.subspec 'YourPodName' do |ss|
ss.source_files = 'YourPodName/**/*.{h,m}'
end

I dont can put the other libraries in the root of my library, these are inside the parent because are shared with other project, but unfortunately without use the pods, and I'm trying to use the pods for all, and I already configured the podspec for all libraries.

I'm trying to do something like this written below, but do not appear to work:

Pod::Spec.new do |s|
    s.name                  = 'MyLibrary'
    s.platform              = 'ios'
    s.ios.deployment_target = '7.1'
    s.source_files          = 'Classes/**/.{h,m}'
    s.resource              = 'Classes/resources/*.*'
    s.requires_arc          = true
    s.dependency 'AFNetworking'
    s.dependency 'SharedLib'

    s.subspec 'SharedLib' do |ss|
        ss.source_files         = '../SharedLib/Classes/**/*.{h,m}'
        s.resource              = '../SharedLib/Classes/resources/*.*'
        ss.ios.framework        = 'AVFoundation'
    end
end

thanks for all.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!