Unable to execute google + sign in ios using ionic 2

Hi, I am using a social login script in my ionic application where I applied google sign parameter and it works fine with android and when it goes to ios im getting the following error

api key and package id are all installed and working perfectly

ios google plus error

+5
source share
1 answer

You must follow these steps as a configuration to login to google via iOS

  • Go to https://developers.google.com/mobile/add?platform=ios&cntapi=signin to register IOS
  • Enter the IOS package identifier from the widget identifier in the config.xml file of the project
  • Enable Google Login and Create Configuration File
  • Copy reverse client id from downloaded file
  • Install the plugin with a reverse client id instead of the webclient id we used for Android
  • run cordova plugin add cordova-plugin-googleplus --save --variable REVERSED_CLIENT_ID="myreversedclientid" We can find the return client identifier in the Google developer console, and the credentials β†’ iOS URL scheme is the return client identifier

Extract from plugin documentation

To get iOS REVERSED_CLIENT_ID, generate a configuration file here . This GoogleService-Info.plist file contains the REVERSED_CLIENT_ID, which you will need during installation. This value is for iOS only.

REVERSED_CLIENT_ID is also known as the "iOS URL Schema" on the Developer Console.

Logging in to iOS takes the user to the SafariViewController via the Google SDK, not a separate Safari browser.

IMPORTANT:

  • Please note that myreversedclientid is the owner of the location for the reverse clientId you will find in your iOS configuration file. Do not surround this value with quotation marks. (iOS apps only)

  • If you are creating a hybrid application (iOS and Android) or an Android application, you must replace myreversedclientid with the return value of the client ID in your release credentials generated in step 3 in the Google Developer Console, it will be: "com.googleusercontent.apps. uniqueId "without quotes.

+2
source

Source: https://habr.com/ru/post/1273229/


All Articles