Cannot find 'GIDConfiguration'

Viewed 529

I want to get the profile of the user when signing in via google. But it throws error of "Cannot find 'GIDConfiguration' in scope". It isn't available

let signInConfig = GIDConfiguration.init(clientID: "YOUR_IOS_CLIENT_ID")

GIDSignIn.sharedInstance.signIn(with: signInConfig, presenting: self) { user, error in
    guard error == nil else { return }
    guard let user = user else { return }
    let emailAddress = user.profile?.email
    let fullName = user.profile?.name
    let givenName = user.profile?.givenName
    let familyName = user.profile?.familyName
    let profilePicUrl = user.profile?.imageURL(withDimension: 320)
}
1 Answers

Make sure you include the following at beginning of your Swift file:

import Firebase
import GoogleSignIn
Related