3 things iOS devs should focus on with the release of the iPhone 6, 6 Plus, and the Apple Watch
There has never been a more exciting time to be an iOS developer.
I always say that, but it still holds true. Not only are we getting the release of iOS 8 and “bigger than bigger” iPhones, we also finally get to see Apple’s take on wearables; they didn’t disappoint. I absolutely think that the Apple Watch will be revolutionary, just like the iPod, iPhone, and iPad before it.
In the words of President Obama, “Change is a comin’.” I’ve compiled a quick list of important things that iOS developers should focus on as they start to plan for the adoption of the bigger iPhones and the Apple Watch.
New Screen Sizes and @3x
As long as your pre-iOS 8 apps used Auto Layout or layout calculations based on the screen size, they will “just work” on the new iPhone 6 and 6 Plus. Apple implemented a pretty good up-scaling process that takes your apps for smaller screens and makes them look decent enough on the large screens. To disable this up-scaling in your pre-iOS 8 apps and achieve native resolutions, add a Launch Screen File to your project. (A Launch Screen File is just a storyboard file/NIB that will replace the old static launch images.)
For reference, here are all the frame sizes that your iOS 8 apps will need to support for iPhone:
iPhone 4S: 320.0 x 480.0
iPhone 5/5S/5C: 320.0 x 568.0
iPhone 6: 375.0 x 667.0
iPhone 6 Plus: 414.0 x 736.0
Remember, Auto Layout is your friend! And if you haven’t looked into Size Classes yet, do so as soon as possible. It’s a well designed system for managing a single storyboard for all your layouts. Check out WWDC 2014 session 411 for a great introduction.
If you look inside of your Images.xcassets in Xcode 6, you will see a new spot for 3x images. This is the scale for your iPhone 6 Plus assets. iPhone 6 is still regular 2x retina. XCAssets files are a very powerful tool for managing your assets and provide a ton of customization for your different devices and size classes. If you aren’t already familiar with how these image catalogue files work, you best get to learnin’. WWDC 2013 session 400 introduces them, and WWDC 2014 session 411 explains how they work with size classes.
UISplitViewController has become the star of the show with iOS 8. UISplitViewController is all about showing two view controllers side by side. Prior to this release, split view controllers were strictly iPad only. If you have ever used Apple’s Mail or Messages app on the iPad, you have used a split view controller. But now with iOS 8, split view controllers are available to use on iPhone as well. This is an example of Apple’s new “adaptive design” principles that they are pushing with iOS 8. In conjunction with size classes, creating universal apps has never been more convenient and fun.
Prior to Xcode 6 GM, the default behavior of a split view controller on iPhone was to hide the split view functionality and behave like a regular master-detail view controller setup. To get actual split views on the iPhone you had to override the trait collections of the containing split view controller. All of this still applies, except for the iPhone 6 Plus. The 6 Plus gets the iPad functionality of the split view controller without any trait collection manipulation, straight out of the box. So when the user rotates their device to landscape mode, they get the split view. WWDC 2014 session 216 is all about adaptive design. I highly encourage you to watch it.
WatchKit and App Extensions
My wrist looks really stupid right now without an Apple Watch on it. I can’t wait to get started developing for Apple’s new wearable. Apple briefly mentioned “WatchKit” during their Apple Watch presentation, but, besides that, we haven’t gotten much information on how development will work on the watch. It is unclear if you will be able to create standalone apps just for the watch, or if it will work similarly to app extensions, as a companion rather than a full-fledged app. If I had to guess, I’d say the latter, especially since you can’t use the watch without an iPhone.
In light of this, I’d recommend getting as comfortable as possible with developing App extensions. Luckily, Apple had two great WWDC presentations on getting started with App extensions: sessions 205 and 217.
This list is just to get you thinking about iOS 8. Here are couple of my other favorite features so far: Auto-sizing TableView Cell sizing, Photos framework, UIAlertController, and UIVisualEffects.
Apple has really been showing us developers some love. They seem to be opening up more of the OS for us to work with.