You are here

10 new features in Apple Xcode 7 to build better apps

public://pictures/Matthew-David-Senior-Manager-Kimberly-Clarke.jpg
Matthew David, Senior Manager of Mobility Center of Excellence, Kimberly-Clarke

The latest version of Apple Xcode has a long list of features and tools that make development easier and open up new opportunities. Here are the top 10 features that have me most excited about Xcode 7.

1. Apple TV and tvOS

Creating apps for Apple TV has been on many developers' wish lists. Unlike expensive Apple Watches, Apple TV targets a mass market domain that can reach hundreds of millions of new customers.

The new Apple TV—and the supporting tooling in Xcode 7—makes this dream a reality. Apple TV is powered by a version of iOS called tvOS. Fundamentally, a lot of the features developers have come to enjoy with iOS are also in tvOS. What's different is the inclusion of a new interface language called TVML, an XML description language that interfaces between the native code and the TV screen.

2. Native Apple Watch apps with watchOS 2

A key feature missing from the Apple Watch at launch is the inclusion of native apps. The launch of watchOS 2 now supports native apps for the Apple Watch. Xcode has also been updated to include the SDKs, testing tools, and simulators to build native Apple Watch solutions.

This is a huge win for developers, as watchOS 2 introduces a new App Store ecosystem. A whole new business model explodes each time Apple expands their app stores to new devices. This will create the third ecosystem, after iPhones and iPads. As a frame of reference, about 25 billion apps have been downloaded from the app store in the past 12 months.

3. UI testing

Continuous integration is the key to managing a scalable DevOps process. Apple continues to support DevOps with the inclusion of UI testing.

As with unit testing, UI testing is the ability to write scripts that automatically test the user interface as if a person is interacting with a virtual or a connected device. The scripts aren't part of the app code itself, but interact with the new UI Automation API via JavaScript.

The immediate opportunity here is that modern iOS 9 apps developed by third-party groups can be tested independently of the source code. An example use case: a department in a company contracts a local digital design agency to build an app, but its DevOps team has to test the app when the app is in production. Now they can.

4. TestFlight

Any app you build will have to be tested for user acceptance. Apple has in the past restricted each iTunes account to only 100 testing devices.

Back in 2010, TestFlight's founders saw the challenge of testing apps on iOS and Android devices and came up with the service they then dubbed TestFlight. The concept of TestFlight is to allow beta users to securely download an app and test it on their device. Apple acquired TestFlight in 2014 (guess how long it took for the Android part of TestFlight to be turned off?) and has integrated TestFlight into Xcode.

The good news is that developers aren't restricted to 100 accounts and can now have up to 1,000 beta users. Even better news is that you can group the beta users with different builds and crash log repositories. (Don't despair, Android developers. Google released a beta testing program for Android that is similar in concept to TestFlight.)

Speaking of crashes, Xcode 7 now offers a consolidated crash report window. Other testing features include an address sanitizer for memory corruption debugging and an energy gauge for iOS apps.

5. On-device development

Development of a mobile solution is only as good as the device you test it on. Until now, it has been problematic to test on physical iPhones, iPads, and iPods.

With the release of Xcode 7, you get a new feature that Android developers have been enjoying since day one: you can connect any device and run test builds of your solutions without having to certify the test device. This makes development much easier.

6. Game development

Who would have thought that Apple would become a leading game company? Games are a big deal for iOS, OS X, and tvOS. There are hundreds of thousands of games available for the iPhone, and three new Kits are now available for you to add your own: GameplayKit, ReplayKit, and Model I/O.

GameplayKit makes it easier to build rule engines for games and then map those rules onto elements and objects in the game. Like watching video of your game play action? Then you need to learn how to add ReplayKit into your games. Model I/O is the technology that adds physical materials and effects to your 3D games, such as lighting.

7. App thinning

Apple will give developers up to 2 GB for an app. This sounds great until you try to download your app over a slower network, which is part of the reason that Apple has long encouraged developers to keep their apps small. The introduction of apps for Apple TV has placed a size limit of 200 MB per app.

The new size limit may seem restrictive, since many 3D games are much larger in file size. App thinning is a feature that optimizes an app for the device it's going to be installed on by removing assets such as images and having them installed on demand.

For example, a platform game can install on a device with the first two levels, keeping the game under 200 MB. When the player gets to level two, level three assets will be downloaded on demand from Apple's App Store repository. Level four assets will download when the player reaches level three, and so on. These are referred to as on-demand resources.

8. Playgrounds

Xcode 6.0 introduced playgrounds as a way to visualize code without having to build an application. With Xcode 7, playgrounds now support comments and the inclusion of embedded images, known as markup. Developers can now use standard markup to add comments or whole blocks of information about the code on the page. Here's an example of markup:

< the opening less-than sign will ignore one line in your code/*Using a backslashfollowed by an asterisk lets you block whole sections of code until thefollowing asterisk/backslash combination is read*/ >

Markup isn't new to developers (JavaScript developers have been using markup since the first release of JavaScript). There are several conventions in the implementation of markup in playgrounds you can take advantage of to highlight important comments.

9. Swift 2.0

Released in June 2014, Swift has grown to be the default language for building iOS apps. The modern syntax and ability for developers to quickly pick up the language has made it one of the fastest-growing languages of all time.

Xcode 7 introduces Swift 2.0, and it's a big upgrade. The inclusion of a Swift 1.0-to-Swift 2.0 migration tool will give you an idea of how big the update is.

Apple also updated Objective-C to work better with Swift. New features like generics improve Objective-C/Swift integration by giving the compiler more clues about your intent.

10. iOS 9 SDK

At one time, the inclusion of the latest iOS SDK would've been the top feature on this list. There are many new features in iOS 9, but one that will be very useful for iPad apps is multitasking. The iPad Pro and iPad Air 2 now support apps that can share a screen for the first time. Apps designed with the storyboard responsive concepts for iOS 8 will automatically upgrade to support split screen.

[ Get up to speed on quality-driven development with TechBeacon's new guide. Plus: Download the World Quality Report 2019-20 for lessons from leading organizations. ]

Where can you get Xcode 7?

This list is only a high-level overview of what you can do in Xcode. The best next step is to download Xcode and get started. As with previous releases of Xcode, you'll need to be running a Mac, and you'll need an active App Store account.

Xcode is free, and the latest version is available now. If you have an Apple Developer account, then you can download a beta release of Xcode 7.1 to begin work building tvOS apps for Apple TV. The final version of Xcode 7.1 will be released when Apple TV ships in late October.

[ Learn how to apply DevOps principles to succeed with your SAP modernization in TechBeacon's new guide. Plus: Get the SAP HANA migration white paper. ]

[ Get up to speed with TechBeacon's Guide to Software Test Automation. Plus: Get the Buyer’s Guide for Selecting Software Test Automation Tools ]