gpt4 book ai didi

ios - 请将嵌入式目标的主机目标添加到 Podfile

转载 作者:可可西里 更新时间:2023-11-01 01:07:57 27 4
gpt4 key购买 nike

我的项目使用的是 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)

最佳答案

问题不在podfile,而在project!

修复:

  • 转到 XCode
  • 选择您的主机目标。
  • 打开目标的“常规”页面
  • 在“嵌入式​​二进制文件”部分,确保存在您的 EXTENSION 目标。 enter image description here

  • 在你的 Podfile 中你应该有:

    目标'HostApp'做
    ....
    目标 'YourExtension' 做
    ....
    结尾
    结束

关于ios - 请将嵌入式目标的主机目标添加到 Podfile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53607730/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com