Following initial announcement in June (WWDC 2016) and the release of as many as six betas, Apple launched the final stable version of Xcode 8 – the latest iteration of its integrated development environment (IDE) – in September. Initial opinions about the developer toolset have mostly been positive, with many of the new features of Xcode coming in for particular praise. The IDE can be used to make custom apps on the iOS, watchOS, macOS and the tvOS platforms. In what follows, we will deliberate on some of the coolest features of Xcode 8:
Extensions for source editor
The new version of the IDE comes with handy extensions attached to its editor. These enable app developers to code in a more personalized manner, while navigation within the coding section also becomes a lot easier. The extensions also automate the tasks that have to be performed to reformat codes. In addition, coders can select and alter (along with code transformation) with the new extensions as well. The editor extensions can be made on the built-in template, while their distribution in the App Store is also a simple procedure.
Note: The stability and functionality of Xcode 8 are not affected in any way (for instance, sudden closures of the IDE) by the source editor extensions. They operate as separate processes, and makes coding for apps that much easier.
Code signing management
Most developers who have worked with Xcode would agree that the ‘Fix Issue’ tab present in earlier versions for code signing was hardly of any use. Hardly ever did it actually provide a satisfactory patch for a code signing glitch. In fact, using this feature often lead to other, unexpected problems. With Xcode 8, Apple makes managing the code signing task faster and easier for app developers. All that the latter have to do is allow the IDE to handle code signing (the permission is given by clicking the checkbox against every target). Right from application identifiers, to code certificates and provisioning profiles – everything is seamlessly managed by the IDE. Code signing – often a majorly troublesome aspect of app making – is no longer a tricky affair.
Note: The automated option for code signing is activated by default in Xcode 8.
More powerful code debugging
Three new additions to the Xcode IDE have well and truly taken the runtime view debugging features to the next level. With the new iteration of the View Debugger, developers can quickly track down constraints (if any) in the user interface of an application. The Memory Debugger is another great addition for identifying and fixing memory leak problems, which can otherwise remain undetected. However, the most developer-friendly feature in Xcode 8 as far as code debugging is concerned has to be the all-new Thread Sanitizer. The tool catches all the race conditions present in data modifications, on a real-time basis. Other malware associated with threading are also managed by the Thread Sanitizer.
Note: The Issues Navigator panel (located on the left of the Xcode window) displays all the runtime issues. Code correction is a lot faster, reliable and transparent with this version of the IDE.
Swift 3 migrator
Projects created in Xcode 8 are built with Swift 3 (also released at this year’s Apple September event). However, unlike the previous versions of Xcode, this iteration of the IDE is not tied up to one particular version of the Swift programming language. The migrator in Xcode 7 posed its fair share of problems – and these have been ironed out in the migrator that Xcode 8 is designed with. To port a project from Swift 2.3 to Swift 3.0, the ‘Use Legacy Swift Language Version’ (found in the build settings of the target code) option has to be toggled to ‘Yes’. Apple app developers also have the provision of working with Swift 2.3 in Xcode 8.
Note: Swift 3 is the first major update after the language went open source last December. With the migrator, the need to actually migrate entire app programs to the latest version of Swift has been done away with.
The importance of mobile app testing simply cannot be overemphasized. The pre-built tests present in Xcode 8 (within ‘xcodebuild’) are a big improvement over Xcode 7 – which did not have any such test bundles. For every new section of compiled code, app developers can now run a pre-built set of tests. The segregated tests ensure that all the test bundles are not focused on the same target – and unchanged sections of the code are left as-is. The overall code completion times are also shorter – since the tests enable code snippets to run smoothly, without having to be compiled every time.
Note: Apple had announced that test indexing will be almost 50 times faster in Xcode 8, compared to the indexing speeds of Xcode 7. That will, without any doubt, ease the frustrations of many developers who have to wait through the (often) painfully slow test indexing process.
Revamped interface builder
For many mobile app development experts across the world, this is the biggest new feature that Xcode 8 brings to the table. The interface builder of the IDE have undergone a complete makeover – with a clear focus on making things as customized as possible for third-party developers. At the time of checking out the app storyboards (through bird’s eye view), the interfaces and layouts can be edited with ease. The appearance of any new application on Apple devices can be previewed live directly from the new version of the IDE – while the ‘Pan & Zoom’ feature has become significantly faster (that too, without any deprecation of vibrancy). Developers and app clients can view the same interface (even when the UI is modified according to size classes and/or devices are changed) – adding a layer of consistency. The new interface builder of Xcode 8 does a good job of accelerating the entire app development cycle.
Image code completion
Xcode 8 goes a long way towards relieving app developers from the hassles of using third-party plugins. A classic example of this would be the native code completion for images that the latest IDE version boasts of. The plugin can be invoked with the following line of code:
let image = UIImage(named: “xyz”)
Note: Line highlighting is another useful plugin that is integrated within Xcode 8. It makes sure that coders do not have to look for external plugins to highlight code lines.
Crash log captures
This feature is likely to be really handy in case of crashes during UI testing or unit testing. Apple’s newly released version of Xcode has the capability of capturing crash logs instantaneously, as and when a crash occurs. That, in turn, helps coders find out the the buggy line(s) of code quickly, and complete the requisite code correction. In Xcode 7, app developers had to go the whole hog of re-running the tests and using preset breakpoints to detect the bugs. It was a fairly complicated process – particularly for new developers and testers. Xcode 8 eases that pain considerably.
Note: In general too, the app testing procedures have become increasingly automated over the last few years.
9. A new font
San Francisco Mono is the name of the new, lively font that has been included in Xcode 8. iPhone app developers as well as general software testers opine that the font matches the default system font of Mac systems very nicely – bringing in a uniform feel in the visual crafting used for coding. The San Francisco Mono font has evolved from San Francisco font (derived by monospacing the latter). Developers can easily make their codes appear more neat, by using this font.
10. Organized documentation
While there has never been any doubt about the quality and availability of documentation available to Apple developers – browsing through them was a laborious task in Xcode 7 and earlier versions. In order to make the IDE more developer-friendly, the documentation format in Xcode 8 has been reengineered. Coders also confirm that the documentation browser allows for easy search and access of information.
Note: The volume of memory footprint has also reduced, thanks to the platform-specific consolidation of documentation in Xcode 8.
The latest iteration of the Xcode IDE also allows developers to create and run their applications on actual devices without getting a membership of the Apple Developer Program. Coders only have to specify their unique Apple IDs in the Xcode Preferences.
While Xcode 8 has plenty of great new features, it has certain shortcomings as well. For starters, refactoring is almost always problematic (AppCode – another IDE for Apple app development – does this in a much more intuitive manner), while the lesser support for external plugins is also a bone of concern for many developers. In certain cases, storyboards get altered and can no longer be accessed/opened in earlier versions of the IDE. However, the powerful new features of the IDE certainly outweigh these issues.
Xcode 8 makes app development for Apple platforms easier in more ways than one. All of the features mentioned above do their bit to make it more developer-friendly – so that they can build high-quality apps without any problems whatsoever. Xcode is still not a ‘perfect IDE’…but it certainly seems to be slowly getting there.
Latest posts by Hussain Fakhruddin (see all)
- Hiring React Native Developers: 6 Skills To Look For - April 30, 2019
- Is Your ‘Great’ App Failing? These Might Be The Reasons! - April 25, 2019
- The Rise & Rise Of The Popularity Of React Native - April 18, 2019