Essentially you need to add below to the plist root.
<key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>com.googleusercontent.apps.your-app-id</string> </array> </dict> </array>
You can get your application ID from the RESERVED_CLIENT_ID entry in the GoogleService-Info.plist file.
Then you will need to implement the openURL application delegation method as follows:
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { return GIDSignIn.sharedInstance().handle(url, sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String, annotation: options[UIApplicationOpenURLOptionsKey.annotation]) }
See my answer here for more details.
source share