Cocoapods未下载watchOS二进制文件

时间:2019-05-02 22:13:27

标签: ios cocoapods

我正在开发一个watchOS静态库,该库依赖于静态库的pod。在这种情况下,我是这两个库的开发人员。

我的“父”库的pod规范看起来像

Pod::Spec.new do |s|
  s.name         = “MainPod”

  ...

  s.ios.deployment_target = '10.0'
  s.watchos.deployment_target = '3.0'
  s.default_subspec = 'main'

  s.subspec 'main' do |th|

    th.ios.vendored_libraries = "iOS/libMain_iOS.a”
    th.ios.frameworks = "UIKit", "SystemConfiguration", "WebKit", "UserNotifications"
    th.ios.libraries = "sqlite3.0", "z", "c++"
    th.ios.source_files = "iOS/include/*.h"

    th.watchos.vendored_libraries = "watchOS/libMain_watchOS.a”
    th.watchos.frameworks = "UIKit", "UserNotifications", "WatchKit"
    th.watchos.libraries = "sqlite3.0", "z", "c++"
    th.watchos.source_files = "watchOS/include/*.h"

  end

end

我推了这个吊舱,并将其安装在watchOS应用程序中,没有任何问题。现在,当我在儿童watchOS静态库中时,在运行“ pod install”时收到错误消息。 [!] The Podfile contains framework or static library targets (Child_watchOS), for which the Podfile does not contain host targets (targets which embed the framework). If this project is for doing framework development, you can ignore this message. Otherwise, add a target to the Podfile that embeds these frameworks to make this message go away (e.g. a test target).

当我查看pods文件夹时,我注意到它没有像我期望的那样下载watchOS静态库。

我的子库中的pod文件如下:

platform :ios, '10.0'

workspace ‘…’
project ‘…’

target 'Child_iOS' do
    pod ‘MainPod’
end

target ‘Child_watchOS’ do
  platform :watchos, '3.0'
  pod ‘MainPod’
end

在我的子watchOS库的构建设置中,我将基本的SDK和支持的平台设置为“ watchOS”。谁能告诉我为什么可可豆荚没有意识到这是watchOS的目标?

0 个答案:

没有答案