Chapter 11. Packaging for Stores

Some people claim “Stores are the future of apps.” To be honest, nobody knows if the future of app distribution will be store-based, browser-based, or a hybrid mechanism. The great thing about using HTML5 content—and jQuery Mobile in particular—is that we can also package our webapp as a native app for store distribution.

Therefore, if you want to distribute your app in application stores, you can definitely do that using jQuery Mobile. There are different approaches for doing that regarding the platform you want to target.

The first thing to understand is that we need to create one package per platform. In some way, we need to copy our files (HTML, JavaScript, CSS, and jQuery Mobile files) in different projects and create different packages.

Note

There is a group inside W3C working on a future standard for packaging webapps for distribution. The group is Native Web apps and its URL is http://www.w3.org/community/native-web-apps/.

When we package a webapp as a native application, we usually have the ability to access some new APIs that are not typically in HTML5, such as Camera, Contacts, or Accelerometer.

To package our webapp for store distribution we can:

  • Create a native project for every platform, add our webapp files as local resources, and use a Web View component and bind it to our HTML content. Sometimes this idea is called a hybrid app.

  • Use an official webapp platform, which usually means packaging our files in a ZIP archive.

  • Use a native ...

Get jQuery Mobile: Up and Running now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.