Ionic Native GooglePlus: unrecognized selector sent to instance

I just resolved this issue and hope it helps you as well. In Ionic’s documentation they have the example code:
this.googlePlus.login()
.then(res => console.log(res))
.catch(err => console.error(err));

However, as of version 3.4.4, this will cause the error mentioned above. In order to correctly call the login method on the GooglePlus provider you need to pass it the ‘options’ JSON even if it’s empty. In other words by simply replacing your login call from ‘this.googlePlus.login()’ to ‘this.googlePlus.login({})’ you should get past this error.

Please report back if this resolves your issue so that I, or Ionic developers, can address this issue by either fixing the docs or overloading the login method with a version that does not require a parameter.

Update: I submitted a pull request to the ionic-native documentation repo: https://github.com/driftyco/ionic-native/pull/1368

1 Like