GitHub Copilot code completion in Xcode is now available in public preview

GitHub Copilot code completion in Xcode

We are excited to announce that GitHub Copilot for Xcode is now available in public preview. This is a major milestone in our ongoing mission to make Copilot an essential tool for developers across a wide variety of platforms. Now, Apple developers can enjoy the same intelligent coding assistance, seamlessly integrated into their favorite IDE. With this public beta, Xcode users can boost productivity, speed up development, and enhance their overall coding experience using Copilot. We’re excited to bring the power of Copilot to even more developers, empowering them to innovate and build faster.

Key features of GitHub Copilot for Xcode:

  • Code completions: Copilot is now seamlessly embedded within Xcode, providing real-time code suggestions as you type.
  • Multi-language support: GitHub Copilot for Xcode supports multiple programming languages commonly used in the Apple ecosystem, including Swift and Objective-C. This broad language support ensures that all developers, regardless of their preferred language, can benefit from Copilot’s intelligent assistance.
  • Multiline suggestions: By default, you’ll see a single-line suggestion, but if multiple-line suggestions are available, you can access them by holding the Option key and pressing Option + Tab to accept the full suggestion.
  • Content filtering: Copilot includes advanced filters to screen out harmful or inappropriate content from its suggestions. This ensures that all code recommendations adhere to professional standards and contribute to a safe, respectful coding environment.
  • Block suggestions matching public code: You have the option to activate our duplicate detection filter that blocks suggestions matching public code on GitHub.

Video of code completion in Xcode

How to get started

You need to have a Copilot license to get access to Copilot for Xcode. All Copilot individual, business, and enterprise users have access to the public beta. To install the extension, simply follow the steps outlined in our getting started guide.

Feedback

To provide feedback or report issues, please open an issue on GitHub at https://github.com/github/CopilotForXcode/issues. If you’re experiencing a similar problem, please check existing issues and add a comment to share your experience or ask questions.

Join the Community

Connect with other developers, share tips, and discuss other updates to Copilot in our dedicated Copilot Community Discussions.

With GitHub Copilot code review in Visual Studio Code, you can now get fast, AI-powered feedback on your code as you write it, or request a review of all your changes before you push.

There are two ways to use Copilot code review in VS Code:

  • Review selection: highlight code in VS Code and ask for an initial review. (Available now to all Copilot subscribers)
  • Review changes: ask Copilot for a deeper review of all your changes before you push from the “Source Control” tab, which you can also do in your pull request on GitHub.com. (Join the waitlist, open to all Copilot subscribers)

Copilot’s feedback shows up as comments in the editor, attached to lines of your code. Where possible, the comments include actionable code suggestions, which you can apply in one click.

A comment from Copilot in Visual Studio Code

To learn more about Copilot code review, head to the docs.

See more

Copilot Autofix now supports fix suggestions for problems detected by ESLint, a partner code scanning tool. Autofixes are available both in pull requests and for historical alerts.

Setting up ESLint using a starter workflow

ESLint is the first partner tool supported by Copilot Autofix. Support for additional partner tools, such as JFrog SAST and Black Duck’s Polaris™ platform powered by Coverity®, will be announced by future changelogs when available. To opt out of fix suggestions for third-party tools, you can disable this feature from the code scanning settings page.

Example of a fix suggestion for an existing ESLint alert

In order for Copilot Autofix to pick up ESLint alerts, you need to enable ESLint as a code scanning tool in the target repository. For reference, you can select an updated starter workflow when setting up a new GitHub Actions workflow in your repository. You can use both ESLint scanning and the CodeQL analysis in the same repository.

Disabling fix suggestions for third-party tools

For more information, see: Responsible use of Copilot Autofix for code scanning. If you have feedback for Copilot Autofix for code scanning, please join the discussion here.

See more