1

I am attempting to install the Google Calendar API using Swift. I am attempting to run the sample they placed online https://developers.google.com/google-apps/calendar/quickstart/ios?ver=swift#step_2_prepare_the_workspace

However, I am seeing the error, "No such module 'GoogleAPIClient'" However, the folder is clearly in the project directory. Please help. Screenshots below enter image description here

enter image description here

DMop
  • 463
  • 8
  • 23
  • Can you try the solution provided in this [thread](http://stackoverflow.com/questions/29500227/xcode-no-such-module-error-but-the-framework-is-there). One of the solution says "Opening xcodeproj instead of xcworkspace will cause an error like this". – ReyAnthonyRenacia May 21 '16 at 15:10
  • @noogui I don't see xcworkspace in my project directory...do you know what may cause that? – DMop May 21 '16 at 15:49

2 Answers2

1

Try to add

 #import <GTMOAuth2/GTMOAuth2Authentication.h> 

in your Bridging-Header.h

Eman Rezk
  • 422
  • 4
  • 12
  • I don't have that file. I seem to have had some sort of error when building the pods. I got this error "TypeError - Unable to convert Ruby value `"GTMOAuth2"' into a CFTypeRef." Do you know how to fix this? – DMop May 21 '16 at 23:29
  • to add this file drag any .m file to your project – Eman Rezk May 21 '16 at 23:52
  • No it isn't. This did not add a bridging header to my file – DMop May 23 '16 at 22:03
  • drag any .m file to your project when drag it the following will appear – Eman Rezk May 23 '16 at 23:51
  • you can use this link to add bridging-Header.h file https://www.hackingwithswift.com/example-code/language/how-to-create-an-objective-c-bridging-header-to-use-code-in-swift – Eman Rezk May 23 '16 at 23:55
  • It actually looks like I'm having a pods issue that stems from the version of ruby I was using. – DMop May 24 '16 at 20:56
0

The module could not be read because the pod install was not successful. This appears to be due to the version of ruby that was being used at the time. Updating ruby and re-running 'pod install' solved this issue.

DMop
  • 463
  • 8
  • 23