Xcode is an Integrated Development Environment or IDE for macOS, which contains an elaborate suite of software development tools provided by Apple. This suite includes a simulator, instruments analysis, and OS frameworks. The latest version, Xcode 9, comes with some swanky new features to make developing apps even more exciting. So let’s check out what some of these new features are and how they make developers’ lives easier.
Xcode 9 is unbelievably quick and consistently smooth even while editing the largest files. It also understands your code better than ever, so developers 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 user interface files without skipping a beat. With source compatibility in Swift 4, Xcode 9 uses the same compiler to build existing Swift 3 code and updated Swift 4 code, so developers can migrate at their own pace.
Key Features of Xcode 9
A new improved editor: Apple has built the entire Xcode in Swift. Its fast, structure-based editor lets developers intelligently highlight and navigate their 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 developers wirelessly debug iOS and tvOS devices over the network. It will also support iOS 11 Devices.
Source control: Xcode’s integrated support for GitHub accounts makes it easy to quickly browse repositories and push 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.
Taking a closer look
In general, Xcode 9 has updated the way to define text macros. Developers 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.
SEE ALSO: Server-side Swift for Java developers
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, the 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 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 developers integrate a broad variety of machine learning model types into their 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. It is now possible to debug iOS and tvOS devices over WiFi or wired networks. It’s also possible to connect via Bonjour or enter an IP address. iOS devices need to be plugged in once to enable network debugging.
Documentation: Xcode has a new unified browser that integrates reference, sample code, and articles with improved documentation search and integrated sample code downloading.
SEE ALSO: Swift jostles itself into the top 10 as TIOBE reshuffles again
Interface Builder: Added support for use of named colors from the asset catalog, new margins, baseline view constraints, auto layout safe-area guides, and 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. It is now possible to extract method functionality for all supported languages, along with another language-specific local refactoring. Developers can view all the changes in one place. They can also convert method signatures between Swift and Objective-C formats.
Additionally, developers can update properties, getters, setters, and synthesized iVars as needed. The fix-it automatically fills in missing cases in switch statements and mandatory methods for protocol conformance with one click.
Simulator: Developers can run multiple concurrent simulators with Xcode 9 and also run tests in parallel with test synching and other multi-device workflows. They can also 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: Xcode 9 boasts a new source control navigator for viewing branches, tags, and remote repositories for the current workspace.
This navigator also shows the details for the selected items. There’s also a new editor for branch history, including a jump bar for easy navigation. Developers now have a new side-by-side editor for file diffs, giving them faster access to common tasks. Another major change is the GitHub account integration for easy browsing access and creating a project and its associated GitHub repository with just one click.
Source editing: The new Xcode 9 has an all new source editor. It also has a faster and more versatile “Find and Replace” feature, as well as fast scrolling for any sized file. Xcode 9’s source editor allows for the direct manipulation of code structures such as tokens and blocks. Redesigned features include integration for source control as well as error and warning messages. It also has support for Markdown.
Swift: Xcode 9 comes with complete support for Swift 4 for faster generic code and decreased code size.
Now, there is only one compiler for both Swift 3 and Swift 4. Targets for both versions can be compiled together in the same project. XCode 9 also comes with an improved migrator experience that supports migrating only select targets to Swift 4.
Testing: Parallel device testing is a new feature in Xcode. New APIs have been added to XCTest. Now, it is possible for developers to control and capture screenshots, group test activities, test attachments, and cleanup test state in a teardown block. They can also target multiple apps in one UI test and run tests for 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 functions and we are going to have a great time exploring them all. It’ll be exciting to see how it can be used in future projects. Feedback is welcome; please share your experiences with Xcode 9 and let us know what you thought of it.
Happy coding!
The post Xcode 9: An IDE for macOS appeared first on JAXenter.
Source : JAXenter