Cocoa podspec and path for dependency

后端 未结 2 1338
被撕碎了的回忆
被撕碎了的回忆 2021-02-07 01:02

how can I specify in podspec a local path for an dependency ?

like : s.dependency \'MyLibrary\', :path => \'../MyLibrary\'

thanks

2条回答
  •  名媛妹妹
    2021-02-07 01:59

    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.

提交回复
热议问题