ray ray - 6 months ago 52
Objective-C Question

Cocoa Pods with google calendar api

I am following the instructions on the google calendar api for iOS web page.
See link. 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.

Answer

You should probably create the Podfile the way Cocoapods recommends.

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.

One of the recent changes for Cocoapods was that targets need to be named.

Comments