Include pods in main target and not in WatchKit extension

痴心易碎 提交于 2019-12-03 03:12:43

The warnings outputted by CocoaPods is due to two CocoaPods targets are trying to be linked to a single target in your application (which isn't supported).

I.e, you have an explicit target HomeHandler and you are linking the nameless target to HomeHandler too with link_with "HomeHandler", "HomeHandler WatchKit Extension".

My suggestion would be to revamp your Podfile to look something like the following:

platform :ios, '8.0'
use_frameworks!

source 'https://github.com/artsy/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'

def shared_pods
    pod 'AFNetworking', :git => 'https://github.com/AFNetworking/AFNetworking.git'
    pod 'CocoaLumberjack', '~> 2.0.0'
    pod 'MagicalRecord', :git => "https://github.com/magicalpanda/MagicalRecord.git"
    pod 'UICKeyChainStore'
end

target 'HomeHandler' do
    shared_pods
    pod 'XLForm', git: 'git@github.com:xmartlabs/XLForm.git'
    pod 'UAProgressView'
    pod 'Classy', git: 'git@github.com:depl0y/Classy.git'
    pod 'Reveal-iOS-SDK', :configurations => ['Debug']
    pod 'JBChartView', '~> 2.8.9'
    pod 'RFQuiltLayout'
    pod 'HUMSlider', '~> 1.0'
    pod 'SwiftEventBus', :git => 'https://github.com/depl0y/SwiftEventBus.git'
    pod 'PureLayout'
end

target 'HomeHandler WatchKit Extension' do
    shared_pods
end
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!