Newer versions of PhoneGap support lazy loading of javascript, > 2.4 iOs is working as well. To load injected js files (like phonegap.js and plugins) from the build service with requirejs and hydration enabled, you'll have to include the /data/data/XXX/hydra_app/ directory in paths config (replace XXX with your widget id in config.xml) The starting slash will bypass the baseUrl parameter:
Issues in my daily developer life, somewhere between scripts and compilers...
switching between Linux and Windows...
Showing posts with label requirejs. Show all posts
Showing posts with label requirejs. Show all posts
Phonegap - Real persistent storage module (incl jQuery deferred example)
There are several possibilities to store persistent data for a mobile app in Phonegap. But because you cannot be not sure that native HTML capabilities, e.g. localStorage is really stored permanently (see discussion on GoogleGroups), I decided to share my little RequireJS module prototype. It uses JSON and the mobile filesystem which enables also the possibility to use the data even after the app was completely deleted and reinstalled.
Subscribe to:
Posts (Atom)