0

我想在主应用程序及其扩展程序中使用一些库。我试过这个podfile

platform :ios, '10.2'
use_frameworks!
target 'myApp' do
       target 'myAppShareExtension' do
                pod 'SVProgressHUD', :git => 'https://github.com/SVProgressHUD/SVProgressHUD.git'
                pod 'Alamofire', '~> 4.0'
                pod 'FileKit', '~> 4.0.1'
       end
end

但是我Targets Support Files的名字Pods-myApp-myAppShareExtension应该是Pods-myAppShareExtension这样,这让我认为问题来自于 podfile。

谢谢。

4

1 回答 1

0

你可以试试这个:

为多个目标共享 pod 的最佳方式:

def shared_pods
            pod 'SVProgressHUD', :git => 'https://github.com/SVProgressHUD/SVProgressHUD.git'
            pod 'Alamofire', '~> 4.0'
            pod 'FileKit', '~> 4.0.1'

end

target 'myApp' do
    shared_pods
end

target 'myAppShareExtension' do
    shared_pods
end
于 2017-05-03T07:17:45.300 回答