-
27 Jan 2012 6:06 PM #1
Answered: A white/blank screen when packaging Sencha Touch app in PhoneGap Build
Answered: A white/blank screen when packaging Sencha Touch app in PhoneGap Build
Just thought I share this to anyone who will have this same problem. since it took me two days to debug and figure this one out. If you happen to get a blank/white screen when you package your Sencha Touch app in PhoneGap build, it's because you're still using the secha-touch-all-debug.js library. Here's what I did to fix it,
was using secha-touch-all-debug.js
changed to sencha-touch-all.jsCode:<script type="text/javascript" src="lib/touch2/sencha-touch-all-debug.js">
Code:<script type="text/javascript" src="lib/touch2/sencha-touch-all.js">
======================================
Steps to using PhoneGap Build
1.) sign up at http://build.phonegap.com (its beta and currently free)
2.) compress/zip your secha touch app (make sure there's an index.html file in the root of the zip file)
3.) in the "apps" section of your build.phonegap.com account, upload this zip/archive file to phonegap.
4.) wait a couple of minutes for phonegap to compile your zip file. it will generate the ipa (iphone), apk (android) and other mobile app files for you.
5.) download the apk file that phonegap just build and copy it to your Android sim card.
6.) using a file manager system (i used Linda File Manager from the android market) to install my apk file.
7.) you should now be able to click on the new app and run your Sencha Touch app as if it's like a native app.
(again, if you get a white screen, see my fix above)
-
Best Answer Posted by anthoang
was using secha-touch-all-debug.js
changed to sencha-touch-all.jsCode:<script type="text/javascript" src="lib/touch2/sencha-touch-all-debug.js">
Code:<script type="text/javascript" src="lib/touch2/sencha-touch-all.js">
-
27 Jan 2012 6:14 PM #2
was using secha-touch-all-debug.js
changed to sencha-touch-all.jsCode:<script type="text/javascript" src="lib/touch2/sencha-touch-all-debug.js">
Code:<script type="text/javascript" src="lib/touch2/sencha-touch-all.js">
-
27 Jan 2012 9:35 PM #3
I'm going to sticky this for a while. Same thing keeps coming up again and again. Thanks!
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
28 Jan 2012 8:08 AM #4
Doesn't seem to fix the white screen issue for me
Doesn't seem to fix the white screen issue for me
Do you have an example of your index.html and app.js for properly launching a Sencha Touch 2.0 app using PhoneGap?
I'm using PR4 and PG 1.3.0 and trying to use the mvc app from http://www.sencha.com/forum/showthre...le-MVC-example as a starting point.
Regards,
Adam
-
28 Jan 2012 9:08 AM #5
Did you try placing phonegap.js before sencha-touch-all-debug.js? It does matter and solved my issue.
-
29 Jan 2012 5:53 PM #6
same problem
same problem
Also seeing same problem with suggestions above...PhoneGap 1.3 and latest Touch2. I'm building in latest xcode and running app within iOS simulator.
-
30 Jan 2012 8:53 AM #7
that mvc example not longer usable in PR4. you need to change some code in order to make it works. In order to make it work you need to include phonegap-1.3.0.js that come with the framework.
-
30 Jan 2012 12:27 PM #8
I've already included the phonegap javascript file. And phonegap loads just fine. The problem is that PR4 does not load...even with a basic helloworld example I get a blank white screen.
-
30 Jan 2012 3:36 PM #9Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
30 Jan 2012 3:46 PM #10
No, it doesn't load in the browser either.
I'm simplified the app to a simple index.html that includes the phonegap-1.3.js file and the basic sencha 2 files:
index.html
app.js is a simple alert() box from the launch() function as seen in the hello world examples. I've tried to reduce the app as much as possible to isolate the issue.Code:<script type="text/javascript" src="phonegap-1.3.0.js"></script> <link href="lib/touch/sencha-touch.css" rel="stylesheet" type="text/css" /> <!-- I've switched this file around as suggested above--> <script type="text/javascript" src="lib/touch/sencha-touch-all-debug.js"></script> <script type="text/javascript" src="app/app.js"></script>
Also, I've placed test code in the index.html file for the phonegap module and it loads just fine. So, if phonegap loads and sencha does not...seems to me the problem is sencha 2.


Reply With Quote