none
PhoneGap support is terrible RRS feed

  • Question

  • I hope I got someone's attention, because my other post did not get any reactions. 

    PhoneGap is supposedly supported by Azure through MobileServices. You even have a sample app in Azure Management. However, that example is as basic as it gets. A simple CRUD app. But ... not everyone needs to build a TODO list app. 

    My app requires user authentication. Azure MobileServices has a "login" method. Works fine on desktop (browser). But once I put it in my PhoneGap app, things go wrong. After sending my credentials I get a blank screen. 

    Is there ANYONE that actually managed to create a login through Azure in a PhoneGap app, or is Microsoft blowing smoke when they advertise Azure + PhoneGap?

    I lost 2 days thinking Azure would suit my needs. I lost an additional half day because the documentation/tutorials are out of date and the MobileService version I used from the tutorial did not yet support the Azure Active Directory login. 

    Wednesday, May 14, 2014 8:45 AM

All replies

  • Okay, completely by chance I managed to get something to work on Android. We are building via the CLI and it appears that the Azure login method requires the InAppBrowser plugin in order to function. Otherwise, it will open the login in the main window and your app will unload. I discovered this after using the PhoneGap app you can find in the app store, that remotely connects to your local developmentcomputer. I guess that app has the plugin already included. 

    Now I have a working login for Android. However, when I try to build/run the app with CLI for iOS it gives me: "Login is only supported from http:// and https:// URLs cordova azure". I've read that you need to include a reference to cordova.js, which is already the case. Do we need to make other arrangements in order to make this work on iOS?


    • Edited by Raspieman Wednesday, May 14, 2014 12:55 PM
    Wednesday, May 14, 2014 12:54 PM
  • In a PhoneGap app, you must also add the following plugins to the project:

    • phonegap plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
    • phonegap plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git

    This authentication tutorial does work for PhoneGap (I've verified it): http://azure.microsoft.com/en-us/documentation/articles/mobile-services-html-get-started-users/


    Please visit my blog

    This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, September 2, 2014 6:51 PM