There’s been plenty of press coverage on the newly released iOS6, the software that powers iPhones and iPads. You may have read praise for the cool new features and screeds against iOS6 Maps. But it’s likely that you missed an important addition to iPhone’s web browser: file uploads are finally possible.
Safari Before iPhone
Apple’s development of their Safari web browser began before the release of iPhone. Though Apple watched the browser wars of the 90’s from the sidelines, the company introduced its Safari web browser for OS X in 2003. At the time, Mozilla Firefox was already popular on OS X, and many users wondered why Apple would create its own web browser when a good, third-party alternative existed. Apple built Safari, because it understood that a fast, standards-based browser is vital to any Internet-ready device, present and future.
The Original iPhone SDK
The native iPhone SDK and App Store shipped with iOS2 — a year after iPhone’s debut. If you have a good memory, you might remember that the development platform and SDK of the first-generation iPhone were, in fact, Mobile Safari and web standards. With this decision, Apple acknowledged what we already know: that web applications are easier and faster to build, launch, and maintain than their native counterparts.
While Apple demonstrated that web applications running under Mobile Safari could create a compelling experience on iPhone, Mobile Safari omitted one key feature that had been a standard feature of web browsers since 1997: the ability to browse and upload files using a web form. The “Choose File” button that Safari associates with the <input type=”file”> HTML tag would appear “grayed out” and inactive in Mobile Safari.
It’s unclear why Mobile Safari didn’t support file uploads. It could be because iOS does not expose the device’s file system to the user. There is no enduser concept of files as such in iOS. The closest analogue to files are the photos created by iPhone’s camera and accessible through the photo library. It’s natural to assume that because iPhone supports attaching these photos to emails that it would also support uploading them via the web browser. But while its onboard camera, persistent Internet connection, and full-featured web browser could make the iPhone an ideal platform for photo-sharing web applications, Mobile Safari’s inability to accomodate file uploads has stymied many unsuspecting developers.
iOS Native SDK and App Store
Apple introduced the native iOS SDK and the App Store in July of 2008. While Mobile Safari remained a key feature of iPhone, Apple encouraged developers to build applications for its native platform. The native SDK promised seamless integration with iPhone hardware, faster execution, and powerful graphics libraries. Through the native SDK, iPhone applications could access the device’s camera and photo library and thereby share photos over the Internet.
It seemed obvious that Apple would extend the same photo-browsing feature to Mobile Safari, but for five iterations of iOS, Mobile Safari added no support for file uploads. One could argue that Apple kept access to the camera and photo library “native-only” in order to drive developers toward their proprietary platform and their lucrative App Store distribution model. Regardless, this surprising lack of support continued to be an annoyance for web developers. It has resulted in creative workarounds, open-source projects, a paid, third-party web browser, and many hours of unplanned iPhone development.
Fixed in iOS6!
At last, the HTML file-input works as expected in Mobile Safari. Clicking the “Choose File” button prompts users to either “Take Photo or Video” or “Choose Existing” photos or videos. The selected photo or video can then be uploaded to a web site just like a normal browser. I never envisioned being so excited by such a small, overlooked feature. But as someone who recognizes the advantages of launching products on the web, I look forward to telling our customers, “Yes, your users can upload photos from their iPhones!”