我正在按照适用于 iOS 网页的 google calendar api 上的说明进行操作。 见链接。 https://developers.google.com/google-apps/calendar/quickstart/ios?ver=objc#step_2_prepare_the_workspace
当我执行这些终端命令时
cat << EOF > Podfile &&
platform :ios, '7.0'
pod 'GoogleAPIClient/Calendar', '~> 1.0.2'
pod 'GTMOAuth2', '~> 1.1.0'
EOF
pod install &&
open QuickstartApp.xcworkspace
我得到以下错误
[!] The dependency `GoogleAPIClient/Calendar (~> 1.0.2)` is not used in any concrete target.
The dependency `GTMOAuth2 (~> 1.1.0)` is not used in any concrete target.
我不确定为什么会这样。我的项目与 QuickstartApp 的名称不同,但我认为这不是导致错误的原因。
最佳答案
您可能应该以 Cocoapods recommends 的方式创建 Podfile .
你的应该看起来像:
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'GoogleAPIClient/Calendar', '~> 1.0.2'
pod 'GTMOAuth2', '~> 1.1.0
end
现在运行 pod install
然后打开 Xcode 工作区。
Cocoapods 最近的变化之一是 targets need to be named .
关于ios - 带有谷歌日历 API 的 Cocoa Pods,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37599604/