Apple iPhone SDK upends mobile market

Eight months ago, Apple was a nonplayer in the mobile space. Now, according to Apple, iPhone is the second most popular smartphone solution after BlackBerry. With all the hoopla he raised over iPhone at launch time, it's as if Steve Jobs saw this coming. What he admits he didn't see coming was the market's reaction to the lack of a software development kit (SDK) that would support third-party apps on iPhone. iPh

Eight months ago, Apple was a nonplayer in the mobile space. Now, according to Apple, iPhone is the second most popular smartphone solution after BlackBerry. With all the hoopla he raised over iPhone at launch time, it's as if Steve Jobs saw this coming.

What he admits he didn't see coming was the market's reaction to the lack of a software development kit (SDK) that would support third-party apps on iPhone. iPhone is the only smartphone platform without custom application support, and that fact locked Apple out of the fleet sales that are RIM's bread and butter. It also disenfranchised the Mac developers who put Mac on the map and keep it there with, wouldn't you know it, native applications. I have weighed in on the subject of an iPhone SDK for native software in my usual soft-spoken, dead-horse-friendly way. "Apple, don't brag that iPhone runs OS X," I said, "until developers can get at it."

Come June, Apple gets a pass to brag about its mobile OS all it likes. That's when Apple is slated to deliver its SDK for iPhone, and from the work I'm doing with the publicly available preview tools and documentation, I can attest that iPhone will be the simplest, best-documented, and most enjoyable experience for mobile application developers. I have coded fairly extensively with Symbian, Windows Mobile, and BlackBerry. iPhone just blows them away, making me wonder who decided that mobile development had to be difficult. I'll take that a step further: If you're new to programming, iPhone or iPod Touch is a splendid place to start.

I can't do the iPhone SDK justice in one post, but I can hit a couple of the high notes that earn Apple props for taking the SDK further than it had to. For openers, application developers don't need to use Objective-C, C, or C++ to write software for iPhone. Apple added the one thing I was sure it wouldn't add -- data persistence -- to iPhone's Safari browser, paving the way for applications crafted in JavaScript, HTML, and CSS that run even when the network is unavailable. What's more, iPhone's JavaScript persistence doesn't force programmers to deal with flat text files or XML. It uses SQL, complete with transactions. Apple also put some flash (ahem) in Safari's GUI with built-in support for Scalable Vector Graphics (SVG) and both automatic and explicit animation. Apple supplies Web app code snippets that mimic iPhone's native GUI, and a Web application can take over the whole screen, leaving no trace that it's running in the browser. iPhone's offline Web app support is so strong that I'm looking forward to seeing it ported to Safari for the desktop.

On the native side, we now know that the iPhone OS is based on OS X 10.5, a.k.a. Leopard, and that Apple has catered to Mac developers. Their skills, and fair chunks of their code, will move readily to iPhone. In fact, there are so many similarities between the Mac and iPhone that much of learning to code for iPhone is familiarizing yourself with what you can't do. For example, the same presentation facilities, such as OpenGL and Quartz, are present in desktop and iPhone OS X, but OpenGL is slimmed down to OpenGL ES (embedded systems), and Quartz is limited to 2-D graphics. But use the word "limited" carefully where the iPhone SDK is concerned. Quartz may be limited to 2-D, but it can still load, display, scale, annotate, and save PDF files. Can your phone or music player do that?

Native iPhone applications have access to standard POSIX C APIs and other must-haves such as Berkeley Sockets for TCP/IP communication. All third-party code runs in a sandbox, meaning that the OS exerts tight control over its access to system calls, TCP ports, files, and other resources. You can't write an application that dips into another app's files. You can't write a custom mail or Telnet server that listens on the standard TCP ports for these services, whether the iPhone OS is using those ports or not. Of course, there's no path from the sandbox to any device internals that you could use to flip the phone to a different wireless operator. The sandbox is tight enough that a hacker would have to punch through it to pillage or hobble your iPhone, and Apple has set it up so that every application can be traced back to its creator. Apple's method for registering and certifying applications will engender controversy, but users need to know that they can sample the riches of iPhone software in complete safety.

I'll leave you with two details that put iPhone way over the top for developers: namely, the multitouch display and the three-axis accelerometer. Both of these are accessible in native code as well as JavaScript. Complex multitouch gestures such as pinch, spread, sweep, and circle are sent to software as events along with the basic tap and drag. To make the on-screen keyboard appear, you don't ask for it. You simply move the focus to a text field.

The accelerometer is developer candy that will break Apple into the gaming market in a way that the Mac never could. iPhone can sense orientation and movement in 3-D space. As you move, or whatever is carrying your iPhone or iPod Touch moves, an application can know about it. The possibilities are endless, and there are serious uses for 3-D position sensing that can't be set aside. It's an ultimately intuitive controller for complex processes that currently require operators to bypass humans' natural 3-D perception in favor of 2-D controls such as buttons, switches, mice, and joysticks.

It's my job to dream big, but developers will come up with far more down-to-earth uses for iPhone and iPod Touch. Apple's main interest is in opening iPhone to enterprises that demand mobile devices they can customize to suit their needs. The SDK gets Apple there, and Apple's Mac-like approach stuffs the market with thousands of developers ready to code for the phone. Those enterprises in need of custom code for fleet-issued handsets don't have to look very far for talent. By year's end, there will be a glut of great software for iPhone and iPod Touch, much of which will cost nothing. And to top it off, Apple will host the entire catalog of third-party software.

Will this change the world? Apple would argue that iPhone did that when it was launched, but I disagreed. In June, when iPhone firmware is updated to Version 2.0 and the object is opened to developers, I'll see the device that I hoped iPhone would be. That will instantly transform high-end consumer phones and music players, and it will gradually alter the landscape for commercial mobile devices. Much depends on how hard competitors are willing to work on their SDKs and developer programs. Communities of mobile developers are scattered and poorly supported. At least in iPhone, other mobile players have a model that reaches from platform and dev tools through distribution and billing.

Perhaps there will be some surprises coming out of the CTIA (Cellular Telecommunications and Internet Association) conference that's just around the corner. Something's going to happen, because Microsoft, Nokia, and RIM can't sit still while Apple accumulates mobile market mindshare, and market share, through its application catalog and developer buzz. There is already electricity in the air. Microsoft and Nokia have declared significant other-ship on Microsoft's Silverlight (nee cross-platform .Net), and RIM is rolling out a substantial firmware update to keep its platform fresh. This is all good; they'll need momentum because when Apple's mobile software catalog, dubbed AppStore, goes online, users of other platforms will start asking their handset makers why they can't share in the riches.

[ For more on the iPhone's potential in the enterprise, see Tom Yager's initial reaction, his iPhone 2.0 Q&A, and our Special Report: IT's guide to the iPhone ]

Copyright © 2008 IDG Communications, Inc.