美文网首页
CocoaPods: Unable to find host t

CocoaPods: Unable to find host t

作者: 沃尔德 | 来源:发表于2017-04-19 09:59 被阅读1384次

CocoaPods 1.2.1 is available.

after To update use: `gem install cocoapods`

I was trying to add sqlite3 to a target. As follows is an example of my Podfile:

# Uncomment the next line to define a global platform for your project

platform :ios, 7.0'

use _frameworks!

target 'SampleApp' do

#various pods

end

target ‘stcTarget’ do

pod ‘sqlite3’

end

When I ranpod install, I received the following error:

[!] Unable to find host target(s) for stcTarget. Please add the host targets for the embedded targets in the Podfile.

I confirmed that the stcTarget was spelled correctly in both the Podfile and in Xcode.

Solution

1. Backup the Podfile.

$ mv Podfile Podfile.bak

2. Create a new Podfile.

$ pod init

3. Copy and paste the target configuration from the Podfile.bak to the new Podfile.

4. Install the pods.

$ pod install

今天再次测试 发现 1.2.1 存在这个问题 建议切换回1.2.0可解决

相关文章

网友评论

      本文标题:CocoaPods: Unable to find host t

      本文链接:https://www.haomeiwen.com/subject/yjdwattx.html