Hi i am applying social login scenario in my ionic app where i applied google sign option and it is working perfectly with android and when comming to the ios im getting the below error
the api key and bundle id everything are set and working perfect
1 Answers
Answers 1
You have to follow the below steps as configuration for google login through IOS
- Go to https://developers.google.com/mobile/add?platform=ios&cntapi=signin for IOS registration
- Enter IOS bundle Id from widget Id in config.xml of the project
- Enable Google sign In and generate configuration file
- Copy the reverse client Id from downloaded file
- Install the plugin with reverse client Id instead of webclient Id which we used for Android
- run
cordova plugin add cordova-plugin-googleplus --save --variable REVERSED_CLIENT_ID="myreversedclientid"
We can find the reverse client Id in Google developer console also credentials->iOS URL schema is the reverse client Id
Extract from Plugin documentation
To get your iOS REVERSED_CLIENT_ID, generate a configuration file here. This GoogleService-Info.plist file contains the REVERSED_CLIENT_ID you'll need during installation. This value is only needed for iOS.
The REVERSED_CLIENT_ID is also known as the "iOS URL Scheme" on the Developer's Console.
Login on iOS takes the user to a SafariViewController through the Google SDK, instead of the separate Safari browser.
IMPORTANT:
Please note that myreversedclientid is a place holder for the reversed clientId you find in your iOS configuration file. Do not surround this value with quotes. (iOS only Applications)
If you are building a hybrid application (iOS and Android), or an Android application, you have to replace myreversedclientid with the reverse value of Client ID in your Release credential generated on step 3, on Google Developer's Console, this will be: "com.googleusercontent.apps.uniqueId", without quotes.
0 comments:
Post a Comment