Prevent iCloud backup of Phonegap’s localstorage

In a defalt setup (Phonegap 2.8.1), localstorage is marked for backup to iCloud. This may get your app rejected by Apple, depending on the size with the following rejection motivation:

The iOS Data Storage Guidelines indicate that only content that the user creates using your app, e.g., documents, new files, edits, etc., should be backed up by iCloud.

To prevent this to happen you can use the BackupWebStorage option in config.xml file. You can set BackupWebStorage to “none” or “local

To verify how much data the app is storing Apple suggests the following procedure:

  • Install and launch your app
  • Go to Settings > iCloud > Storage & Backup > Manage Storage
  • If necessary, tap “Show all apps”
  • Check your app’s storage
Facebooktwittergoogle_plusredditpinterestlinkedinmail

Sencha Touch 2: Mobile emulation from Chrome browser

The new versions of Chrome allow you to test your Mobile HTML App simulating device screen. This is particularly useful considering the reduced screen size of mobile phones compared to what is available on your chrome browser running on your desktop screen.

Console Emulation is available from Chrome Developer Tools, and can be activated from setting panel:

settings

settings2

You will be able then to locate the Emulation Panel and select the preferred device from the option available getting the screen emulation for the device selected:

emulationPanel

mobile-screen

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Sencha Touch 2 and Phonegap: The connection to the server was unsuccessful error

Some Sencha Touch 2 and or Phonegap built App may suffer from this error at startup, depending on the amount of scripts loaded, the startup loop time, the performance of the current device or emulator, the lack of a splash screen.

Connection to server was unsuccessful. (file:///android_asset/www/index.html)

As workaround to fix the error you can adopt the following approach:

  1. Rename your App index.html to main.html
  2. Create a new index.html with the following content
  3. Rebuild your app and go!
Facebooktwittergoogle_plusredditpinterestlinkedinmail

Sencha Touch 2 – first steps tutorial – generate and compile app

sencha-tools-250First of all make sure you have downloaded and istalled proper Sencha Touch 2 archive you can download from:

http://www.sencha.com/products/touch/download/

Ensure you have also installed the Sencha CMD you can download at:

http://www.sencha.com/products/sencha-cmd/download

Install the CMD archive downloaded and copy the Sencha Touch 2 archive to your htdocs folder of your AMP installation.

Enter the sencha directory in your htdocs folder and create your first app with the command:

to build your app you can enter the yourApp folder and type the following command:

You can also launch your new App directly in the simulator with the following command:

Facebooktwittergoogle_plusredditpinterestlinkedinmail