Does Ionic View support Cordova/InAppBrowser?


#1

I’m using firebase and testing their OAuth library to authenticate with Facebook. This is supposed to launch Facebook’s login page in a pop-up. This works great on a desktop, but when I try with Ionic View the Facebook page does load, but upon authentication does not redirect back to my Ionic app. I believe this is because the page was not loaded as a pop-up, and I believe the “InAppBrowser” browser did not get invoked correctly.

That made me think perhaps Ionic View doesn’t allow access to Cordova?

I have the appropriate tag in my header.

As a test, I’m checking my controller if window.cordova is defined. It appears to be null/undefined.

As another test, I tried launching a website just to see if the InAppBrowser was working by doing this:
window.open(‘https://www.google.com’, ‘_blank’);

This does launch the page, but doesn’t display “popup frame with an option to close” as noted in the below troubleshooting tips: https://github.com/firebase/firebase-login-demo-phonegap/issues/5

So my conclusion is that Ionic View isn’t loading Cordova. Is that correct? Is that a feature request/bug/or am I doing something wrong?

Thanks!


Issue with cordova-plugin-inappbrowser in iOS on Ionic View
#2

You can see here http://docs.ionic.io/tools/viewapp/ that the InAppBrowser plugin is not currently supported on Ionic View. It might be added in the future, but your best bet is to build the app directly to a device or emulator instead. Ionic View has some limitations due to security and policies for iOS and Android that prevent it from running the app exactly the same as if you load your app directly to a device.


#3

Thanks for the quick reply! I’m off to trying the Android emulator. But I LOVE ionic view, what a great app!


#4

It is a great app. You might also consider Genymotion https://www.genymotion.com in place of the default Android emulators. It is just a bit more functional and allows debugging in Chrome. While it looks like an emulator, it actually simulates a real device so you have to deploy your project using ionic run android instead of ionic emulate android.


#5

Thanks for the tip. I’ve quickly realized how slow the Google version is, trying out genymotion now. Another +1 for Ionic View :slight_smile:


#6

I experienced similar issues, and therefor can’t use ionic view. Does anyone know of a substitute to ionic view to run cordova apps on iOS?

I have a beta testing group, and ionic view seemed to be the best way to deliver the app.


#7

For my testing, I’m now using Apple’s TestFlight App. It’s a pretty simple process. I’m also still using Ionic View, but just not for the features that need InAppBrowser.


#8

@njcaruso Did you find any type of workaround for this? I’ve been trying to use OAuth through Azures api and ngCordova’s OAuth and I think both use the InAppBrowser. I’m stuck b/c I can’t really have users test without the authentication.


#9

I have to agree here, I think having inappbrowser work with Ionic View is crucial. Most apps use social media authentication, so this issue probably affects over 50% of ionic developers that are out there trying to test their app with real users.


#10

I wonder if it’s a matter of what the platforms allow to be accessed. I’m sure Ionic would love to add support for it, but if you look at it from the platforms perspective (iOS, Android, etc.), you could basically run entire apps within apps like ionic view and completely bypass their entire process if everything is open.


#11

Eh, my equally haphazard guess is that it’s closer to an “Inception” (note the capital “I”) issue rather than some sort of blocking by the platform (iOS, Android, etc) itself. Apparently the team just needs the kick…


#12

Hello everyone. Are there any updates on this?


#13

Hola quisiera tener más información al respecto o alguna solución alternativa. Estamos desarrollando para un cliente en Chile y también tengo este problema con InAppBrowser en ionic view en ios.
gracias


#14

Updated link about supported plugins: http://docs.ionic.io/docs/view-usage

I am not getting $authWithOAuthRedirect to work in Ionic View either. It responds TRANSPORT_UNAVAILABLE in the Ionic View app.