Failed to create remote object proxy, after trying to sign in with Google sign in ios












0















I am not getting google sign in page after pressing my sign button.



I am getting this error:




Failed to create remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}




I have used this code in button action to open google sign in.
Please suggest me to move further. Thanks in advance.



import UIKit
import Google
import GoogleSignIn
import GGLSignIn

class LoginCell: UITableViewCell, UITextFieldDelegate, GIDSignInUIDelegate, GIDSignInDelegate {

func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
if (error == nil) {
// Perform any operations on signed in user here.
let userId = user.userID // For client-side use only!
print("User id is (userId)")

let idToken = user.authentication.idToken // Safe to send to the server
print("Authentication idToken is (idToken)")
let fullName = user.profile.name
print("User full name is (fullName)")
let givenName = user.profile.givenName
print("User given profile name is (givenName)")
let familyName = user.profile.familyName
print("User family name is (familyName)")
let email = user.profile.email
print("User email address is (email)")
// ...
} else {
print("ERROR ::(error.localizedDescription)")
}
}

// Finished disconnecting |user| from the app successfully if |error| is |nil|.
public func sign(_ signIn: GIDSignIn!, didDisconnectWith user: GIDGoogleUser!, withError error: Error!)
{

}

func sign(inWillDispatch signIn: GIDSignIn!, error: Error!) {

guard error == nil else {

print("Error while trying to redirect : (String(describing: error))")
return
}
print("Successful Redirection")
}

func sign(_ signIn: GIDSignIn!, dismiss viewController: UIViewController!) {
print("dismissing Google SignIn")
}

func sign(_ signIn: GIDSignIn!, present viewController: UIViewController!) {
print("presenting Google SignIn")
}

@IBOutlet weak var signInButton: UIButton!
//MARK: - Delegate

weak var delegate: CustomDelegate?

//Appdelegate
static func shared() -> AppDelegate {
return UIApplication.shared.delegate as! AppDelegate
}

//MARK: - UIVIEW CONTROLLER LIFE CYCLE
override func awakeFromNib() {
super.awakeFromNib()
//MARK: - Google

GIDSignIn.sharedInstance()?.uiDelegate = self
GIDSignIn.sharedInstance().delegate = self
}

override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}

func configureCell(indexPath: IndexPath) {

}

// //MARK: - Google Signin Delegate
//

//MARK: - Button Actions

@IBAction func doPressGoogleSign(in sender: Any) {
//Check social network type

GIDSignIn.sharedInstance().signOut() //Need to check

AppDelegate.shared().loginType = kGooglePlus

//Show Progress Bar once connection is initiated
//MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
//hud.labelText = @"Loading";

let googleButton = GIDSignInButton()
GIDSignIn.sharedInstance().shouldFetchBasicProfile = true
googleButton.sendActions(for: .touchUpInside)
}
}









