简体   繁体   English

可可豆与谷歌日历API

[英]Cocoa Pods with google calendar api

I am following the instructions on the google calendar api for iOS web page. 我正在按照iOS版Google日历api上的说明进行操作。 See link. 见链接。 https://developers.google.com/google-apps/calendar/quickstart/ios?ver=objc#step_2_prepare_the_workspace https://developers.google.com/google-apps/calendar/quickstart/ios?ver=objc#step_2_prepare_the_workspace

When I follow these terminal commands 当我遵循这些终端命令时

cat << EOF > Podfile &&
platform :ios, '7.0'
pod 'GoogleAPIClient/Calendar', '~> 1.0.2'
pod 'GTMOAuth2', '~> 1.1.0'
EOF
pod install &&
open QuickstartApp.xcworkspace

I get the following error 我收到以下错误

[!] 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.

I am not sure why this is happening. 我不确定为什么会这样。 My project has a different name then QuickstartApp but I don't think this is causing the errors. 我的项目的名称与QuickstartApp的名称不同,但是我认为这不是导致错误的原因。

You should probably create the Podfile the way Cocoapods recommends . 您可能应该按照Cocoapods的建议创建Podfile

Yours should probably look like: 您的应该看起来像:

platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
    pod 'GoogleAPIClient/Calendar', '~> 1.0.2' 
    pod 'GTMOAuth2', '~> 1.1.0
end

Now run pod install then open you Xcode workspace. 现在运行pod install然后打开Xcode工作区。

One of the recent changes for Cocoapods was that targets need to be named . Cocoapods最近的变化之一是需要命名目标

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM