Google Sign-In quick migration guide

To migrate your app from a version of the Google Sign-In SDK prior to v6.0.0, make the following changes:

  • Update all [GIDSignIn sharedInstance] calls to GIDSignIn.sharedInstance property accesses.

  • Move all client configuration (client IDs, etc.) to a GIDConfiguration object.

  • Update calls to removed methods to their new equivalents:

    v5.x.x v6.0.0
    signIn signInWithConfiguration:presentingViewController:callback:
    restorePreviousSignIn restorePreviousSignInWithCallback:
    disconnect disconnectWithCallback:
    getTokensWithHandler: doWithFreshTokens:
    refreshTokensWithHandler: doWithFreshTokens:
  • Remove all references to the GIDSignInDelegate protocol and its methods.

    • Move the logic from signIn:didSignInForUser:withError: to the callback block of signInWithConfiguration:presentingViewController:callback:.

    • Move the logic from signIn:didDisconnectWithUser:withError: to the callback block of disconnectWithCallback:.

  • Manually connect GIDSignInButton to a method that calls signInWithConfiguration:presentingViewController:callback: using an IBAction or similar.