Reputation: 867
I have done web development for a couple years and this is my first project with an iOS application. I have followed all of the instructions from Google's Get the Google Sign-in SDK for iOS (without CocoaPods), and I tried simulating the application and I'm getting this error: Use of unresolved identifier 'GGLContext'
This is the code that is copied from Google's page and put into AppDelegate.swift :
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
// Initialize Google sign-in
var configureError: NSError?
GGLContext.sharedInstance().configureWithError(&configureError) // THIS LINE HAS THE ERROR
assert(configureError == nil, "Error configuring Google services: \(configureError)")
//GIDSignIn.sharedInstance().delegate = self
GIDSignIn.sharedInstance().clientID = MY_CLIENT_ID
return true
}
Any help?
Upvotes: 9
Views: 4188
Reputation: 441
I faced the same problem as you then I decided to read the Google's Tutorial again, looking for the word "manually", and here's what they say:
Note: If you manually installed the SDK, you should instead configure the GIDSignIn object directly, using the client ID found in the GoogleService-Info.plist file:
GIDSignIn.sharedInstance().clientID = kClientID
So just comment the lines related to GGLContext and I think that should work for this problem.
Upvotes: 15