ios - 带有谷歌日历 API 的 Cocoa Pods

标签 ios objective-c cocoapods google-calendar-api

我正在按照适用于 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/

相关文章:

iOS 6 : Parent modal's modalPresentationStyle ignored after rotation

ios - 如何将字符串转换为数据

ios - 在哪里连接 UIViewController 子类中的 socket ?

ios - Swift 中全局变量和函数的最佳实践是什么?

ios - 安装 CocoaPods 后的 Xcode 错误 - 没有这样的文件或目录

ios - NSFetch请求 : FetchBatchSize and Faulting Behaviour

objective-c - firebase 手机身份验证失败 ios

objective-c - objective-c 中的排序数组或映射?

ios - 带有 xcconfig 链接器标志的 CocoaPods 警告

ios - 安装 pod 时出错