Why iOS5 is huge!
Published on the 30th of June 2011I think iOS5 is a massive update for iOS App developers, read my reasons why.
Customizing UI components
I've done this a lot myself using hacks, tricks and quirks. With version 5 of the iOS SDK they've added customization to UI controls.
For example, you can assign a custom background image to a UIToolbar or UINavigationBarusing a simple background property. Before you literally had to jump through hoops to make this work.
Automatic reference counting (ARC)
iOS does not have Garbage collection . You know - a background process constantly checking to see if it can reclaim memory occupied by objects that are no longer in use.
Obj-c has a autorelease pool and retain release strategy, but nothing as fancy like the way Java and C# runtimes manage memory. Although the garbage collector makes life much easier for a developer, it also decreases efficiency on mobile devices.
Apple says they found a middle ground. Instead of having a separate proces recollecting memory, they have created a compile time solution. Using the static code analyzer - previously built into LLVM - they dynamically add alloc and release statements during compiling.
This will literally spare you of writing hundreds of lines of dull code. As an extra, Apple says it will also prevent common bugs like memory leaks and make writing code a lot easier.
ARC does require some code concessions, but Xcode 4.2 supports a tool that helps you update your existing code.
Storyboards
A sweet addition to interface builder. Instead of numerous interface files you can start dragging and editing all your views in one place. You can specify transitions between screens and the actions that trigger them. Perhaps more importantly, they also added a design pattern that can be implemented to send and receive data between controllers. Currently you'd have to implement protocols, delegates, notifications or some other custom way to maintain state between screens.
Also new to interface builder is creating UITableViewCell instances within XCode's integrated interface builder.
JSON API
Finally Apple turned their private JSON methods in a public API. Sure, there are great alternatives like SBJson , but adding third party libraries are always a burden when you'd consider something fundamental, like JSON, should be in the core framework.
Cloud Storage
New API's allow to easily store documents and key-value pairs in the iCloud. This makes it far easier to share data between multiple devices. Right now the most common used alternative is Dropbox . Dropbox has it's benefits, but I think iCloud should provide a more consistent user experience as well as a more consistent way to implement cloud storage.
I really see this as a bonus. They've made it super easy to add share functionality inside your app. Too bad they didn't add Flickr as an alternative to share graphics with.
In the end I really think Apple addressed a lot of holes in the SDK. The points above are just scratching the surface - there are a lot of other major improvements that will for instance benefit game developers.
