CONTACT

What’s new in iOS 9: top features for developers

Sean Samocki
  • Sean Samocki
  • July 13, 2015
What’s new in iOS 9: top features for developers

The next generation of Apple’s flagship mobile operating system was announced this year at WWDC, and as expected the operating system has been streamlined and refined. However, as always, there were new features announced that help enhance the experience for both users and developers, and we’ve explored some of them from a development perspective.

multitasking_2x Multitasking for iPad

Slide Over, Split View, and Picture-in-Picture have arrived for iPad, allowing certain models to use the much larger screen space for more tasks than regular iPhones. Slide Over allows a secondary application to be opened in an overlay when the user swipes in from the side of the application, and allows users to interact with them independently. In combination with Split View, users can then further resize this secondary app allowing it to take a variable amount of size.

iPad with iOS 9 multitasking slide over

Source: Apple

While apps created with Xcode 7 will allow this functionality out of the box, there are some changes necessary for legacy apps—and even a few considerations to keep in mind when developing new apps—to allow for this feature. Apps should be implementing size classes and Auto Layout to account for the changes in allowable space by Split View, as well as different screen sizes. With Split View, it is now more important to handle app state transitions, as these can now occur while your app is still on the screen and the user interacts with it. For instance, when a user resizes the secondary app size, `applicationWillResignActive` is called in the app’s application delegate file. It is important to ensure developers are saving the app’s state, such as the scroll position or any selections the user has made, in order to provide a smooth experience while resizing views. Lastly, it is more important in iOS 9 for applications to be conscious of being good iOS citizens in terms of memory. With a primary and secondary app being displayed on the iPad’s screen at the same time, it is important for developers to take note of how memory is being used—otherwise, if the device becomes sluggish, your app may get terminated.

Picture-in-Picture allows for users to watch or stream videos while in other apps like Mail or Notes. Frameworks which are supported by PiP include AVFoundation, AVKit, and WebKit, and with adoption of iOS 9 these frameworks do a lot of the work for developers, with many enabling this by default. Full-screen videos, for example, will go into PiP when the home button is pressed. (Users have the ability to turn off Picture in Picture within Settings.)

Xcode 7 logo

Source: Apple

UIStackView

UIStackViews allow developers to build views which act as containers, in order to allow for easier Auto Layout control. Auto Layout allows for developers to create dynamic layouts across screen sizes and orientations, but have always been tricky to implement correctly. UIStackViews help ease the confusion adopting a similar model to Android’s “LinearLayout,” which has been around since the beginning of Android (since devices with varying screen sizes have always been a staple of the Android platform, and are relatively new to iOS). UIStackViews should decrease development time by automatically making Auto Layout constraints, allowing developers to focus on other areas of the application.

spotlight-ios_2x Search APIs

Spotlight search in iOS devices now includes searching within third-party apps. Utilizing these powerful tools, developers can build their apps to show results in Spotlight even if the app is not installed! The new enhancements to the Search API include NSUserActivity APIs, Core Spotlight APIs, and web markup. It is recommended to incorporate all three of these search enhancements into content-heavy applications in order to provide the best search experience for users.

NSUserActivity APIs allow developers to index activities and app states for search. NSUserActivity was previously used for Handoff support, but now developers can set a title and keywords, which can then be picked up by Spotlight. This can make it easier for users to navigate where they have already been within your app, providing something like an app history. When any search option is selected, `application:continueUserActivty:restorationHandler` is called in the app delegate, allowing for developers to take the user to the appropriate location.

Core Spotlight APIs work like a database for searchable indexes—a developer can add, retrieve, update, and delete searchable content. By creating a CSSearchableItem object, a developer can set a title, description, and image for content, which is then indexed and has the ability to be deep linked into.

Web markup allows developers to use markup to provide more information, which helps Apple index content on websites that is also available within native iOS apps. Smart banners that suggest related apps are already available to link websites with apps in the App Store, but this functionality is taken further with Search in iOS 9, where the relationships between apps and websites become closer.

app-thinning_2x App Thinning

App thinning optimizes the install sizes of apps to use the lowest amount of storage space while retaining critical functionality. A lot of this optimization is done behind the scenes and handled by the App Store with no extra work. The app’s resources are now split, so that if a user installs an app on iPhone 6, they do not download iPad code or other assets used to make an app universal.

With App Thinning, there is now an opportunity to decouple whole features, which can be downloaded on-demand in the background when needed. These “On-Demand Resources” allow for whole sections of the app—like game levels beyond level one and two—to not be included with the initial download, and only downloaded when the user wants or needs it.

Apple App Thinning hero image

Source: Apple

Conclusion

While many just saw iOS 9 as a stability improvement that gets iOS back up to its traditional quality standards, there have been quite a few developmental changes and additions which make for rich features in the app development process. Most apps can benefit from the new features listed as developers have new tools to make apps better integrated, faster, and more adaptable to the ever-changing iOS marketplace.

Connect

Let’s Build Together

Thanks for reaching out!

We will be in touch shortly.