Cocoa Pods 与 google 日历 api
Cocoa Pods with google calendar api
我正在按照 google 日历 api 上 iOS 网页的说明进行操作。
参见 link。 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。
我正在按照 google 日历 api 上 iOS 网页的说明进行操作。 参见 link。 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。