New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift 3: ViewController does not conform to protocol GIDSignInDelegate #267
Comments
That's an odd one! Looks like the type of Error is getting inferred wrong - I see UIViewController.Error which is odd, as it should be an NSError. You might be able to force it - try declaring the protocol as Swift.Error (or maybe GoogleSignIn.Error). |
But will there ever be an updated example for swift 3? |
I am getting same error |
Guess this issue is dead XD |
I'm getting the same error. Has anyone managed to solve it? |
Try check the documentation again. It seems to be updated. |
I checked the documentation, but I'm still facing the same error. The documentation says to use: My environment: UPDATE |
@evelynklasse You just saved my day with that UPDATE, thanks! |
Looks like @evelynklassen solved this a while ago and we forgot to close it. |
I found the error. I had a model with the name "Error", it was probably conflicting with GoogleSignIn. I had remove Error class and it's working. |
Describe your environment
Swift 3.0
Xcode 8
GoogleSignIn 4.0.0
Describe the problem:
Xcode keeps telling me my view controller does not conform to protocol, when I literally copy and paste the required function into my view controller. It's saying that I'm missing the method that I clearly have in my view controller (double checked method name, parameter types, etc.)
Steps to reproduce:
public func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {}
or
func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {}
Observed Results:
Expected Results:
My app to build successfully because I followed the protocol.
The text was updated successfully, but these errors were encountered: