Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use GitHub Copilot for Xcode #985

Open
onmyway133 opened this issue Nov 1, 2024 · 0 comments
Open

How to use GitHub Copilot for Xcode #985

onmyway133 opened this issue Nov 1, 2024 · 0 comments
Labels
github GitHub

Comments

@onmyway133
Copy link
Owner

onmyway133 commented Nov 1, 2024

During GitHub Universe 2024, GitHub announced that GitHub Copilot code completion in Xcode is available in public preview. The project is open source at CopilotForXcode

image

GitHub Copilot has been available as VS Code extension for a while, but this is first time we have official extension for Xcode.

GitHub Copilot for Xcode supports multiple programming languages commonly used in the Apple ecosystem, including Swift and Objective-C

Here's how to use this new extension in Xcode. I'm using Xcode 16 on macOS Sequoia. You can download latest Xcode from xcodereleases

Setting Up GitHub Copilot in Xcode

1. Download

Head over to release to download GitHubCopilotForXcode.dmg

Once downloaded, open and extract the file. Essentially you can drag GitHub Copilot for Xcode to Applications folder

image

2. Install

  • Open the folder where you extracted the file.
  • Double-click CopilotForXcode.app.
  • If prompted by a security alert, click Open.

Follow the installation prompts. The Copilot icon will also appear in your menu bar.

Screenshot 2024-11-01 at 10 40 36 image

3. Login to GitHub

Authenticate with your GitHub account to use Copilot.

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

CleanShot 2024-11-01 at 10 43 29@2x

Once authenticated on GitHub, you will receive this message

image

4. Permission

Copilot needs Accessibility permission and Xcode Source Editor extension to work.

To grant Accessibility permission, simply click on Accessibility Permission in the GitHub Copilot extension for Xcode app, it will opens System Settings app with the correct Accessibility pages opened.

CleanShot 2024-11-01 at 10 46 17@2x

To grant Xcode Source Editor extension, click on Extension Permission, it will open System Settings with page Login Items & Extensions

CleanShot 2024-11-01 at 10 47 59@2x

While on the Login Items & Extensions we can also allow Copilot extension to be launched at login, if it isn't already turned on.

CleanShot 2024-11-01 at 10 49 44@2x

Using Copilot in Xcode

After granting Xcode Source Editor extension for Copilot, we should restart Xcode to apply the changes.

We should see Copilot in Xcode -> Editor menu

image

Start typing something, and press Tab to expand suggestions

copi.mov
@onmyway133 onmyway133 changed the title How to use GtiHub Copilot for Xcode How to use GitHub Copilot for Xcode Nov 1, 2024
@onmyway133 onmyway133 added the github GitHub label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github GitHub
Projects
None yet
Development

No branches or pull requests

1 participant