Touch应用程序在Windows

Touch应用程序在Windows

本文介绍了Sencha Touch应用程序在Windows Phone 8上崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用Sencha Touch开发了一个面向iOS和Android的应用。现在我想把这些应用程序到Windows Phone 8。

I have developed an app for iOs and Android with Sencha Touch. Now i want bring these app to Windows Phone 8.

我将框架迁移到2.2,一切正常。在Windows 8的互联网浏览器10的应用程序工作伟大。但是当我尝试使用浏览器在Windows Phone上打开应用程序时,应用程序在同一操作上崩溃。

I migrated the framework to 2.2 and all works fine. In the internet explorer 10 on Windows 8 the app works great. But when i try to open the app on the windows phone with the browser, the app crashes alway on the same action.

我使用卡布局并销毁最后一个视图手动,因为我做了这个程序更好的经验。

I used a card layout and destroy the last view manually, because i made better experiences with this procedure.

我绝望,因为我不知道在哪里可以解决它。很遗憾,Chrome中没有开发者控制台。从我的manully bugfixing我知道JavaScript代码工作,直到和被调用的函数。

I'm reale desperate, because i don't know where i can fix it. Unfortunately, there is no developer console like in chrome. From my manully bugfixing i know that the javascript code works till the and of the called function.

我也尝试应用程序作为构建与PhoneGap,并有相同的问题。

I also try the app as build with PhoneGap and there are the same problems.

有没有任何机构知道,如果在卡布局和Windows Phone 8中的Ext.Js容器有一些问题?

Does any body know, if there are some problems with a Ext.Js container in card layout and windows phone 8?

另外,任何机构是否知道一个好的方法来检查Windows Phone 8上的HTML / CSS / Javascript代码?

And additional, does any body know a good way to check HTML/CSS/Javascript Code on the Windows Phone 8? Maybe on the same way like on the iPad.

推荐答案

我成功地在windows phone 8上部署了sencha touch应用程序以下链接中的步骤:

I managed to successfully deploy an sencha touch application on windows phone 8 following the steps in the following link:

在安装Git后,使用以下命令添加了所需的插件,并将其设置为可从Windows的命令提示符:

I added the plugins I needed using the following command after installing Git and set it to be available from the command prompt of windows:

cordova plugin add <URL_GIT_REPO>

而不是使用包文件,我使用命令:

Instead of using the package files, I used the command:

sencha app build native

使用在路径 SenchaTouchAppFolder / build / native / AppName

and I used the app.js and app.json files generated that were created in the path SenchaTouchAppFolder/build/native/AppName

也执行了以下操作:我必须获得开发者帐户,并在安装 visual studio 2012 express windows phone SDK 8 。

also did the following: I had to get a developer account, and checked the device after installing visual studio 2012 express and windows phone SDK 8.

调试模式下在设备上部署应用程序时,您可以在输出窗口Visual Studio。

When deploying the application on the device in Debug mode, you can view exception messages in the output window of Visual Studio.

首先请确保该项目包含 app.json 文件。例如,要在输出窗口中构建解决方案,应显示以下消息:

First make sure that the project includes the app.json file. For example to build the solution in the output window should display the following message:

1> Adding www\app.json

csproj 文件中应包含以下元素:

In the csproj file should include the following elements:

<Content Include = "www\app.json" />
<Content Include = "www\resources\sample\data.json" />

我还修改了以下代码行,以便从我的本地存储在 cordovalib / XHRHelper.cs 文件中。

I also modified the following lines of code to add support for JSON responses needed in the model from my local storage in cordovalib/XHRHelper.cs file.

 var funk = function () {
                        window.__onXHRLocalCallback = function (responseCode, responseText) {
                            alias.status = responseCode;
                            if (responseCode == '200') {
                                alias.responseText = responseText;
                                try {
                                    JSON.parse(responseText);
                                } catch (e) {
                                    Object.defineProperty(alias, 'responseXML', {
                                        get: function () {
                                            return new DOMParser().parseFromString(this.responseText, 'text/xml');
                                        }
                                    });
                                }
                                Object.defineProperty(alias, 'responseJSON', {
                                    get: function () {
                                        return new DOMParser().parseFromString(this.responseText, 'text/json');
                                    }
                                });

                            }else {
                                alias.onerror && alias.onerror(responseCode);
                            }

一个有用的工具来调试css错误是仿真工具internet explorer 11



A useful tool to debug css errors is the emulation tool internet explorer 11

F12 > Emulation > Explorer Profile > Windows Phone

此工具也可能有用:远程HTML5调试

This tool can also be useful: Remote HTML5 debugging on Windows Phone with weinre

这篇关于Sencha Touch应用程序在Windows Phone 8上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 00:03