title: Nativescript google sign in (ios)
body: <p>In my nativescript-angular application I am trying to implemet sign in with google and the nativescript-social-login plugin. Trying to use the loginWithGoogle function exits the application (does not throw any error however)</p>
  
  <p>Bellow you can see my code</p>
  
  <p><strong>info.plist</strong></p>
  
  <pre><code>&lt;key&gt;CFBundleURLTypes&lt;/key&gt;
  &lt;array&gt;
      &lt;!-- GOOGLE START --&gt;
      &lt;dict&gt;
          &lt;key&gt;CFBundleTypeRole&lt;/key&gt;
          &lt;string&gt;Editor&lt;/string&gt;
          &lt;key&gt;CFBundleURLSchemes&lt;/key&gt;
          &lt;array&gt;
              &lt;string&gt;com.googleusercontent.apps.xxxxxxx&lt;/string&gt;
          &lt;/array&gt;
      &lt;/dict&gt;
      &lt;!-- GOOGLE END --&gt;
  &lt;/array&gt;
  </code></pre>
  
  <p><strong>main.ts</strong></p>
  
  <pre><code>class MyDelegate extends UIResponder implements UIApplicationDelegate {
  static ObjCProtocols = [UIApplicationDelegate];
  
  applicationDidFinishLaunchingWithOptions(application: UIApplication, launchOptions: any): boolean {
  let gglDelegate = false;
  
  try {
    const errorRef = new interop.Reference();
    GGLContext.sharedInstance().configureWithError(errorRef);
  
    const signIn = GIDSignIn.sharedInstance();
    gglDelegate = true;
  } catch (error) {
    console.log(error);
  }
  
  return gglDelegate;
  }
  
  applicationOpenURLSourceApplicationAnnotation(application, url, sourceApplication, annotation) {
  const gglDelegate = GIDSignIn.sharedInstance().handleURLSourceApplicationAnnotation(url, sourceApplication, annotation);
  
  return gglDelegate;
     }
  }
  application.ios.delegate = MyDelegate;
  const google = {
  initialize: true,
  serverClientId: "xxxx.apps.googleusercontent.com", //this is from the ios id in my google console
  isRequestAuthCode: true
   };
  let result = SocialLogin.init({google});
   SocialLogin.addLogger((msg: any, tag: string) =&gt; {
      console.log(`[nativescript-social-login]: (+ ${tag} +): + ${msg}`);
   });
  </code></pre>
  
  <p><strong>login.component.ts</strong></p>
  
  <pre><code>googleLogin() {
  try {
    SocialLogin.loginWithGoogle((result) =&gt; {
            this.ngZone.run(() =&gt; {
                console.log("code: " + result.code);
                console.log("error: " + result.error);
                console.log("userToken: " + result.userToken);
                console.log("displayName: " + result.displayName);
                console.log("photo: " + result.photo);
                console.log("authToken: " + result.authToken);
            });
        });
  } catch (e) {
    console.error(`[Error]: ${e}`);
    }
  }
  </code></pre>
  
  <p>When i log the result from the .init function i get </p>
  
  <pre><code>CONSOLE LOG file:///app/main.js:49:12: {"facebook":{"isInitialized":true},"google":{"isInitialized":true},"twitter":{}}
  </code></pre>
  
  <p>Not quite sure where to go next... </p>
  
  <p>Thank you in advance for any ideas.</p>