Read complete story

Integrate application with Google Account signIn in IOS.

Google SignIn

1: There are two ways to Integrate the Application with google sign in.  (Using cocoa pod and manual);

2: Here I am mentioning manual way.

3: Download the Google SDK from  that site. (https://developers.google.com/identity/sign-in/ios/sdk/)

4: Extract the SDK archive you downloaded and copy the following files to your Xcode project:

    • GoogleSignIn.framework
    • GoogleSignIn.bundle
  1. Add GoogleSignIn.bundle to your Xcode project’s Copy Bundle Resources build phase.

5: Link the dependent framework in Xcode.

6: set other linker flags in build setting

7: Get the Configuration file by clicking that URL : (https://developers.google.com/mobile/)

8: Enter App name and bundle Id  so it will create .plist file so you have to drag into your xcode as root.

9: add the following Data :

Also, you will need to set the client ID directly using the value found in the GoogleService-Info.plist file:

10 : Do some changes in App delegate file  :

 

here kClientId is client id of generated configuration .plist file.

11: Now to draw the google sign in button so here  I am taking a view controller  to display all that things.

a: viewcontroller.m class

 

 

12: Now, at last, you have to change your own project info.plist file.

In the Project > Target > Info > URL Types panel, create a new item and paste yours REVERSED_CLIENT_ID into the URL Schemes field. You can find yours REVERSED_CLIENT_ID in the GoogleService-Info.plist file.

13: Now Run.

14: You can also download sample apps go to  https://github.com/googlesamples/google-services/tree/master/ios/signin/SignInExample .

 

 

 

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close