Software Archive
Read-only legacy content
17061 Discussions

Microsoft certification failure

Michel_K_
Beginner
1,612 Views

I was able to publish my app in the Google Play store and in the Apple App store. I had no mean to test it on a Windows 8 tablet ; I nevertheless built it for Windows 8 from the same sources and I tried to submit it for certification. Several times, even after I mentioned precisely that this app wasn't developed for Windows phones (as it had been  tested on a Trophy device) but for Windows 8 tablets, the review result was the same : non-compliant,  app not testable ; the app silently terminates at launch.

 

This is the last important remaining problem for my app ; it isn't seemingly due to the XDK but to Microsoft software. Did someone encounter the same issue ?.

0 Kudos
10 Replies
Pamela_H_Intel
Moderator
1,612 Views

Michel - I am going to send you a private message. ~Pamela

0 Kudos
Pamela_H_Intel
Moderator
1,612 Views

Michel,

It looks like you built with legacy builds. The legacy builds automatically include all of our core plugins in the emulator as well as in the build. That would be why it worked for iOS and Android. (BUT - the legacy builds are going away in December, so you won't be able to use them anymore.) In the non-Legacy builds those core plugins are included in the emulator and the test tab, but are not automatically included in the build. That gives you greater control of what actually goes in the build. There is no longer a legacy build for Windows so you have to add the plugins yourself for the Windows build to work - as you will have to do for iOS and Android soon anyway.

I have added plugins, but it looks like I am still missing at least one, so I don't yet have a working build. I will look at it more when I get a chance.

Pamela

0 Kudos
Pamela_H_Intel
Moderator
1,612 Views

Michel,

I've looked at your code and found an issue with localStorage.setItem(). Apparently, behavior of localStorage is inconsistent in IE, so it won't always work on Windows devices.

This forum post states that localStorage won't work at all in IE9: http://stackoverflow.com/questions/8706006/local-storage-in-ie9-fails-when-the-website-is-accessed-directly-from-the-file-s

The above post references this blog post that states that under the right conditions localStorage will work with IE9: http://www.wintellect.com/devcenter/jprosise/using-html5-web-storage-for-interprocess-communication

And this post explains how to test whether it will work.  https://social.msdn.microsoft.com/Forums/ie/en-US/4e0a939c-6397-4392-9807-1534ec653c10/localstorage-on-ie11-windows-81-does-not-behave-as-expected-data-is-not-saved-between-tabs

However, regarding the msdn post above, I am running IE11 and have "Enable DOM Storage" checked, and I get "undefined" when I test in the console. Also, running your index.html file in IE shows the error as "undefined or null reference" for localStorage.

So, it looks like you will want to use a different storage method. Of course in your code you can check the device and continue using localStorage for Android and iOS, and use some other storage method for Windows.

I hope that helps.

Pamela

0 Kudos
Michel_K_
Beginner
1,612 Views

Pamela,

I thank you for your information about the inconstancy or LocalStorage in IE, I didn't know. I will check whether it's the cause of the main  issue.

I summarize hereafter my last actions for debugging my app and make it evolve in conformity with Cordova plugins :
- I changed the initialization part, after having tested ans studied the Hello Cordova demonstration app : I included the init-dev.js and init-app.js after sone deletions and adaptations. The resulting app works fine on Androïd devices.

- This new version doesn't work on my Windows tablet, using the test tab and App Preview. So, I tried to run the Hello Cordova App. It didn't work but gave some information. Here are displayed texts, buttons beeing inactive :
Hello, Apache Cordova!
Must be in a browser... (in place of Cordova device ready detected! )
window.cordova IS present
No Device Ready Event Detected ( in place of Devide Ready Received!)
debug messages go here... (the app didn't go further).

My question is now : is there a general issue with Windows or is it specific to my tablet ? It's a small low cost device (mpman), I bought only for this debugging purpose.

- Concerning the display issue on the Andröïd tablet, as if Crosswalk weren't used, I can now say that It doesn't appear when the built app is running in this device, neither when the app is tested with the Test tab and App Preview. It occurs only when the app runs in debugging mode, through the Debug tab. 

I you need, I attach a zip file of the current project.

Thank you for your help.

Michel K.

0 Kudos
Pamela_H_Intel
Moderator
1,612 Views

Michel,

Regarding Windows - you have at least one 3rd party plugin - cordova-plugin-dialogs. Since the Test Tab build for Windows does not include 3rd party plugins, your app will fail in the Test Tab if you make calls to functions in that plugin. See https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview - the section just above the table (close to the top of the page) states which XDK features work with each OS.

For your Android question - are you saying that when you invoke the app is does nothing? Not even display your initial screen? Unless you are running in the Debug Tab?

Pamela

0 Kudos
Pamela_H_Intel
Moderator
1,612 Views

Amr,

It's a matter of taking the time and having the resources to move forward with more functionality, while also making sure we don't move so fast that we break things. If you were to develop in Android Studio for Android, in Xcode for iOS and in Visual Studio for Windows, you would need to do things in 3 different ways. We do these things for you behind the scenes so that everything looks seamless to you on your end. It's not perfect yet because there is a lot of work to do on our end.

In fact, it has been a recent addition to XDK's functionality to be able to use the Debug Tab with 3rd party plugins for Android. We're really excited about that. Last spring we all had to do an actual build to test any app with 3rd party plugins (like with Windows now). We just can't add everything simultaneously. But we are always improving.

Pamela

0 Kudos
Pamela_H_Intel
Moderator
1,612 Views

Michel,

I am moving the private message thread over to here since we are not discussing anything that you need to be kept private about your app. My responses are in an alternate color (the color fails to show when I post, so I will make it bold) below, inline with your questions:

- Remote calls : the user of the app is aware that a network connection is needed ; all data are stored in a remote server. Is there a standard way for checking that the connection is available ? There is the network connection plugin that can be used, but it’s not terribly sophisticated, so you might want to use a second check of some sort as a backup.

- Userid : the purpose of the call to https://l2.io/ip.js?var=userip is to get the IP address for tracing the  user's navigation. I didn't find another mean for reading the IP address as a identificator. If you are trying to uniquely identify a user over time, it might be better to use the window.device.uuid to get a unique ID per device, this is in the core Cordova device plugin.

- localStorage : you mentionned the inconsistency with Internet Explorer. I don't understand how IE is involved in running apps developed with the XDK. As long as you do not call any plugin APIs, you can run and debug your app in IE — when the app runs on a Windows device, it is running inside a webview that is based on IE, when it runs on iOS it runs in a webview based on Safari, and when it runs on Android it runs in a webview based on Chrome (if the device is Android 4.4 or higher, below 4.4 it runs on an ancient Android browser) — see this for more info: http://blogs.intel.com/evangelists/2014/09/02/html5-web-app-webview-app

- Device ready event : my current hypothesis about  the main issue  in the Windows context is  that,  both with XDK plugins and with Cordova plugins, this event isn't detected. Try adding init-dev.js from Hello Cordova as the very first script in index.html of your app and with a weinre connection console inspect the dev.isDeviceReady object members for false values or timing measurement numbers. Where you see a number next to an item, it signifies the number of milliseconds it took for that item to be triggered. If you see false then that item did not get triggered. In the console window you will see something like the following when you check that object:

Enter this as the query in the console --> dev.isDeviceReady
Object {a_startTime______: "409.058", b_fnDocumentReady: "412.429", c_cordova_ready__: "834.468", d_xdk_ready______: "809.984", e_fnDeviceReady__: "1068.239"…} <
a_startTime______: "409.058"
b_fnDocumentReady: "412.429"
c_cordova_ready__: "834.468"
d_xdk_ready______: "809.984"
e_fnDeviceReady__: "1068.239"
f_browser_ready__: "7413.987"  

- Cordova plugins : are these plugins considered as 3rd party plugins, making the app fail, although they are in the left-side plugins of the Projects tab. The Hello Cordova demonstration app, which uses several Cordova plugins,  works fine through the Test tab and App Preview on my Androïd tablet and not on my Windows tablet. What do you mean by the left-side plugins? Are you using an old version of the xdk? You should be using XDK v.2727 (2673 last week). The Test tab and App Preview will only work with the “Core Plugins” and the “Custom Intel XDK Plugins” — the other plugins on the plugin manager dialog will not work using the Test tab. Further, the "other plugins" will not work using the Debug tab on iOS or Windows devices. Because Hello Cordova has only core plugins, it will work using the Test tab and App Preview for all 3 device OS's. But this functionality has been augmented over time, so if you are using an old version, functionality may differ.

If this demo app should work  through the Test tab and App Preview, could you check whether it's the case in your Windows 8 environment ? I think you want me to test Hello Cordova in App Preview? I did just now. It works for me.

- Androïd display issue : I only wanted to inform you that there is no problem with the built app. However, I'am wondering why this issue appears when I run the app with the Debug tab. You mean the issue about portrait vs. landscape view?

- Installing apps in a Windows device : thank you for your information ; I will soon try again. 

I hope this helps. 

Pamela

0 Kudos
Michel_K_
Beginner
1,612 Views

After somme searches, I was able to install both apps, my app and HelloCordova, in my Windows 8 tablet :
- As I needed a mouse tu run PowerShell as administrator and a keyboard to enter long character chains, I control my tablet from my computer through Teamviewer.
- Some guidelines were missing in the Intel document : I needed to install a developer license and certificates of the apps.
The result is the following : the HelloCordova runs fine but the first screen of my app isn't displayed when the splashscreen disappears.
I can now focus my investigations, considering the localStorage problem but remarking that the the first screen is displayed in the real device when I use the Test tab and App Preview.

Having started my development with Appmobi XDK, I was thinking that all webviews were powered by Chrome independently from the operating system.

As stated in a previous post, I already included init-dev.js ans init-app.js in my project.
I just installed the 2727 upgrade of the XDK, as I install each new version as soon as it's available.

The sentence "left-side plugins of the Projects tab" was taken from an Intel document about plugin adding.

When I refer to the "Androïd display issue", it doesn't concern orientation but bad displays that suddenly appeared in last July ; this issue was solved with Crosswalk usage. It arose again recently when I test the app with the Debug tab. You can read more at this address : https://software.intel.com/en-us/forums/intel-xdk/topic/563246.

Best regards.
Michel K.

0 Kudos
Michel_K_
Beginner
1,612 Views

I followed your advice for using Weinre. The screen of the device became and remained blank (white), although the app was initialized.

I attach a screenshot of the console, showing following events :
the app started :  log "app.init.events() : entry" et 3 console.logs of the app (M, for Microsoft, height=722, offset=23).
- Cordova isn't ready.

However, my init function (InitAppli) is called by the script init-app.js.

0 Kudos
Michel_K_
Beginner
1,612 Views

Thank you Doctor Pamela ! Your diagnosis was right : the issue comes from localStorage instructions.

All messages telling that the device or Cordova wasn't ready were misleading. I have to go further by adapting my app for the Windows environment.

The emulator handles localSorage instructions as if they were supported, when a Microsoft device is chosen.

0 Kudos
Reply