Fernando
Posts: 0
Joined: Sat Mar 14, 2015 10:59 am

WIndowsAzure not defined: problem loading azure mobile apps client

Hello,
I have an jquery cordova app in appery. Now i have tried both importing azure mobile apps cordova plugin and creating the js file methods but i cannot initialize the client in my appery app.

https://www.npmjs.com/package/azure-m...
Plugin Id cordova-plugin-ms-azure-mobile-apps
Platform list windows8;windows;wp8;ios;android;browser
Version 2.0.2

In the start page i call to my clientLogin() method. This method is in a custom js file with the client definition:

var client = new WindowsAzure.MobileServiceClient("https://xx.azurewebsites.net");
function clientLogin(){
client.login('aad').then(function (data) {
alert("client = " + JSON.stringify(data));
if (data.userId) { alert(JSON.stringify(data.userId));}
},
function(error) { console.error(error); });
}

but i get this error in the console when launching the test:
ReferenceError: WindowsAzure is not defined

I also tried to initiate it on the DeviceReady method but i cannot get it working.

Please, any help will be welcome.
Thank you in advance!

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

WIndowsAzure not defined: problem loading azure mobile apps client

Hello Fernando,

The Cordova API is only available on the actual device, are you testing this on the device?

You can use Weinre debugger for the App running on the device, here you can find details how to get started: https://docs.appery.io/docs/weinre-de...

Fernando
Posts: 0
Joined: Sat Mar 14, 2015 10:59 am

WIndowsAzure not defined: problem loading azure mobile apps client

Hello Illya,
Sorry for the delay. I've tried it in the mobile and the plugin works but i get an http error. I've contacted with Microsoft (I got the same http error when using js file imported instead using the plugin).
Thank you and happy 2019.

Return to “Issues”