CocoaPods: Unable to find host target(s) for xxx-target

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可解决

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容