5 Oct 2012 1:25 PM #1
Packaging Cordova 2.0.0 and ST2 for iOS
I have an iOS app that I built by creating a Cordova 2.0.0 XCode project according to the instructions provided by Cordova, and then dragging my raw ST2 .js files (not the output of a build) into the Cordova project's www directory. This app uses the Cordova filesystem API, and it appears to work both in the iPad simulator and on an actual iPad.
That's all well and good, but the process I followed doesn't really seem like the "right" way to package an ST2 app. So I read Robert Dougan's post and attempted to tweak the instructions to work with Cordova 2.0.0. I did manage to get the generated Sencha app built in XCode and running in the simulator that way, but as soon as I replaced the generated code with my own, I ran into a problem. Any attempts to run sencha app build package after that produce an error message sayingCode:
ReferenceError: Can't find variable LocalFileSystem
Is there anything wrong with the way I originally got my app working? If so, are there any tutorials or instructions available that would show me the right way to integrate ST2 and Cordova 2.0.0?
9 Oct 2012 7:12 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
This is because LocalFileSystem doesn't exist in Sencha Command. How are you using it?
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
9 Oct 2012 7:59 AM #3
I'm using the PhoneGap file system and file transfer APIs to download PDF files from a server and store them locally on the mobile device for offline use.
29 Nov 2012 9:40 AM #4
I ran into the same problem, but I found this and it works like a charm. Hopefully you're not still stuck on it, but just in case (and for anyone else who finds this thread someday!)