
Originally Posted by
koala2012
Once you have update the index.html and how do you package your code to native? used sencha CMD to generate native app?
actually I have used your solution to use sencha CMD generate native code successfully, the native app can run on andriod 4.0.3 simulator.but Can NOT run on 4.03 real device. it's white screen as well. how do you think that?
Hi @koala2012,
for Android my recipe is:
1. Use mhousser's file "sencha-touch-all.js" and riyaad "index.html" indications.
2. My "app.json" looks like
Code:
...
"js": [
{
//"path": "touch/sencha-touch.js"
"path": "touch/sencha-touch-all.js"
},
{
"path": "app.js",
"bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */
//"update": "delta"
"update": "full"
}
...
],
3. execute "sencha app build production"
4. then copy the files from "build/APP_NAME/production/*" to my "PHONEGAP_PROJEC/android/assets/www/"
5. cd "PHONEGAP_PROJECT/android/"
6. execute "ant release"
7. cd "PHONEGAP_PROJECT/android/bin"
8. jarsigner -verbose -keystore PATH_TO_KEY_STORE -signedjar APP_NAME.apk "APP_NAME-unsigned.apk" KEY_STORE
9. zipalign -v 4 APP_NAME.apk APP_NAME-aligned.apk
10. open andriod 4.0.3 simulator
11. adb install -r APP_NAME_aligned.apk ( now white screen was removed and app is OK in sumulator )
12. Install the app to my GT-I9100 with Android 4.0.3 ( now white screen was removed and app is OK in real device)
To build for Apple Store just:
1. Open with Xcode the phonegap project, just "add files to project" and load folder "build/APP_NAME/production", rename the folder from "production" to "www"
2. Execute run, the iphone simulator is opened, now white screen was removed and app is OK.
Hope this helps