Publishing iOS Apps without the App Store

Introduction

iOS is the operating system used on some of the most popular Apple products today: the iPhone, the iPod Touch, and the iPad. Developing for each can be a huge pain. Native applications require Objective C knowledge, a machine with Mac OS, and a $ 99/year fee to publish in the App Store.

Sure, you can use a third-party framework to skip the use of Objective C, and the Mac OS requirement. But, the only way you’ll get out of that $ 99/year fee is to go with jailbroken devices, cutting a significant part of your market.

That’s where HTML5 comes in.

The current devices running iOS with Safari support the ability to install webpages as applications, giving developers the option to create apps very similar to those that are native.

Starts with the Cache

We’ll start with how Safari knows how to store apps.

Since the major draft of HTML5, a cache is the feature that allows offline use of these pseudo “applications”.

1) In the header of the webpage you wish to install, you’ll add the attribute “manifest” to the html element, like so:

2) Then, the manifest.file must be delivered with the type text/cache-manifest. On my own server, since I’m using Apache, I do this by using a .htaccess file with the following contents:

AddType text/cache-manifest .manifest

3) This will cause every file with the extension .manifest to be delivered with the typetext/cache-manifest.

Lastly, in the file itself, you list either a relative or absolute link to the files to be cached, with the header CACHE MANIFEST, like so:

CACHE MANIFEST   index.html background.png

Writing the Application

From here on out, it’s a breeze. Write a typical browser application, although take into account the fact it’s a mobile device using a modified version of the Webkit rendering engine.

For more things you might like to customize in the app, such as the icon that would appear on the home screen, visit the HTML refderence at Apple for iOS.

Installing the Application

To install, simply tap the center middle button on the bottom of iOS, and click “Add to home screen”. That’s all!

Example

My own application that’s been moderately successful on Android and Windows Phone I’ve been porting to iOS as an open beta. You can see a neat little trick, 
to request the application prompt the user click the “Add to home screen” button, like iOSBubble.

Conclusion

With the rise in popularity in HTML5, we might see a slow change from native to web development, as more devices adapt to this new, unique way of creating mobile applications.

Praneet Arora is an Artist | Writer | Poet | Lyricist | Model | Software Analyst & Architect | Web Developer | Security & Research Analyst | White Hat Hacker | CEH | SEO

Play
Slider