You are here

How to take advantage of the new features in Apple's Xcode 8

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

In September, Apple will release Xcode 8, the IDE that the company recommends for building apps for its macOS, iOS, watchOS, and tvOS operating systems. It's a powerhouse IDE that consistently ups the ante.

Here's a look at some the improvements my team is already using.

The first thing you will notice with Xcode 8 is how fast it is. Apple has done some amazing engineering to gear up the core speed of the IDE. Projects load and build faster. Right off the bat, that is a huge improvement for any team. In addition to under-the-hood improvements, Apple has made a number of smaller but very useful enhancements that have long been needed in Xcode.

 

[ 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. ]

Swift 3.0

From day one, Apple’s programming language, Swift, was a big hit with developers and my team. This modern language is not shackled by decades-old models, as is the case with Objective-C. It is clear that Apple will eventually either phase out or demote Objective-C as Swift continues to win over developers. (Note: Microsoft has taken the same stance with C# versus Visual Basic.)

The biggest change we noticed with Swift 3.0 is that we need to rewrite the names of all of the APIs that are being called. The change reflects Apple’s desire to make it much easier to write Swift and move away from traditional Objective-C- based naming conventions. The naming convention for APIs can be found here.

Swift is evolving rapidly. Requests for changes can be seen and added to a GitHub project.

One final new feature, for iPads running iOS 10, is the inclusion of a new app, called "Swift Playgrounds," that teaches you how to develop with Swift. If you have developers or power users on your team who want to learn Swift, Playgrounds is a great starting place.

Apple has made a number of smaller but very useful enhancements that have long been needed in Xcode.

Source Code Extensions

The first major improvement is the addition of Source Code Extensions. Almost all IDEs (such as Eclipse) support plugins that developers can create to improve the core functionality of the IDE. Xcode introduces its first iterations of plugins with Source Code Extensions to help more efficiently manage source code. This is a good first start for plugins in Xcode.

[ Is it time to rethink your release management strategy? Learn why Adaptive Release Governance is essential to DevOps success (Gartner). ]

Code signing relief

We have all been there: unable to build a project because the code signing is not correct. Apple is addressing the problems of code signing in Xcode 8, which should be a welcome relief for everyone. With new projects, you can select Xcode to manage the code signing for you. This means you no longer need to balance certificates, provisioning profiles, and application identifiers for each project. What a huge relief!

MacOS, watchOS, tvOS, and the IoT

The focus for Xcode is moving more and more to iOS-powered devices. This makes sense, because Apple receives over 56% of its income from iPhones and still receives a big chunk of change from iPads. In addition to iOS development, Xcode supports development for macOS (the new name for OS X—it's still the same OS; only the name has changed), web applications, tvOS to power Apple TV, and watchOS for Apple Watches.

Mobile delivery teams such as mine find themselves delivering solutions increasingly for broader platforms. The potential for delivering solutions for tvOS and watchOS is still immature; the technologies are only a year old.

In addition to supporting additional operating systems, Xcode also supports development for IoT (Internet of Things) solutions. There are essentially two parts to any IoT solution: the sensor capturing the data, and the hub receiving the data. For now, Xcode does not code the sensors, but the hub is central to Apple’s IoT strategy. There are effectively two types of IoT hub: the iPhone/iPad, and Apple TV.

The iPhone is the default tool for capturing data broadcast from a sensor using Bluetooth LE. The more interesting hub is Apple TV. Unlike a phone, which is portable, Apple TV devices stay next to one television and are always connected via Wi-Fi to the Internet. This provides exciting opportunities to manage IoT sensors in your home or an enterprise.

Improvements to Interface Builder

Interface Builder has received a welcome rewrite to support macOS, iOS, tvOS, and watchOS solutions. Key improvements include:

  • The ability to see how your app will look at different resolutions
  • Improvements in UI debugging
  • The ability to instantly see how your app will display for side-by-side apps on iPad

It is interesting to note that Apple is suffering from resolution fragmentation. iOS now supports universal apps that must include landscape and portrait displays for iPhones and iPads, which can range from 1,136 by 640 pixels for an iPhone 5 to 2,048 by 2,732 pixels for an iPad Pro. The key to successful support for such a broad range of devices is to leverage Autolayout. The update to Interface Builder will make it much easier for you to see how your apps will display on different screens.

Smaller tweaks that help

Outside of the big changes coming to Xcode 8 are a number of more minor changes that may go unnoticed at first but can help. They include:

  • San Francisco Mono, now the default font for editing code—it is much easier to read
  • Code completion for images
  • The ability to highlight the current line you are working on
  • Automatically generated Help

The result is that Xcode 8 is a substantial update. As with previous updates, Xcode 8 is free but does require a Mac and must be run with the latest version of macOS.

Xcode 8 is available in the Mac App Store.
 

[ Get Report: Buyer’s Guide to Software Test Automation Tools ]

Article Tags