Cocoapods 1.3.1 + XPC 服务

Cocoapods 1.3.1 + XPC Service

在版本 1.2.1 之前,XPC 服务目标在 cocoapods 上运行良好,但更新到 1.3.1 后,出现以下错误:

[!] Unable to find host target(s) for Renderer. Please add the host targets for the embedded targets to the Podfile. Certain kinds of targets require a host target. A host target is a "parent" target which embeds a "child" target. These are example types of targets that need a host target: - Framework - App Extension - Watch OS 1 Extension - Messages Extension (except when used with a Messages Application)

相关的 podspec 行是:

target 'Renderer' do project 'Renderer/Renderer.xcodeproj' platform :osx, '10.10' pod 'HTMLKit', :git => 'https://github.com/iabudiab/HTMLKit.git' end

有什么建议吗?

我尝试将此目标作为我的主要目标的子目标,但没有成功。

如此处所述:https://github.com/CocoaPods/CocoaPods/issues/6256,您需要在主项目中将 XPC 服务指定为目标依赖项。