ray ray - 4 months ago 32x
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'
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.


You should probably create the Podfile the way Cocoapods recommends.

Yours should probably look like:

platform :ios, '8.0'

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

Now run pod install then open you Xcode workspace.

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