Google sign in was working fine with Xcode 7. After updating to Xcode 8, I started getting the error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'You must specify |clientID| for |GIDSignIn|'
. I have a GoogleService-Info.plist file with my CLIENT_ID.
I was able to fix it by adding the following line:
GIDSignIn.sharedInstance().clientID = "<CLIENT_ID>"
It seems the CLIENT_ID isn't being fetched from GoogleService-Info.plist. I've made sure it's in the Copy Bundle Resources.
I shouldn't have to specify the client id in the code. How can I fix it to get the information from the GoogleService-Info.plist file?
You can do it this way.
Swift:
GIDSignIn.sharedInstance().clientID = FirebaseApp.app()?.options.clientID
Objective-C:
GIDSignIn.sharedInstance.clientID = FIRApp.defaultApp.options.clientID;