ios - 请将嵌入式目标的主机目标添加到 Podfile
问题描述
我的项目是 Swift 2.0。我正在尝试所有可能的方法,但没有找到任何解决方案。
我的 pod 文件
# Uncomment this line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, :deployment_target => '8.0'
# ignore all warnings from all pods
inhibit_all_warnings!
use_frameworks!
def available_pods
pod 'IQKeyboardManager'
pod 'Instabug'
pod "TSMessages"
pod 'AsyncSwift' , :git => 'https://github.com/duemunk/Async.git'
pod 'Onboard' # not used
pod 'DZNEmptyDataSet' # not used
pod 'iOS-Slide-Menu'
pod 'Kanna', :git => 'https://github.com/tid-kijyun/Kanna.git'
pod 'HanekeSwift', :git => 'https://github.com/Haneke/HanekeSwift.git'
pod 'Alamofire'
pod 'ObjectMapper', :git => 'https://github.com/Hearst-DD/ObjectMapper.git'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'ReachabilitySwift'
pod 'SCLAlertView'
pod 'ImageLoader'
pod 'NVActivityIndicatorView', :git => 'https://github.com/ninjaprox/NVActivityIndicatorView.git'
pod 'ActiveLabel'
pod 'MWFeedParser'
pod "SwiftElegantDropdownMenu"
pod 'SwiftHEXColors'
pod 'UITextView+Placeholder'
pod "AFDateHelper"
pod 'DateTools'
pod "SwiftDate", "~> 2.0"
pod 'APAddressBook/Swift'
pod 'FBSDKLoginKit'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'PusherSwift', git: 'https://github.com/pusher/pusher-websocket-swift.git', branch: 'push-notifications'
end
def available_pods_exc
pod 'Alamofire'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'ReachabilitySwift'
pod 'Kanna', :git => 'https://github.com/tid-kijyun/Kanna.git'
pod 'AsyncSwift' , :git => 'https://github.com/duemunk/Async.git'
end
target 'link' do
available_pods
end
target 'ReadLaterExtension' do
available_pods_exc
end
target 'Link Tests' do
pod 'Quick', '0.3.1'
pod 'Nimble'
end
我发现以下错误
[!] Unable to find host target(s) for ReadLaterExtension. 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)
解决方案
推荐阅读
- java - 此版本中使用了弃用的 Gradle 功能,使其与带有 Minecraft Forge 1.12.2 的 Gradle 5.0 不兼容
- java - 不允许使用数组初始化器(扫雷的副本)
- opencv - 恢复具有已知 3d 和 2d 点的投影矩阵
- java - 使 Kafka ConcurrentMessageListenerContainer 作为一个批处理工作
- amazon-web-services - 如何使用从 Amazon EC2 下载的新密钥对?
- javascript - 待处理的任务和量角器
- python - 如何将这些 Python 代码转换为 rstudio?
- popup - 完成拖放游戏后,需要弹出图像并带有下一个游戏的按钮
- ios - 如何在获取 api 响应并存储在 coredata 中然后在 UItableview 中显示后消除重复数据
- r - 使用列表填充数据框的列