Xcode 10

Xcode 10 includes everything you need to create amazing apps for all Apple platforms. Now Xcode and Instruments look great in the new Dark Mode on macOS Mojave. The source code editor lets you transform or refactor code more easily, see source control changes alongside the related line, and quickly get details on upstream code differences. You can build your own instrument with custom visualization and data analysis. Swift compiles software more quickly, helps you deliver faster apps, and generates even smaller binaries. Test suites complete many times faster, working with a team is simpler and more secure, and much more.

Shine in the Dark

Code you write in Xcode looks stunning as the dark Xcode interface makes your work the star of the show. The entire interface is tuned for your dark Mac experience, from icons, to fonts, to the subtle contrast color of the Jump Bar.

Xcode also gives you powerful tools for creating your own dark apps for macOS. Interface Builder lets you quickly switch your design and preview from light to dark. Asset catalogs define assets and named colors. And you can switch your app in and out of Dark Mode while debugging. This is all done using controls within Xcode that only apply to your app. No need to change your system settings.

In Markdown files, headings, bold and italic text, links, and other formatting are instantly rendered in the editor as you type. The Jump Bar even understands Markdown structure so you can quickly navigate your README.md and documentation files.

Code Like a Pro

Xcode includes a lightning-fast source code editor. Text scrolls incredibly smoothly, even when editing enormous source files. Smooth animations are used throughout, whether folding your code to enhance focus, or when Xcode highlights errors and offers Fix-its. With great Markdown support, your accompanying documentation will look great, too.

Use command-click to select symbols or entire structures to transform or refactor your Swift, C, C++, and Objective-C code. And because the transformation engine is open source as part of swift.org, the list of transformations keeps expanding thanks to the contributions of an active developer community.

Changes to your code are highlighted beside each line, whether those changes are made locally by you, or a teammate’s commit upstream in your source repository. The instant you type a new line of code you will know if you’ve created a conflict, and you can quickly click the red indicator to get more information about the upstream code differences.

Work as a Team

Source control is the place where your whole team works on code together. Xcode supports working directly with several collaboration platforms, including:

  • GitHub and GitHub Enterprise
  • Bitbucket Cloud and Bitbucket Server
  • GitLab.com and GitLab self-hosted

It's never been easier for your team to work together in the cloud or on self-hosted servers within your organization. To make your workflows easier and more secure, Xcode can even generate a unique SSH key for you and upload it to the server.

Once logged in to your favorite service, the Xcode clone window shows all of your personal and saved repositories. From this window you can also search for additional repositories on your connected servers and quickly check any of them out with just a click. You can even rebase your changes when pulling latest versions.

The source control navigator in Xcode makes it easy to view each of your branches, tags, and remotes with a timeline of commits. Inspect an entry to see all affected files or double-click on a commit to see everything that changed. Common operations, such as creating and merging branches, are quickly accessible in the navigator.

Customize Your Debugging Tools

Using Instruments, you can finally retire your print() statements, which are replaced with OSLog signposts and your own custom instruments. With virtually no overhead you can mark important points throughout your code, then track those signposts as your app runs in Instruments. These log points appear alongside other analysis events such as CPU, memory, or network usage to give you valuable insights into your code’s behavior.

You can go even further and build your own instrument with custom visualization and data analysis. Xcode includes templates so you can build instruments using the same tools that Apple uses. Your instruments can easily be shared as part of your project and installed by other team members or users of your public frameworks.

Xcode also collects anonymous energy and crash logs from your users, highlighting the most important issues and letting you dive directly to the offending lines of code. So even if you don’t catch the bug before you publish, you can quickly identify and fix problems.

Simulate and Test

Xcode includes a robust testing engine built right in. Run unit tests, as well as UI and performance tests, across multiple physical devices at a time. Or take advantage of the processing horsepower of Mac to dramatically speed up testing using simulated devices running in parallel.

For continuous integration setups, you can launch many different simulated device types to run your complete test harness from beginning to end. Or, to complete your tests as fast as possible, Xcode can spawn many clones of a single simulated device, fanning out all of your tests to finish in a fraction of the time.

You can also dedicate another Mac in your network to host Xcode Server for automated building and testing. It's simple to get up and running with a dedicated Xcode CI setup since the features are built right into Xcode, with no need for additional server software. It’s never been faster to continuously build and test your apps.

Build Swiftly

Xcode 10 includes Swift 4.2, which compiles your software more quickly, helps you deliver faster apps, and generates even smaller binaries. Compared to Swift 4.0, the latest Swift compiler can build large apps more than twice as fast.* Combined with the new Xcode new build system, your everyday edit, build, and test workflow is much faster. Optimized for the latest multi-core Mac hardware, Xcode and Swift make for a lightning-fast development platform.

Train Your Model in a Playground

Swift was built to be fun to use, and it’s easy to experiment with an API when using a playground file. In Xcode 10, playgrounds are dramatically enhanced to work more like a traditional REPL, while making the live view even more responsive and fun to use for quick designs. As you add new code, only new lines are recompiled. You can choose to re-run specific lines of code, or hit shift-return to run the program right up to the line of code you just typed.

The new incremental model is a perfect fit for working with the new Create ML framework. Train your models directly within a playground, alongside the code that will use the model in your app. Train, experiment, and refine your machine learning code in a super-fast workflow, using the same Swift language you'll use in your app. When ready, just drag-and-drop your newly trained model into your app.

Learn more about Create ML