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

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容