CocoaPods - iOS,添加新的OSX目标,没有正确链接?

时间:2016-03-27 01:22:23

标签: ios macos cocoapods

我有一个iOS应用程序,现在需要一个osx构建。由于它是80%的共享代码,我已经为项目添加了一个OSX构建。

使用我的cocoapods我收到一些构建错误(在安装pod之后,还尝试了pod更新) 还发现我已经明确地将一个pod添加到osx目标,以使它在工作区文件中进行链接和构建阶段魔术。

第一个和关键错误:

Target 'Pods-scoreosx' of project 'Pods' was rejected as an implicit dependency for 'Pods_scoreosx.framework' because it doesn't contain platform 'macosx' in its SUPPORTED_PLATFORMS 'iphonesimulator, iphoneos'

任何人都知道我做错了什么?

编辑: 当前的Podspec文件:

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'

use_frameworks!

pod 'EmitterKit'
pod 'SwiftDate'
pod 'CocoaAsyncSocket'
pod 'ReactiveKit', '~> 1.0'
pod 'ReactiveUIKit', '~> 1.0'
pod 'ReactiveFoundation', '~> 1.0'
pod 'AsyncSwift'

target 'score' do

end

target 'scoreTests' do

end

target 'scoreUITests' do

end

target 'scoreosx' do
    pod 'EmitterKit'
end

target 'scoreosxTests' do

end

target 'scoreosxUITests' do

end

1 个答案:

答案 0 :(得分:2)

错误消息表明您需要为目标明确配置平台。设置在目标中声明平台会有所帮助。

target 'scoreosx' do
    platform :osx
    pod 'EmitterKit'
end