I am working on a project using Sencha Touch 2.1 wrapped in Phonegap 2.2.0.

If (as advised) I specify the phonegap JS file as a dependency in the app.json file, rather than loading it as a script tag in index.html, upon fresh install to the iOS Simulator, the app starts, but the launch function is not fired. It subsequently works properly after starting it again.

If I remove the app from the simulator and re-install it, the problem always recurs on first execution.

If I remove the reference from app.json and put it as a script tag in index.html, it seems to work properly.

Any ideas as to what is going on here?