View Full Version : Packaging Cordova 2.0.0 and ST2 for iOS

5 Oct 2012, 1:25 PM
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 (http://robertdougan.com/posts/packaging-sencha-touch-2-with-phonegap-cordova) 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 saying
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
This is because LocalFileSystem doesn't exist in Sencha Command. How are you using it?

9 Oct 2012, 7:59 AM
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
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!)