【问题标题】:Cocoa Pods with google calendar api带有谷歌日历 api 的可可豆荚
【发布时间】:2016-06-03 02:38:36
【问题描述】:

我正在按照适用于 iOS 网页的谷歌日历 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 不同,但我认为这不会导致错误。

【问题讨论】:

  • 我认为 Google 需要更新他们的文档。

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


【解决方案1】:

您可能应该以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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-12
    • 1970-01-01
    • 1970-01-01
    • 2015-12-02
    • 2018-06-07
    相关资源
    最近更新 更多