Alex headshot

AlBlue’s Blog

Macs, Modularity and More

iPhone OS 4.0 roundup

2010 Iphone

Yesterday, Apple announced the upcoming features in iPhone OS 4.0 (the keynote is available, and also in the iTunes podcast). Almost all of the features were well received, though it's worth highlighting what many already have in Section 3.3.1, as Daring Fireball notes:

Prior to today’s release of the iPhone OS 4 SDK, section 3.3.1 of the iPhone Developer Program License Agreement read, in its entirety:

3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs.

In the new version of the iPhone Developer Program License Agreement released by Apple today (and which developers must agree to before downloading the 4.0 SDK beta), section 3.3.1 now reads:

3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

Whilst it's clear they're taking a pot-shot at Adobe's Flash generator, the fact is that the answer is not so clear cut. For example, what happens if you have an external tool that generates data to be uploaded into a program, like Blender? Jeff LaMarche has a good tutorial on importing blender models into OpenGL – is that now disallowed? And what about libraries that extend Apple's limited behaviour in either the XML parsing (like TouchXML) or Networking (MobileTwitterific) – are those disallowed too, since they don't directly link to the underlying libraries?

Or, what if someone were to generate an SWT like binder on top of the UI, wrapping existing components? The wrappers might well be written in Objective-C, satisfying that condition – but the condition isn't transitive, so code that calls those wrappers doesn't need to be.

Finally, what if I develop a series of macros to make life easier? The language isn't strictly Objective-C any more – you could write a whole program that way – but still be compilable by an Objective-C compiler. Is that still valid?

New APIs

The coverage of what's coming is already in various blog posts and on the iPhone OS keynote. However, it looks like the biggest change is the addition of the various background APIs. Instead of allowing general background processing, Apple has created a number of highly specific background runners. For example, you can now do:

  • Background music playing outside of the app – though whether the data must be fully downloaded or permits access by ongoing streaming isn't clear
  • VoIP calls in the background, including what looks like the beginnings of an iChat API which would permit continued logins whilst external to the app itself
  • Finishing background tasks once the app has quit
  • State persistence to restore where you last were when the app is opened
  • iAds will be a great (and consistent) way of generating ongoing revenue for freemium apps
  • iBooks coming to the iPhone is nice, but it'll give you iStrain
  • Folders seems like an enhancement that's been waiting to happen for ages
  • Background updates for location changes with different levels of accuracy
  • Wireless distribution/install of iPhone apps for enterprises

Conspicuously absent were the items relating to new iPhone hardware (though there appears that there's software support for hardware camera flash in the future), the ability to wirelessly sync, or being able to use the iPhone as a wireless disk (and/or access app data from a remote computer). Given the lack of iDisk and wireless syncing so far, it's unlikely that they'll be in with the iPhone 4.x stream; it seems that the mobile department are keeping up with the current stuff rather than features that have been missing since the start.

All in, the iPhone 4.0 update should be a great step forwards for those with iPhone 3Gs devices (or newer), and those with iPhone 3G will be able to use some of the APIs (but no background execution). Other than missing out on Your Favourite Feature Here, the only stain on Apple's card is their change to 3.3.1; is that here to stay, and will it be enforcable?