I recently developed a sencha touch based app for an upcoming festival and all is working wonderfully on my iphone and android app when launching from a browser. Now I am ready to deploy as an app on the iPhone and could use some guidance. I have the latest install of Xcode 4 and SDK running on my mac. I went to https://build.phonegap.com/generate the PhoneGap project. After doing this I'm not sure what I need to do next.
1. Where do I place all of my files that run my sencha app?
2. I see in the generated project from PhoneGap an index.html file exists. Do I keep this file or merge with my Sencha index.html?
3. Are there any settings that have to be set in xcode4 to find my files? Not knowing what to do I tried copying all of my sencha files to the www folder, opening the phonegap created name.xcodeproj in xcode4 and ran in iphone simulator. The simulator fired up a default.png screen but nothing else happened. Obviously I'm missing something I'm just not sure where to place the files.
4. I see in the PhoneGap generated index.html the following code exists:
<script src="phonegap.0.9.5.min.js"></script>
<script>
document.addEventListener('deviceready', function () {
// add your PhoneGap-dependent functionality here!
}, false);
</script>
Do I need to create the phonegap js file or is this automatically generated and connected somehow?
5. Previously in my Sencha index.html all of my .js file references were in between <head> </head>. For the phonegap created index.html do my .js file references need to be placed elsewhere or still in between the <head> </head>?
Thank you for any input! Maybe this will help someone else moving from Sencha to PhoneGap as well.
The link posted above should get you on the right track. If you didn't know already, Xcode 4 and PhoneGap don't quite get along yet so you need to run a Terminal command to setup PhoneGap with Xcode 4.
You will have one index.html in the end, with both the Sencha code and the PhoneGap code. They play nicely.
I realize I am replying so long after the original post as to be no help whatsoever but I recently added a step-by-step blog post on how to get sencha touch 2 + PhoneGap + Xcode 4 to live in harmony.