O'Reilly logo

Getting Started with HTML5 WebSocket Programming by Vangos Pterneas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Going native

So, what if your application supports device-specific or offline features, and you still want to use WebSockets when the web is available?

You go native.

Fortunately, all of the major mobile platforms support WebSockets, so you need to make absolutely no changes in your server code! After all, HTML5 is a front-end client just like iPhone or iPad. Using the same techniques as the JavaScript samples, you are going to build the same application in Objective-C. The process is similar to any other mobile platform, so do not worry if you are not familiar with the Objective-C concept.

Creating the project

To begin with, open XCode, the development environment provided by Apple for building iOS apps. Eclipse and Visual Studio are the Android ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required