share|improve this question





























    0















    I am not getting google sign in page after pressing my sign button.



    I am getting this error:




    Failed to create remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}




    I have used this code in button action to open google sign in.
    Please suggest me to move further. Thanks in advance.



    import UIKit
    import Google
    import GoogleSignIn
    import GGLSignIn

    class LoginCell: UITableViewCell, UITextFieldDelegate, GIDSignInUIDelegate, GIDSignInDelegate {

    func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
    if (error == nil) {
    // Perform any operations on signed in user here.
    let userId = user.userID // For client-side use only!
    print("User id is (userId)")

    let idToken = user.authentication.idToken // Safe to send to the server
    print("Authentication idToken is (idToken)")
    let fullName = user.profile.name
    print("User full name is (fullName)")
    let givenName = user.profile.givenName
    print("User given profile name is (givenName)")
    let familyName = user.profile.familyName
    print("User family name is (familyName)")
    let email = user.profile.email
    print("User email address is (email)")
    // ...
    } else {
    print("ERROR ::(error.localizedDescription)")
    }
    }

    // Finished disconnecting |user| from the app successfully if |error| is |nil|.
    public func sign(_ signIn: GIDSignIn!, didDisconnectWith user: GIDGoogleUser!, withError error: Error!)
    {

    }

    func sign(inWillDispatch signIn: GIDSignIn!, error: Error!) {

    guard error == nil else {

    print("Error while trying to redirect : (String(describing: error))")
    return
    }
    print("Successful Redirection")
    }

    func sign(_ signIn: GIDSignIn!, dismiss viewController: UIViewController!) {
    print("dismissing Google SignIn")
    }

    func sign(_ signIn: GIDSignIn!, present viewController: UIViewController!) {
    print("presenting Google SignIn")
    }

    @IBOutlet weak var signInButton: UIButton!
    //MARK: - Delegate

    weak var delegate: CustomDelegate?

    //Appdelegate
    static func shared() -> AppDelegate {
    return UIApplication.shared.delegate as! AppDelegate
    }

    //MARK: - UIVIEW CONTROLLER LIFE CYCLE
    override func awakeFromNib() {
    super.awakeFromNib()
    //MARK: - Google

    GIDSignIn.sharedInstance()?.uiDelegate = self
    GIDSignIn.sharedInstance().delegate = self
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
    super.setSelected(selected, animated: animated)
    // Configure the view for the selected state
    }

    func configureCell(indexPath: IndexPath) {

    }

    // //MARK: - Google Signin Delegate
    //

    //MARK: - Button Actions

    @IBAction func doPressGoogleSign(in sender: Any) {
    //Check social network type

    GIDSignIn.sharedInstance().signOut() //Need to check

    AppDelegate.shared().loginType = kGooglePlus

    //Show Progress Bar once connection is initiated
    //MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    //hud.labelText = @"Loading";

    let googleButton = GIDSignInButton()
    GIDSignIn.sharedInstance().shouldFetchBasicProfile = true
    googleButton.sendActions(for: .touchUpInside)
    }
    }









    share|improve this question



























      0












      0








      0


      1






      I am not getting google sign in page after pressing my sign button.



      I am getting this error:




      Failed to create remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}




      I have used this code in button action to open google sign in.
      Please suggest me to move further. Thanks in advance.



      import UIKit
      import Google
      import GoogleSignIn
      import GGLSignIn

      class LoginCell: UITableViewCell, UITextFieldDelegate, GIDSignInUIDelegate, GIDSignInDelegate {

      func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
      if (error == nil) {
      // Perform any operations on signed in user here.
      let userId = user.userID // For client-side use only!
      print("User id is (userId)")

      let idToken = user.authentication.idToken // Safe to send to the server
      print("Authentication idToken is (idToken)")
      let fullName = user.profile.name
      print("User full name is (fullName)")
      let givenName = user.profile.givenName
      print("User given profile name is (givenName)")
      let familyName = user.profile.familyName
      print("User family name is (familyName)")
      let email = user.profile.email
      print("User email address is (email)")
      // ...
      } else {
      print("ERROR ::(error.localizedDescription)")
      }
      }

      // Finished disconnecting |user| from the app successfully if |error| is |nil|.
      public func sign(_ signIn: GIDSignIn!, didDisconnectWith user: GIDGoogleUser!, withError error: Error!)
      {

      }

      func sign(inWillDispatch signIn: GIDSignIn!, error: Error!) {

      guard error == nil else {

      print("Error while trying to redirect : (String(describing: error))")
      return
      }
      print("Successful Redirection")
      }

      func sign(_ signIn: GIDSignIn!, dismiss viewController: UIViewController!) {
      print("dismissing Google SignIn")
      }

      func sign(_ signIn: GIDSignIn!, present viewController: UIViewController!) {
      print("presenting Google SignIn")
      }

      @IBOutlet weak var signInButton: UIButton!
      //MARK: - Delegate

      weak var delegate: CustomDelegate?

      //Appdelegate
      static func shared() -> AppDelegate {
      return UIApplication.shared.delegate as! AppDelegate
      }

      //MARK: - UIVIEW CONTROLLER LIFE CYCLE
      override func awakeFromNib() {
      super.awakeFromNib()
      //MARK: - Google

      GIDSignIn.sharedInstance()?.uiDelegate = self
      GIDSignIn.sharedInstance().delegate = self
      }

      override func setSelected(_ selected: Bool, animated: Bool) {
      super.setSelected(selected, animated: animated)
      // Configure the view for the selected state
      }

      func configureCell(indexPath: IndexPath) {

      }

      // //MARK: - Google Signin Delegate
      //

      //MARK: - Button Actions

      @IBAction func doPressGoogleSign(in sender: Any) {
      //Check social network type

      GIDSignIn.sharedInstance().signOut() //Need to check

      AppDelegate.shared().loginType = kGooglePlus

      //Show Progress Bar once connection is initiated
      //MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
      //hud.labelText = @"Loading";

      let googleButton = GIDSignInButton()
      GIDSignIn.sharedInstance().shouldFetchBasicProfile = true
      googleButton.sendActions(for: .touchUpInside)
      }
      }









      share|improve this question
















      I am not getting google sign in page after pressing my sign button.



      I am getting this error:




      Failed to create remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}




      I have used this code in button action to open google sign in.
      Please suggest me to move further. Thanks in advance.



      import UIKit
      import Google
      import GoogleSignIn
      import GGLSignIn

      class LoginCell: UITableViewCell, UITextFieldDelegate, GIDSignInUIDelegate, GIDSignInDelegate {

      func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
      if (error == nil) {
      // Perform any operations on signed in user here.
      let userId = user.userID // For client-side use only!
      print("User id is (userId)")

      let idToken = user.authentication.idToken // Safe to send to the server
      print("Authentication idToken is (idToken)")
      let fullName = user.profile.name
      print("User full name is (fullName)")
      let givenName = user.profile.givenName
      print("User given profile name is (givenName)")
      let familyName = user.profile.familyName
      print("User family name is (familyName)")
      let email = user.profile.email
      print("User email address is (email)")
      // ...
      } else {
      print("ERROR ::(error.localizedDescription)")
      }
      }

      // Finished disconnecting |user| from the app successfully if |error| is |nil|.
      public func sign(_ signIn: GIDSignIn!, didDisconnectWith user: GIDGoogleUser!, withError error: Error!)
      {

      }

      func sign(inWillDispatch signIn: GIDSignIn!, error: Error!) {

      guard error == nil else {

      print("Error while trying to redirect : (String(describing: error))")
      return
      }
      print("Successful Redirection")
      }

      func sign(_ signIn: GIDSignIn!, dismiss viewController: UIViewController!) {
      print("dismissing Google SignIn")
      }

      func sign(_ signIn: GIDSignIn!, present viewController: UIViewController!) {
      print("presenting Google SignIn")
      }

      @IBOutlet weak var signInButton: UIButton!
      //MARK: - Delegate

      weak var delegate: CustomDelegate?

      //Appdelegate
      static func shared() -> AppDelegate {
      return UIApplication.shared.delegate as! AppDelegate
      }

      //MARK: - UIVIEW CONTROLLER LIFE CYCLE
      override func awakeFromNib() {
      super.awakeFromNib()
      //MARK: - Google

      GIDSignIn.sharedInstance()?.uiDelegate = self
      GIDSignIn.sharedInstance().delegate = self
      }

      override func setSelected(_ selected: Bool, animated: Bool) {
      super.setSelected(selected, animated: animated)
      // Configure the view for the selected state
      }

      func configureCell(indexPath: IndexPath) {

      }

      // //MARK: - Google Signin Delegate
      //

      //MARK: - Button Actions

      @IBAction func doPressGoogleSign(in sender: Any) {
      //Check social network type

      GIDSignIn.sharedInstance().signOut() //Need to check

      AppDelegate.shared().loginType = kGooglePlus

      //Show Progress Bar once connection is initiated
      //MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
      //hud.labelText = @"Loading";

      let googleButton = GIDSignInButton()
      GIDSignIn.sharedInstance().shouldFetchBasicProfile = true
      googleButton.sendActions(for: .touchUpInside)
      }
      }






      ios swift google-signin






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 26 '18 at 15:48









      rmaddy

      245k27324388




      245k27324388










      asked Nov 26 '18 at 7:49









      blackstormblackstorm

      278




      278
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53476691%2ffailed-to-create-remote-object-proxy-after-trying-to-sign-in-with-google-sign-i%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53476691%2ffailed-to-create-remote-object-proxy-after-trying-to-sign-in-with-google-sign-i%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Create new schema in PostgreSQL using DBeaver

          Deepest pit of an array with Javascript: test on Codility

          Costa Masnaga