Decoding Xcode 9 – 7 Things You Should Be Aware Of

Xcode is an Integrated Development Environment or IDE for macOS, which contains an elaborate suite of software development tools provided by Apple, that include the Simulator, Instruments analysis and OS frameworks. The latest version Xcode 9 comes with some swanky new features that make developing apps with it even more exciting. So let’s check out what some of these new features are and how they make developer’s lives easier.

Xcode 9 is unbelievably quick and consistently smooth while editing even the largest files. It also understands your code better than ever, so you can select and edit the structure or even transform the selection directly in the editor. Powerful new refactoring tasks happen in place, renaming symbols across Swift, Objective-C, and even user interface files can be carried out without skipping a beat. And with source compatibility in Swift 4, Xcode 9 uses the same compiler to build existing Swift 3 code and updated Swift 4 code, so you can migrate at your own pace.

Key Features of Xcode 9

A new improved editor: Apple has built the entire Xcode in Swift. It’s fast, structure-based editor lets you intelligently highlight and navigate your code. It also includes great Markdown support.

Refactoring: Refactoring is built right into the editing experience and works across Swift, Objective-C, Interface Builder, and many other file types.

Super-fast search: The Find navigator returns instant results.

Debugging: Xcode 9 lets you wirelessly debug iOS and tvOS devices over the network (It will also support iOS 11 Devices).

Source Control: Xcode integrated support for GitHub accounts for quickly browsing repositories and pushing your repositories to the cloud.

Playground templates: Xcode also provides useful templates for the playground.

Build System. A preview of Xcode’s new build system provides improved reliability and performance.

Exploring More in Detail

General

Xcode 9 has updated the way to define text macros. You can now define text macros using a plist file. The indexing engine now includes the ability to index files as they are compiled. Also, the devices window can split into separate panes for device and simulators.

Asset Catalogs

We can now assign our application’s theme color as an asset in Xcode.

Also, the asset catalog has wide gamut app icons, a larger iOS marketing icon to the App Icon set, option to preserve image vector data for matching Dynamic Type scaling and support for HEIF images.

Building and Linking

Xcode 9 has added support for static library targets that contain swift code. 

Xcode has also added a preview of the new build system written in Swift. To do so in the Xcode 9, open a project file and then go to File > Project Settings. In the sheet that appears, choose New Build System (Preview) from the Build System popup menu. Note that the menu item will be File > Workspace Settings if you are working with a workspace.

Core ML

Xcode now also has an inbuilt Core ML editor. Core ML lets you integrate a broad variety of machine learning model types into your app.

From the editor, users can generate strongly typed interfaces for the model and model compilation for on-device usage.

Debugging

Wireless debugging is available in Xcode 9 and it also supports iOS 11 devices. You can debug iOS and tvOS devices over WiFi or wired networks. You can also connect via Bonjour or enter an IP address. iOS devices need to be plugged-in once to enable network debugging.

Documentation

Xcode has the new unified browser that integrates reference, sample code and articles with improved documentation search and integrated sample code downloading.

Interface Builder

Added support for use of named colors from the asset catalog, new margin and baseline view constraints, auto layout safe-area guides, full-screen watchOS apps.

Refactoring

Rename a symbol in a single file or in a project across Swift, C, Objective-C, C++ files, and Interface Builder files.

You can now extract method functionality for all supported languages, along with another language-specific local refactoring. You can view all the changes in one place. You can convert method signatures between Swift and Objective-C formats. You can also update properties, getters, setters, and synthesized iVars as needed, and the fix-it automatically fills in missing cases in switch statements, and mandatory methods for protocol conformance, with one click.

Simulator

  • Now, you can run multiple concurrent simulators with Xcode 9 and also run tests in parallel with test synching and other multi-device workflows.
  • You can record videos of simulators.
  • Now iOS and watchOS simulators include the hardware controls and allow easy dragging and resizing of the simulated device. Sharing information with Simulator from Maps, Photos, and Safari is now easier than ever.
  • Xcode9 has an added option to keep simulators running after closing the window or quitting Simulator for better integration with the simctl command of the xcrun command line tool.
  • You can now get help by simply choosing Help > Simulator Help.

Source Control

  • New source control navigator for viewing branches, tags, and remote repositories for the current workspace. It also shows the details for the selected navigator item.
  • New editor for branch history including a jump bar for easy navigation.
  • You now have a new side-by-side editor for file diffs.
  • Easier and faster access to common tasks.
  • A major change is that now you have GitHub account integration for easy browsing and one-click creation of a project and the associated GitHub repository.

Source Editing

The new Xcode 9 has an all new source editor. It also has –

  • Faster and more versatile Find and replace.
  • Fast scrolling for any sized file.
  • Direct manipulation of code structure such as tokens and blocks.
  • Redesigned integration for source control.
  • Redesigned presentation of error and warning messages.
  • Support for Markdown.

Swift

  • New in Xcode 9 – Swift 4.
    • One compiler for Swift 4 and Swift 3, Swift 4 and Swift 3 targets can be compiled together in the same project.
    • Improved migrator experience that supports migrating only select targets to Swift 4.
  • Faster generic code and decreased code size.

Testing

  • New in Xcode 9 – Parallel device testing.
  • Added new APIs to XCTest.
    • Control and capture screenshots.
    • Group test activities.
    • Test attachments.
    • Cleanup test state in a teardown block.
  • Target multiple apps in one UI test.
  • Run tests using a specified language and region.

Compatibility

Xcode 9.0 requires a Mac running macOS Sierra 10.12.4 or later.

Conclusion

Xcode 9 comes with some great new functionalities and we are going to have a great time exploring them all and finding out so much more by using it on further projects. You too should go check it out and share your experiences with us in the comments section.

Hope you liked the article.

Happy Coding!

Checklist To Secure Your Mobile App From Every Possible Threat

Download Checklist
*We will send the checklist to your inbox and keep you updated with the latest trends and insights on app development to keep you on top of your game.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments