Ionic Platform Beta Support

Ionic Platform Beta is out

I’d like to use it with my new Ionic2 app. Specifically for the Auth features.

I followed the instructions, but it seems to be geared for v1 not v2 apps.

  1. Ran through the getting started. Error:

ionic add ionic-platform-web-client
Bower component installed - ionic-platform-web-client
ERROR: Error: ENOENT: no such file or directory, open './www/js/app.js’
at Error (native)
Is your app declaration contained in ‘app.js’?

I continued. I setup Facebook and Google per the docs. Finally I tried to use the Ionic Auth and it failed

Ionic.Auth.login(‘facebook’, {‘remember’: true}).then(success, failure);

The iOS simulator web inspector console showed:

ORIGINAL EXCEPTION: ReferenceError: Can’t find variable: Ionic

So a few things

ionic add is just a wrapper for bower install, so since ionic2 doesn’t use bower (yay) we can just do

npm install ionic-platform-web-client

Currently the platform code isn’t setup to work with V2, so I’d hold off on trying to use Platform, at least until we test stuff out and can get any bugs fixed :+1:

Cool. Thanks for the response. I’m looking forward to testing the platform with V2.

Had the same issue. Was trying to follow the steps from

Any ETA?

Be careful with this. Trying to use it now made my system not work properly. It comments out the Cordova include and adds the ionic-platform. Additionally, I was not able to get the Ionic base object to work. The app could not find that module.

1 Like

@mhartington, so because the “platform code isn’t setup to work with V2” yet there’s no way I can use the platform services?

I want to use to add a Google login to my Ionic v2 app.

Correct. We will be going through the process of adding v2 support soon. Remember, v2 is still beta :grin:

1 Like

Thanks! So @mhartington what would be your opinion for an alternative way to implement a Google login on my Ionic V2 app? Code the Google login API manually? (Sorry the offtopic)

So as not to anger the admins I’ll tie this in with the post. Firebase has an auth system similar to Ionics (and vice versa). When they finally implement the platform web client it should be pretty easy to exchange the FirebaseAuth with Ionic.Auth. As they both just use the provider names explicitly in their calls. Hope that works as a possible alternative nunoarruda.

Platform support for v2 is supposed to be available on July 15,
and there are some changes in the Google Sign In service
which is causing problems with the cordova-plugin-googleplus :frowning:
so, hopefully we’ll have some new and working stuff to play in a month+