CopilotForXcode Documentation

AI coding assistant for Xcode

RAW Doc

File: README.md

GitHub Copilot for Xcode

GitHub Copilot for Xcode is the leading AI coding assistant for Swift, Objective-C and iOS/macOS development. It delivers intelligent Completions, Chat, and Code Review—plus advanced features like Agent Mode, Next Edit Suggestions, MCP Registry, and Copilot Vision to make Xcode development faster and smarter.

[!IMPORTANT]
Starting from version v0.50.0, we have added internal support for the upcoming usage-based billing experience, including experience updates to the usage panel, usage notifications, and model picker. These changes will become visible once usage-based billing is rolled out.

To ensure compatibility with the new billing experience, we strongly recommend upgrading to the latest plugin version as soon as possible:

  • GitHub Copilot for Xcode: v0.50.0 or later

Clients using older plugin versions will continue to function. However, the billing and usage experience may not be optimal and may not accurately reflect the latest usage-based billing experience.

Chat

GitHub Copilot Chat provides suggestions to your specific coding tasks via chat.

Agent Mode

GitHub Copilot Agent Mode provides AI-powered assistance that can understand and modify your codebase directly. With Agent Mode, you can:

  • Get intelligent code edits applied directly to your files
  • Run terminal commands and view their output without leaving the interface
  • Search through your codebase to find relevant files and code snippets
  • Create new files and directories as needed for your project
  • Get assistance with enhanced context awareness across multiple files and folders
  • Run Model Context Protocol (MCP) tools you configured to extend the capabilities

Agent Mode integrates with Xcode's environment, creating a seamless development experience where Copilot can help implement features, fix bugs, and refactor code with comprehensive understanding of your project.

Code Completion

You can receive auto-complete type suggestions from GitHub Copilot either by starting to write the code you want to use, or by writing a natural language comment describing what you want the code to do.

Requirements

  • macOS 13+
  • Xcode 14+
  • A GitHub account

Getting Started

  1. Install via Homebrew:

    sh
    brew install --cask github-copilot-for-xcode

    Or download the dmg from
    the latest release.
    Drag GitHub Copilot for Xcode into the Applications folder:

    Updates can be downloaded and installed by the app.

  2. Open the GitHub Copilot for Xcode application (from the Applications folder). Accept the security warning.

  3. A background item will be added to enable the GitHub Copilot for Xcode extension app to connect to the host app. This permission is usually automatically added when first launching the app.

  4. Three permissions are required for GitHub Copilot for Xcode to function properly: Background, Accessibility, and Xcode Source Editor Extension. For more details on why these permissions are required see TROUBLESHOOTING.md.

    The first time the application is run the Accessibility permission should be requested:

    The Xcode Source Editor Extension permission needs to be enabled manually. Click
    Extension Permission from the GitHub Copilot for Xcode application settings to open the
    System Preferences to the Extensions panel. Select Xcode Source Editor
    and enable GitHub Copilot:

  5. After granting the extension permission, open Xcode. Verify that the
    Github Copilot menu is available and enabled under the Xcode Editor
    menu.

    Keyboard shortcuts can be set for all menu items in the Key Bindings
    section of Xcode preferences.

  6. To sign into GitHub Copilot, click the Sign in button in the settings application. This will open a browser window and copy a code to the clipboard. Paste the code into the GitHub login page and authorize the application.

  7. To install updates, click Check for Updates from the menu item or in the
    settings application.

    After installing a new version, Xcode must be restarted to use the new
    version correctly.

    New versions can also be installed from dmg files downloaded from the
    releases page. When installing a new version via dmg, the application must
    be run manually the first time to accept the downloaded from the internet
    warning.

  8. To avoid confusion, we recommend disabling Predictive code completion under
    Xcode > Preferences > Text Editing > Editing.

  9. Press tab to accept the first line of a suggestion, hold option to view
    the full suggestion, and press option + tab to accept the full suggestion.

How to use Chat

Open Copilot Chat in GitHub Copilot.

  • Open via the Xcode menu Xcode -> Editor -> GitHub Copilot -> Open Chat.

  • Open via GitHub Copilot app menu Open Chat.

How to use Code Completion

Press tab to accept the first line of a suggestion, hold option to view
the full suggestion, and press option + tab to accept the full suggestion.

License

This project is licensed under the terms of the MIT open source license. Please
refer to LICENSE.txt for the full terms.

Privacy

We follow responsible practices in accordance with our
Privacy Statement.

To get the latest security fixes, please use the latest version of the GitHub
Copilot for Xcode.

Support

We’d love to get your help in making GitHub Copilot better! If you have
feedback or encounter any problems, please reach out on our Feedback
forum
.

Acknowledgements

Thank you to @intitni for creating the original project that this is based on.

Attributions can be found under About when running the app or in
Credits.rtf.


File: CHANGELOG.md

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

0.51.0 - August 12, 2026

Added

  • Support for Kimi K3 through the updated Copilot language server.
  • Agent Client Protocol (ACP) plugin metadata for GitHub Copilot.

Changed

  • Updated the Copilot language server from 1.488.0 to 1.523.3.
  • Updated the ACP plugin to use Copilot CLI 1.0.78.

Fixed

  • Fixed model pricing tooltips for the latest token pricing metadata.

0.50.0 - May 20, 2026

Added

  • Reasoning effort control for supported models: Low, Medium, or High from the model picker to balance response speed and quality.
  • Added internal support for upcoming usage-based billing, including billing updates for the usage panel, usage notifications, and model picker. This will be visible to the user once usage-based billing rolls out.

Changed

  • Bring Your Own Key (BYOK) is now generally available.

0.49.0 - May 15, 2026

Added

  • Native Anthropic Messages API (/v1/messages) endpoint support.
  • Thinking support in chat for reasoning-capable models.
  • Enhanced rate limit notifications and error messages.

Changed

  • Refined tool call item UI in agent progress: removed border and divider, repositioned chevron, and adjusted spacing for better readability.
  • Updated Copilot language server to 1.465.5.

0.48.0 - April 23, 2026

Added

  • Context window usage details in chat, including a token breakdown for system instructions, messages, attached files, and tool results.
  • Auto Compress setting to compact conversation history and save context tokens.
  • Install flow for Xcode's built-in MCP server from settings.

Changed

  • Custom agents and the Auto model are now generally available.
  • Removed support for macOS 12.
  • Improved UI for model picker tooltips.

Fixed

  • Fixed an issue where GPT-5.4 requests could return a 400 error.
  • Fixed an issue where the MCP allowlist did not work correctly.

0.47.0 - February 4, 2026

Added

  • Auto approval for MCP tools, sensitive files, and terminal commands.
  • MCP registry and allowlist are now available (requires editor preview feature flag).

Changed

  • Improved UI for MCP tool call details.
  • Improved UI for working set header.

Fixed

  • Fixed toolcall layout issue.
  • Fixed NES display issue.
  • Fixed error message for SSL certificate errors.
  • Fixed several performance issues.

0.46.0 - December 11, 2025

Added

  • MCP: Support delete MCP server from list.

Changed

  • Refine built-in tools layout and displaying error and output details.
  • Better support toolCallingLoop continue operation for subagent turn.
  • Update feedback forum link.
  • Update client-side MCP restore and persist.
  • Adopt NES notification.

Fixed

  • Disable auto focus for fix error window.
  • Fixed an issue where no file change was made when insert_edit_into_file tool succeeds.
  • Fixed an issue where insert edit was applied to the incorrect file.
  • Fixed model picker to use model id instead of model family.
  • Fixed read_file, read_directory tool randomly failing.

0.45.0 - November 14, 2025

Added

  • New models: GPT-5.1, GPT-5.1-Codex, GPT-5.1-Codex-Mini, Claude Haiku 4.5, and Auto (preview).
  • Added support for custom agents (preview).
  • Introduced the built-in Plan agent (preview).
  • Added support for subagent execution (preview).
  • Added support for Next Edit Suggestions (preview).

Changed

  • MCP servers now support dynamic OAuth setup for third-party authentication providers.
  • Added a setting to configure the maximum number of tool requests allowed.

Fixed

  • Fixed an issue that the terminal view in Agent conversation was clipped
  • Fixed an issue that the Chat panel failed to recognize newly created workspaces.

0.44.0 - October 15, 2025

Added

  • Added support for new models in Chat: Grok Code Fast 1, Claude Sonnet 4.5, Claude Opus 4, Claude Opus 4.1 and GPT-5 mini.
  • Added support for restoring to a saved checkpoint snapshot.
  • Added support for tool selection in agent mode.
  • Added the ability to adjust the chat panel font size.
  • Added the ability to edit a previous chat message and resend it.
  • Introduced a new setting to disable the Copilot “Fix Error” button.
  • Added support for custom instructions in the Code Review feature.

Changed

  • Switched authentication to a new OAuth app "GitHub Copilot IDE Plugin".
  • Updated the chat layout to a messenger-style conversation view (user messages on the right, responses on the left).
  • Now shows a clearer, more user-friendly message when Copilot finishes responding.
  • Added support for skipping a tool call without ending the conversation.

Fixed

  • Fixed a command injection vulnerability when opening referenced chat files.
  • Resolved display issues in the chat view on macOS 26.

0.43.0 - September 4, 2025

Fixed

  • Cannot type non-Latin characters in the chat input field.

0.42.0 - September 3, 2025

Added

  • Support for Bring Your Own Keys (BYOK) with model providers including Azure, OpenAI, Anthropic, Gemini, Groq, and OpenRouter. See BYOK.md.
  • Use the current selection as chat context.
  • Add folders as chat context.
  • Shortcut to quickly fix errors in Xcode.
  • Support for custom instruction files at .github/instructions/*.instructions.md. See CustomInstructions.md.
  • Support for prompt files at .github/prompts/*.prompt.md. See PromptFiles.md.
  • Use ↑/↓ keys to reuse previous chat context in the chat view.

Changed

  • Default chat mode is now set to “Agent”.

Fixed

  • Cannot copy url from Safari browser to chat view.

0.41.0 - August 14, 2025

Added

  • Code review feature.
  • Chat: Support for new model GPT-5.
  • Agent mode: Added support for new tool to read web URL contents.
  • Support disabling MCP when it's disabled by policy.
  • Support for opening MCP logs directly from the MCP settings page.
  • OAuth support for remote GitHub MCP server.

Changed

  • Performance: Improved instant-apply speed for edit_file tool.

Fixed

  • Chat Agent repeatedly reverts its own changes when editing the same file.
  • Performance: Avoid chat panel being stuck when sending a large text for chat.

0.40.0 - July 24, 2025

Added

  • Support disabling Agent mode when it's disabled by policy.

0.39.0 - July 23, 2025

Fixed

  • Performance: Fixed a freezing issue in 'Add Context' view when opening large projects.
  • Login failed due to insufficient permissions on the .config folder.
  • Fixed an issue that setting changes like proxy config did not take effect.
  • Increased the timeout for ask mode to prevent response failures due to timeout.

0.38.0 - June 30, 2025

Added

  • Support for Claude 4 in Chat.
  • Support for Copilot Vision (image attachments).
  • Support for remote MCP servers.

Changed

  • Automatically suggests a title for conversations created in agent mode.
  • Improved restoration of MCP tool status after Copilot restarts.
  • Reduced duplication of MCP server instances.

Fixed

  • Switching accounts now correctly refreshes the auth token and models.
  • Fixed file create/edit issues in agent mode.

0.37.0 - June 18, 2025

Added

  • Advanced settings: Added option to configure Custom Instructions for GitHub Copilot during chat sessions.
  • Advanced settings: Added option to keep the chat window automatically attached to Xcode.

Changed

  • Enabled support for dragging-and-dropping files into the chat panel to provide context.

Fixed

  • "Add Context" menu didn’t show files in workspaces organized with Xcode’s group feature.
  • Chat didn’t respond when the workspace was in a system folder (like Desktop, Downloads, or Documents) and access permission hadn’t been granted.

0.36.0 - June 4, 2025

Added

  • Introduced a new chat setting "Response Language" under Advanced settings to customize the natural language used in chat replies.
  • Enabled support for custom instructions defined in .github/copilot-instructions.md within your workspace.
  • Added support for premium request handling.

Fixed

  • Performance: Improved UI responsiveness by lazily restoring chat history.
  • Performance: Fixed lagging issue when pasting large text into the chat input.
  • Performance: Improved project indexing performance.
  • Don't trigger / (slash) commands when pasting a file path into the chat input.
  • Adjusted terminal text styling to align with Xcode’s theme.

0.35.0 - May 19, 2025

Added

  • Launched Agent Mode. Copilot will automatically use multiple requests to edit files, run terminal commands, and fix errors.
  • Introduced Model Context Protocol (MCP) support in Agent Mode, allowing you to configure MCP tools to extend capabilities.

Changed

  • Added a button to enable/disable referencing current file in conversations
  • Added an animated progress icon in the response section
  • Refined onboarding experience with updated instruction screens and welcome views
  • Improved conversation reliability with extended timeout limits for agent requests

Fixed

  • Addressed critical error handling issues in core functionality
  • Resolved UI inconsistencies with chat interface padding adjustments
  • Implemented custom certificate handling using system environment variables NODE_EXTRA_CA_CERTS and NODE_TLS_REJECT_UNAUTHORIZED, fixing network access issues

0.34.0 - April 29, 2025

Added

  • Added support for new models in Chat: OpenAI GPT-4.1, o3 and o4-mini, Gemini 2.5 Pro

Changed

  • Switched default model to GPT-4.1 for new installations
  • Enhanced model selection interface

Fixed

  • Resolved critical error handling issues

0.33.0 - April 17, 2025

Added

  • Added support for new models in Chat: Claude 3.7 Sonnet and GPT 4.5
  • Implemented @workspace context feature allowing questions about the entire codebase in Copilot Chat

Changed

  • Simplified access to Copilot Chat from the Copilot for Xcode app with a single click
  • Enhanced instructions for granting background permissions

Fixed

  • Resolved false alarms for sign-in and free plan limit notifications
  • Improved app launch performance
  • Fixed workspace and context update issues

0.32.0 - March 11, 2025 (General Availability)

Added

  • Implemented model picker for selecting LLM model in chat
  • Introduced new /releaseNotes slash command for accessing release information

Changed

  • Improved focus handling with automatic switching between chat text field and file search bar
  • Enhanced keyboard navigation support for file picker in chat context
  • Refined instructions for granting accessibility and extension permissions
  • Enhanced accessibility compliance for the chat window
  • Redesigned notification and status bar menu styles for better usability

Fixed

  • Resolved compatibility issues with macOS 12/13/14
  • Fixed handling of invalid workspace switch event '/'
  • Corrected chat attachment file picker to respect workspace scope
  • Improved icon display consistency across different themes
  • Added support for previously unsupported file types (.md, .txt) in attachments
  • Adjusted incorrect margins in chat window UI

0.31.0 - February 11, 2025 (Public Preview)

Added

  • Added Copilot Chat support
  • Added GitHub Freeplan support
  • Implemented conversation and chat history management across multiple Xcode instances
  • Introduced multi-file context support for comprehensive code understanding
  • Added slash commands for specialized operations

File: CODE_OF_CONDUCT.md

Contributor Covenant Code of Conduct

Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

Our Standards

Examples of behavior that contributes to creating a positive environment
include:

  • Using welcoming and inclusive language
  • Being respectful of differing viewpoints and experiences
  • Gracefully accepting constructive criticism
  • Focusing on what is best for the community
  • Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

  • The use of sexualized language or imagery and unwelcome sexual attention or
    advances
  • Trolling, insulting/derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others' private information, such as a physical or electronic
    address, without explicit permission
  • Other conduct which could reasonably be considered inappropriate in a
    professional setting

Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
available at http://contributor-covenant.org/version/1/4


File: DEVELOPMENT.md

Development

Prerequisites

Requires Node installed and npm available on your system path, e.g.

sh
sudo ln -s `which npm` /usr/local/bin
sudo ln -s `which node` /usr/local/bin

For context, this is used by an Xcode run script as part of the build. Run
scripts use a very limited path to resolve commands.

Targets

Copilot for Xcode

Copilot for Xcode is the host app containing both the XPCService and the editor extension. It provides the settings UI.

EditorExtension

As its name suggests, the Xcode source editor extension. Its sole purpose is to forward editor content to the XPCService for processing, and update the editor with the returned content. Due to the sandboxing requirements for editor extensions, it has to communicate with a trusted, non-sandboxed XPCService (CommunicationBridge and ExtensionService) to bypass the limitations. The XPCService service name must be included in the com.apple.security.temporary-exception.mach-lookup.global-name entitlements.

ExtensionService

The ExtensionService is a program that operates in the background. All features are implemented in this target.

CommunicationBridge

It's responsible for maintaining the communication between the Copilot for Xcode/EditorExtension and ExtensionService.

Core and Tool

Most of the logics are implemented inside the package Core and Tool.

  • The Service contains the implementations of the ExtensionService target.
  • The HostApp contains the implementations of the Copilot for Xcode target.

Building and Archiving the App

  1. Update the xcconfig files, bridgeLaunchAgent.plist, and Tool/Configs/Configurations.swift.
  2. Build or archive the Copilot for Xcode target.
  3. If Xcode complains that the pro package doesn't exist, please remove the package from the project.

Testing Source Editor Extension

Just run both the ExtensionService, CommunicationBridge and the EditorExtension Target. Read Testing Your Source Editor Extension for more details.

Local Build

To build the application locally, follow these steps:

  1. Navigate to the Script directory and run the build scripts:

    sh
    cd ./Script
    sh ./uninstall-app.sh    # Remove any previous installation
    rm -rf ../build          # Clean the build directory
    sh ./localbuild-app.sh   # Build a fresh copy of the app
  2. After successful build, the application will be available in the build directory. Copy GitHub Copilot for Xcode.app to your Applications folder to test it locally.

SwiftUI Previews

Looks like SwiftUI Previews are not very happy with Objective-C packages when running with app targets. To use previews, please switch schemes to the package product targets.

Unit Tests

To run unit tests, just run test from the Copilot for Xcode target.

For new tests, they should be added to the TestPlan.xctestplan.

Code Style

We use SwiftFormat to format the code.

The source code mostly follows the Ray Wenderlich Style Guide very closely with the following exception:

  • Use the Xcode default of 4 spaces for indentation.

App Versioning

The app version and all targets' version in controlled by Version.xcconfig.


File: LICENSE.txt

MIT License

Copyright (c) 2024 GitHub

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


File: marketplace.json

{
"name": "GitHub Copilot",
"description": "GitHub's AI pair programmer",
"publisher": {
"name": "GitHub",
"url": "https://github.com/github",
"verified": true
},
"repository": "https://github.com/github/CopilotForXcode",
"license": "proprietary",
"plugins": [
{
"path": ".agent-plugin",
"type": "acp-agent"
}
]
}


File: ReleaseNotes.md

GitHub Copilot for Xcode 0.51.0

🚀 Highlights

  • Kimi K3 Support: Added compatibility with Kimi K3 through an updated Copilot language server.

💪 Changes

  • Added Agent Client Protocol (ACP) plugin metadata for GitHub Copilot, including marketplace discovery and installation configuration.
  • Fixed model pricing tooltips so they correctly display token pricing from the latest model metadata.

File: SECURITY.md

Thanks for helping make GitHub safe for everyone.

Security

GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as GitHub.

Even though open source repositories are outside of the scope of our bug bounty program and therefore not eligible for bounty rewards, we will ensure that your finding gets passed along to the appropriate maintainers for remediation.

Reporting Security Issues

If you believe you have found a security vulnerability in any GitHub-owned repository, please report it to us through coordinated disclosure.

Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.

Instead, please send an email to opensource-security[@]github.com.

Please include as much of the information listed below as you can to help us better understand and resolve the issue:

  • The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
  • Full paths of source file(s) related to the manifestation of the issue
  • The location of the affected source code (tag/branch/commit or direct URL)
  • Any special configuration required to reproduce the issue
  • Step-by-step instructions to reproduce the issue
  • Proof-of-concept or exploit code (if possible)
  • Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

Policy

See GitHub's Safe Harbor Policy


File: SUPPORT.md

Support

How to get help

We’d love to get your help in making GitHub Copilot better! If you have
feedback or encounter any problems, please reach out on our Feedback
forum
.

GitHub Copilot for Xcode is under active development and maintained by GitHub
staff. We will do our best to respond to support, feature requests, and
community questions in a timely manner.

GitHub Support Policy

GitHub Copilot for Xcode is considered a Beta Preview under the GitHub Terms of
Service
.

Once GitHub Copilot for Xcode is generally available, it will be subject to the
GitHub Additional Product
Terms
.


File: TROUBLESHOOTING.md

Troubleshooting for Copilot for Xcode

If you are having trouble with Copilot for Xcode follow these steps to resolve
common issues:

  1. Check for updates and restart Xcode. Ensure that Copilot for Xcode has the
    latest release
    by clicking Check for Updates in the settings or under the status menu. After
    updating, restart Xcode.

  2. Ensure that all required permissions are granted. GitHub Copilot for Xcode app requires these permissions to function properly:

    Please note that GitHub Copilot for Xcode may not work properly if any necessary permissions are missing.

  3. Need more help? If these steps don't resolve the issue, please open an
    issue
    . Make
    sure to include logs and any other relevant information.

Extension Permission

GitHub Copilot for Xcode is an Xcode Source Editor extension and requires the
extension to be enabled. In the Copilot for Xcode settings, clicking Extension Permission will open the System Settings to the Extensions page where GitHub Copilot can be enabled under Xcode Source Editor.

Or you can navigate to the permission manually depending on your OS version:

macOS Location
26 System Settings > General > Login Items & Extensions > Extensions > By Category > Xcode Source Editor
15 System Settings > General > Login Items & Extensions > Extensions > Xcode Source Editor
13 & 14 System Settings > Privacy & Security > Extensions > Xcode Source Editor
12 System Preferences > Extensions

Accessibility Permission

GitHub Copilot for Xcode requires the accessibility permission to receive
real-time updates from the active Xcode editor. The XcodeKit
API

enabled by the Xcode Source Editor extension permission only provides
information when manually triggered by the user. In order to generate
suggestions as you type, the accessibility permission is used to read the
Xcode editor content in real-time.

The accessibility permission is also used to accept suggestions when tab is
pressed.

The accessibility permission is not used to read or write to any
applications besides Xcode. There are no granular options for the permission,
but you can audit the usage in this repository: search for CGEvent and AX*.

Enable in System Settings under Privacy & Security > Accessibility >
GitHub Copilot for Xcode Extension and turn on the toggle.

Background Permission

GitHub Copilot for Xcode requires background permission to connect with the host app. This permission ensures proper communication between the components of GitHub Copilot for Xcode, which is essential for its functionality in Xcode.

This permission is typically granted automatically when you first launch GitHub Copilot for Xcode. However, if you encounter connection issues, alerts, or errors as follows:

Please ensure that this permission is enabled. You can manually navigate to the background permission setting based on your macOS version:

macOS Location
26 System Settings > General > Login Items & Extensions > App Background Activity
15 System Settings > General > Login Items & Extensions > Allow in the Background
13 & 14 System Settings > General > Login Items > Allow in the Background

Ensure that "GitHub Copilot for Xcode" is enabled in the list of allowed background items. Without this permission, the extension may not be able to properly communicate with the host app, which can result in inconsistent behavior or reduced functionality.

Files & Folders Permission

GitHub Copilot for Xcode needs permission to read your project’s files so it can:

  • Use actual file contents as contextual grounding when you ask questions in Ask and Agent mode (instead of generic language-only answers)
  • Safely apply or preview multi-file edits in Agent modes (e.g. refactors, adding tests, updating related types)
  • Improve precision by leveraging nearby code, patterns, and naming conventions

When first prompted macOS shows a dialog asking to allow access to folders. Click "Allow".
If you clicked "Don't Allow" or nothing appears:

macOS Location
13 & 14 & 15 & 26 System Settings > Privacy & Security > Files and Folders
12 System Preferences > Security & Privacy > Privacy > Files and Folders

In the list, expand GitHub Copilot for Xcode and enable the toggles for any relevant locations (e.g. “Documents” if your repositories live there). If your code is elsewhere (e.g. ~/Developer), macOS may instead prompt dynamically the next time Copilot tries to read those paths—accept when prompted.

Screen & System Audio Recording Permission (Optional)

This permission is only needed if you choose to use Copilot Vision (screen-based context capture).

Copilot does NOT require screen recording for standard inline suggestions, chat, or agent operations.

This permission is typically granted automatically when you first use Copilot Vision and try to capture screen in GitHub Copilot for Xcode. You can also manually navigate to the background permission setting based on your macOS version:

macOS Location
14 & 15 & 26 System Settings > Privacy & Security > Screen & System Audio Recording
13 System Settings > Privacy & Security > Screen Recording
12 System Preferences > Security & Privacy > Privacy > Screen Recording

Check GitHub Copilot for Xcode and restart the app.

Logs

Logs can be found in ~/Library/Logs/GitHubCopilot/. The most recent log file
is:

text
~/Library/Logs/GitHubCopilot/github-copilot-for-xcode.log

To enable verbose logging, open the GitHub Copilot for Xcode settings and enable
Verbose Logging in the Advanced tab. After enabling verbose logging, restart
Copilot for Xcode for the change to take effect.


File: Copilot for Xcode/Assets.xcassets/Contents.json

{
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/AccentColor.colorset/Contents.json

{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/AppIcon.appiconset/Contents.json

{
"images" : [
{
"filename" : "CopilotforXcode-Icon@16w_1x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : "CopilotforXcode-Icon@16w_2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"filename" : "CopilotforXcode-Icon@32w_1x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"filename" : "CopilotforXcode-Icon@32w_2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"filename" : "CopilotforXcode-Icon@128w_1x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"filename" : "CopilotforXcode-Icon@128w_2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"filename" : "CopilotforXcode-Icon@256w_1x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"filename" : "CopilotforXcode-Icon@256w_2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"filename" : "CopilotforXcode-Icon@512w_1x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"filename" : "CopilotforXcode-Icon@512w_2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/BackgroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "40",
"green" : "23",
"red" : "25"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/BackgroundColorTop.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "54",
"green" : "25",
"red" : "30"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/ButtonBackgroundColorDefault.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x46",
"green" : "0x24",
"red" : "0x2C"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/ButtonBackgroundColorPressed.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.275",
"green" : "0.141",
"red" : "0.290"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/ChatIcon.imageset/Contents.json

{
"images" : [
{
"filename" : "ChatIcon.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: Copilot for Xcode/Assets.xcassets/Color.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/CopilotError.imageset/Contents.json

{
"images" : [
{
"filename" : "CopilotError.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: Copilot for Xcode/Assets.xcassets/CopilotIssue.imageset/Contents.json

{
"images" : [
{
"filename" : "CopilotIssue.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: Copilot for Xcode/Assets.xcassets/CopilotLogo.imageset/Contents.json

{
"images" : [
{
"filename" : "copilot.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: Copilot for Xcode/Assets.xcassets/DangerBackgroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0xF4",
"green" : "0xF3",
"red" : "0xFD"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/DangerForegroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x1C",
"green" : "0x0E",
"red" : "0xB1"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/DangerStrokeColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xB2",
"green" : "0xAC",
"red" : "0xEE"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/DescriptionForegroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x9D",
"green" : "0x9D",
"red" : "0x9D"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/GitHubMark.imageset/Contents.json

{
"images" : [
{
"filename" : "Icon.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties": {
"preserves-vector-representation": true
}
}


File: Copilot for Xcode/Assets.xcassets/GroupBoxBackgroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.920",
"green" : "0.910",
"red" : "0.910"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.250",
"green" : "0.250",
"red" : "0.250"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/GroupBoxStrokeColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.900",
"green" : "0.900",
"red" : "0.900"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.080",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/Model.imageset/Contents.json

{
"images" : [
{
"filename" : "ai-model-16.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: Copilot for Xcode/Assets.xcassets/QuaternarySystemFillColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF7",
"green" : "0xF7",
"red" : "0xF7"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x09",
"green" : "0x09",
"red" : "0x09"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/QuinarySystemFillColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFB",
"green" : "0xFB",
"red" : "0xFB"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x07",
"green" : "0x07",
"red" : "0x07"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/SecondarySystemFillColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xE6",
"green" : "0xE6",
"red" : "0xE6"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x14",
"green" : "0x14",
"red" : "0x14"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/SwiftIcon.imageset/Contents.json

{
"images" : [
{
"filename" : "file_type_swift.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: Copilot for Xcode/Assets.xcassets/TertiarySystemFillColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF2",
"green" : "0xF2",
"red" : "0xF2"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x0D",
"green" : "0x0D",
"red" : "0x0D"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/TextLinkForegroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0x94",
"red" : "0x37"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/ToolTitleHighlightBgColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.250",
"green" : "0.250",
"red" : "0.250"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/WarningBackgroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF5",
"green" : "0xF9",
"red" : "0xFF"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/WarningForegroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x07",
"green" : "0x37",
"red" : "0x8A"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Copilot for Xcode/Assets.xcassets/WarningStrokeColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xB4",
"green" : "0xCF",
"red" : "0xFD"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"localizable" : true
}
}


File: Copilot for Xcode/Preview Content/Preview Assets.xcassets/Contents.json

{
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Docs/BYOK.md

Adding your API Keys with GitHub Copilot - Bring Your Own Key(BYOK)

Copilot for Xcode supports Bring Your Own Key (BYOK) integration with multiple model providers. You can bring your own API keys to integrate with your preferred model provider, giving you full control and flexibility.

Supported providers include:

  • Anthropic
  • Azure
  • Gemini
  • Groq
  • OpenAI
  • OpenRouter

Configuration Steps

To configure BYOK in Copilot for Xcode:

  • Open the Copilot chat and select “Manage Models” from the Model picker.
  • Choose your preferred AI provider (e.g., Anthropic, OpenAI, and Azure).
  • Enter the required provider-specific details, such as the API key and endpoint URL (if applicable).
Model Provider How to get the API Keys
Anthropic Sign in to the Anthropic Console to generate and retrieve your API key.
Gemini (Google) Sign in to the Google Cloud Console to generate and retrieve your API key.
Groq Sign in to the Groq Console to generate and retrieve your API key.
OpenAI Sign in to the OpenAI’s Platform to generate and retrieve your API key.
OpenRouter Sign in to the OpenRouter’s API Key Settings to generate your API key.
Azure Sign in to the Azure AI Foundry, go to your Deployments, and retrieve your API key and Endpoint after the deployment is complete. Ensure the model name you enter matches the one you deployed, as shown on the Details page.
  • Click "Add" button to continue.
  • Once saved, it will list available AI models in the Models setting page. You can enable the models you intend to use with GitHub Copilot.

[!NOTE]
Please keep your API key confidential and never share it publicly for safety.


File: Docs/CustomInstructions.md

Use custom instructions in GitHub Copilot for Xcode

Custom instructions enable you to define common guidelines and rules that automatically influence how AI generates code and handles other development tasks. Instead of manually including context in every chat prompt, specify custom instructions in a Markdown file to ensure consistent AI responses that align with your coding practices and project requirements.

You can configure custom instructions to apply automatically to all chat requests or to specific files only. Alternatively, you can manually attach custom instructions to a specific chat prompt.

[!NOTE]
Custom instructions are not taken into account for code completions as you type in the editor.

Type of instructions files

GitHub Copilot for Xcode supports two types of Markdown-based instructions files:

  • A single .github/copilot-instructions.md file

    • Automatically applies to all chat requests in the workspace
    • Stored within the workspace or global
  • One or more .instructions.md files

    • Created for specific tasks or files
    • Use applyTo frontmatter to define what files the instructions should be applied to
    • Stored in the workspace

Whitespace between instructions is ignored, so the instructions can be written as a single paragraph, each on a new line, or separated by blank lines for legibility.

Reference specific context, such as files or URLs, in your instructions by using Markdown links.

Custom instructions examples

The following examples demonstrate how to use custom instructions. For more community-contributed examples, see the Awesome Copilot repository.

Example: General coding guidelines

markdown
---
applyTo: "**"
---
# Project general coding standards

## Naming Conventions
- Use PascalCase for component names, interfaces, and type aliases
- Use camelCase for variables, functions, and methods
- Use ALL_CAPS for constants

## Error Handling
- Use try/catch blocks for async operations
- Always log errors with contextual information

Example: Language-specific coding guidelines

Notice how these instructions reference the general coding guidelines file. You can separate the instructions into multiple files to keep them organized and focused on specific topics.

markdown
---
applyTo: "**/*.swift"
---
# Project coding standards for Swift

Apply the [general coding guidelines](./general-coding.instructions.md) to all code.

## Swift Guidelines
- Use Swift for all new code
- Follow functional programming principles where possible
- Use interfaces for data structures and type definitions
- Use optional chaining (?.) and nullish coalescing (??) operators

Example: Documentation writing guidelines

You can create instructions files for different types of tasks, including non-development activities like writing documentation.

markdown
---
applyTo: "docs/**/*.md"
---
# Project documentation writing guidelines

## General Guidelines
- Write clear and concise documentation.
- Use consistent terminology and style.
- Include code examples where applicable.

## Grammar
* Use present tense verbs (is, open) instead of past tense (was, opened).
* Write factual statements and direct commands. Avoid hypotheticals like "could" or "would".
* Use active voice where the subject performs the action.
* Write in second person (you) to speak directly to readers.

## Markdown Guidelines
- Use headings to organize content.
- Use bullet points for lists.
- Include links to related resources.
- Use code blocks for code snippets.

Use a `.github/copilot-instructions.md` file

Define your custom instructions in a single .github/copilot-instructions.md Markdown file in the root of your workspace or globally. Copilot applies the instructions in this file automatically to all chat requests within this workspace.

To create a .github/copilot-instructions.md file:

  1. Open Settings > Advanced > Chat Settings
  2. To the right of "Copilot Instructions", click Current Workspace or Global to choose whether the custom instructions apply to the current workspace or all workspaces.
  3. Describe your instructions by using natural language and in Markdown format.

[!NOTE]
GitHub Copilot provides cross-platform support for the .github/copilot-instructions.md configuration file. This file is automatically detected and applied in VSCode, Visual Studio, 3rd-party IDEs, and GitHub.com.

  • Workspace instructions files: are only available within the workspace.
  • Global: is available across multiple workspaces and is stored in the preferences.

For more information, you can read the How-to docs.

Use `.instructions.md` files

Instead of using a single instructions file that applies to all chat requests, you can create multiple .instructions.md files that apply to specific file types or tasks. For example, you can create instructions files for different programming languages, frameworks, or project types.

By using the applyTo frontmatter property in the instructions file header, you can specify a glob pattern to define which files the instructions should be applied to automatically. Instructions files are used when creating or modifying files and are typically not applied for read operations.

Alternatively, you can manually attach an instructions file to a specific chat prompt by using the file picker.

Instructions file format

Instructions files use the .instructions.md extension and have this structure:

  • Header (optional): YAML frontmatter

    • description: Description shown on hover in Chat view
    • applyTo: Glob pattern for automatic application (use ** for all files)
  • Body: Instructions in Markdown format

Example:

markdown
---
applyTo: "**/*.swift"
---
# Project coding standards for Swift
- Follow the Swift official guide for Swift.
- Always prioritize readability and clarity.
- Write clear and concise comments for each function.
- Ensure functions have descriptive names and include type hints.
- Maintain proper indentation (use 4 spaces for each level of indentation).

Create an instructions file

  1. Open Settings > Advanced > Chat Settings

  2. To the right of "Custom Instructions", click Create to create a new *.instructions.md file.

  3. Enter a name for your instructions file.

  4. Author the custom instructions by using Markdown formatting.

    Specify the applyTo metadata property in the header to configure when the instructions should be applied automatically. For example, you can specify applyTo: "**/*.swift" to apply the instructions only to Swift files.

    To reference additional workspace files, use Markdown links ([App](../App.swift)).

To modify or view an existing instructions file, click Open Instructions Folder to open the instructions file directory.

Tips for defining custom instructions

  • Keep your instructions short and self-contained. Each instruction should be a single, simple statement. If you need to provide multiple pieces of information, use multiple instructions.

  • For task or language-specific instructions, use multiple *.instructions.md files per topic and apply them selectively by using the applyTo property.

  • Store project-specific instructions in your workspace to share them with other team members and include them in your version control.

  • Reuse and reference instructions files in your prompt files to keep them clean and focused, and to avoid duplicating instructions.


File: Docs/PromptFiles.md

Use prompt files in GitHub Copilot for Xcode

Prompt files are Markdown files that define reusable prompts for common development tasks like generating code, performing code reviews, or scaffolding project components. They are standalone prompts that you can run directly in chat, enabling the creation of a library of standardized development workflows.

They can include task-specific guidelines or reference custom instructions to ensure consistent execution. Unlike custom instructions that apply to all requests, prompt files are triggered on-demand for specific tasks.

[!NOTE]
Prompt files are currently experimental and may change in future releases.

GitHub Copilot for Xcode currently supports workspace prompt files, which are only available within the workspace and are stored in the .github/prompts folder of the workspace.

Prompt file examples

The following examples demonstrate how to use prompt files. For more community-contributed examples, see the Awesome Copilot repository.

Example: generate a Swift form component

markdown
---
description: 'Generate a new Swift sheet component'
---
Your goal is to generate a new Swift sheet component.

Ask for the sheet name and fields if not provided.

Requirements for the form:
* Use sheet design system components: [design-system/Sheet.md](../docs/design-system/Sheet.md)
* Always define Swift types for your sheet data
* Create previews for the component

Prompt file format

Prompt files are Markdown files and use the .prompt.md extension and have this structure:

  • Header (optional): YAML frontmatter

    • description: Short description of the prompt
  • Body: Prompt instructions in Markdown format

    Reference other workspace files, prompt files, or instruction files by using Markdown links. Use relative paths to reference these files, and ensure that the paths are correct based on the location of the prompt file.

Create a prompt file

  1. Open Settings > Advanced > Chat Settings

  2. To the right of "Prompt Files", click Create to create a new *.prompt.md file.

  3. Enter a name for your prompt file.

  4. Author the chat prompt by using Markdown formatting.

    Within a prompt file, reference additional workspace files as Markdown links ([App](../App.swift)).

    You can also reference other .prompt.md files to create a hierarchy of prompts. You can also reference instructions files in the same way.

To modify or view an existing prompt file, click Open Prompts Folder to open the prompts file directory.

Use a prompt file in chat

In the Chat view, type / followed by the prompt file name in the chat input field.

This option enables you to pass additional information in the chat input field. For example, /create-swift-sheet.

Tips for defining prompt files

  • Clearly describe what the prompt should accomplish and what output format is expected.
  • Provide examples of the expected input and output to guide the AI's responses.
  • Use Markdown links to reference custom instructions rather than duplicating guidelines in each prompt.

File: ExtensionService/Assets.xcassets/Contents.json

{
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/AccentColor.colorset/Contents.json

{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/Agent.imageset/Contents.json

{
"images" : [
{
"filename" : "Agent.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: ExtensionService/Assets.xcassets/BannerBackgroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0xFE",
"green" : "0xF8",
"red" : "0xF5"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0x4D",
"green" : "0x32",
"red" : "0x25"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/BannerBorderColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0xFC",
"green" : "0xD6",
"red" : "0xC2"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0x8F",
"green" : "0x53",
"red" : "0x35"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/ChatWindowBackgroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFB",
"green" : "0xFB",
"red" : "0xFB"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x24",
"green" : "0x24",
"red" : "0x24"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/ChatWindowEditorBackgroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x30",
"green" : "0x2A",
"red" : "0x29"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/CodeBlockInsertIcon.imageset/Contents.json

{
"images" : [
{
"filename" : "light1x.svg",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "dark1x.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: ExtensionService/Assets.xcassets/codeReview.imageset/Contents.json

{
"images" : [
{
"filename" : "code-review-light.svg",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "code-review-dark.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: ExtensionService/Assets.xcassets/Colors/Contents.json

{
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/Colors/AgentToolStatusDividerColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF0",
"green" : "0xEC",
"red" : "0xEB"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"platform" : "universal",
"reference" : "secondaryLabelColor"
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/Colors/AgentToolStatusOutlineColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xE5",
"green" : "0xE1",
"red" : "0xDF"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"platform" : "universal",
"reference" : "secondaryLabelColor"
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/DarkBlue.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "248",
"green" : "189",
"red" : "160"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "85",
"green" : "45",
"red" : "25"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/DiffEditor.imageset/Contents.json

{
"images" : [
{
"filename" : "Editor.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: ExtensionService/Assets.xcassets/Discard.imageset/Contents.json

{
"images" : [
{
"filename" : "discard.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: ExtensionService/Assets.xcassets/editor.focusedStackFrameHighlightBackground.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "202",
"green" : "223",
"red" : "203"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "57",
"green" : "77",
"red" : "57"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/editorOverviewRuler.inlineChatRemoved.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "211",
"green" : "214",
"red" : "242"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "25",
"green" : "25",
"red" : "55"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/EditSparkle.imageset/Contents.json

{
"images" : [
{
"filename" : "edit-sparkle.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: ExtensionService/Assets.xcassets/Eye.imageset/Contents.json

{
"images" : [
{
"filename" : "eye.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: ExtensionService/Assets.xcassets/EyeClosed.imageset/Contents.json

{
"images" : [
{
"filename" : "eye-closed.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: ExtensionService/Assets.xcassets/FixError.imageset/Contents.json

{
"images" : [
{
"filename" : "FixErrorLight.svg",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "FixError.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: ExtensionService/Assets.xcassets/FixErrorBackgroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "48",
"green" : "59",
"red" : "255"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "58",
"green" : "69",
"red" : "255"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/gitDecoration.addedResourceForeground.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "52",
"green" : "138",
"red" : "56"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "52",
"green" : "138",
"red" : "56"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/gitDecoration.deletedResourceForeground.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "57",
"green" : "78",
"red" : "199"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "57",
"green" : "78",
"red" : "199"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/Icons/Contents.json

{
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/Icons/chevron.down.imageset/Contents.json

{
"images" : [
{
"filename" : "chevron-down.svg",
"idiom" : "mac"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"localizable" : true,
"preserves-vector-representation" : true
}
}


File: ExtensionService/Assets.xcassets/IconStrokeColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0x7E",
"green" : "0x70",
"red" : "0x6C"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0xD6",
"green" : "0xD0",
"red" : "0xCE"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/ItemSelectedColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "248",
"green" : "154",
"red" : "98"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "194",
"green" : "108",
"red" : "55"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/LightBlue.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xE2",
"red" : "0xD4"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "110",
"green" : "67",
"red" : "46"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/LightBluePrimary.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF0",
"green" : "0x74",
"red" : "0x35"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/LightGreen.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "60",
"green" : "138",
"red" : "32"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x3C",
"green" : "0x8A",
"red" : "0x20"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/MenuBarErrorIcon.imageset/Contents.json

{
"images" : [
{
"filename" : "Status=error, Mode=dark.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: ExtensionService/Assets.xcassets/MenuBarIcon.imageset/Contents.json

{
"images" : [
{
"filename" : "Status=active, Mode=dark.svg",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "Status=active, Mode=white.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: ExtensionService/Assets.xcassets/MenuBarInactiveIcon.imageset/Contents.json

{
"images" : [
{
"filename" : "Status=inactive, Mode=dark.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: ExtensionService/Assets.xcassets/MenuBarWarningIcon.imageset/Contents.json

{
"images" : [
{
"filename" : "Status=warning, Mode=dark.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: ExtensionService/Assets.xcassets/NESShadowColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.180",
"blue" : "0x26",
"green" : "0x1F",
"red" : "0x1B"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/Sparkle.imageset/Contents.json

{
"images" : [
{
"filename" : "sparkle.svg",
"idiom" : "mac"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "sparkle_dark.svg",
"idiom" : "mac"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: ExtensionService/Assets.xcassets/SubagentTurnBackground.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.940",
"green" : "0.930",
"red" : "0.920"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.260",
"green" : "0.230",
"red" : "0.220"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/Terminal.imageset/Contents.json

{
"images" : [
{
"filename" : "terminal.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}


File: ExtensionService/Assets.xcassets/ToastActionButtonColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.080",
"blue" : "0x00",
"green" : "0x00",
"red" : "0x00"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.800",
"blue" : "0x3C",
"green" : "0x3C",
"red" : "0x3C"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/ToastBackgroundColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF7",
"green" : "0xF7",
"red" : "0xF7"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x23",
"green" : "0x23",
"red" : "0x23"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/ToastDismissButtonColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.500",
"green" : "0.500",
"red" : "0.500"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.800",
"green" : "0.800",
"red" : "0.800"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/ToastStrokeColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.550",
"blue" : "0xC0",
"green" : "0xC0",
"red" : "0xC0"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x2B",
"green" : "0x2B",
"red" : "0x2B"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/WarningYellow.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0x04",
"green" : "0x7D",
"red" : "0xC2"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0x5C",
"green" : "0xC5",
"red" : "0xF2"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/WorkingSetHeaderKeepButtonColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "extended-srgb",
"components" : {
"alpha" : "1.000",
"blue" : "212",
"green" : "120",
"red" : "0"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "extended-srgb",
"components" : {
"alpha" : "1.000",
"blue" : "212",
"green" : "120",
"red" : "0"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/WorkingSetHeaderUndoButtonColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "extended-srgb",
"components" : {
"alpha" : "1.000",
"blue" : "204",
"green" : "204",
"red" : "204"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "extended-srgb",
"components" : {
"alpha" : "1.000",
"blue" : "49",
"green" : "49",
"red" : "49"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/WorkingSetItemColor.colorset/Contents.json

{
"colors" : [
{
"color" : {
"color-space" : "extended-srgb",
"components" : {
"alpha" : "0.850",
"blue" : "0",
"green" : "0",
"red" : "0"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "extended-srgb",
"components" : {
"alpha" : "0.850",
"blue" : "255",
"green" : "255",
"red" : "255"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: ExtensionService/Assets.xcassets/XcodeIcon.imageset/Contents.json

{
"images" : [
{
"filename" : "Xcode_16x16.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}


File: SandboxedClientTester/Assets.xcassets/Contents.json

{
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: SandboxedClientTester/Assets.xcassets/AccentColor.colorset/Contents.json

{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: SandboxedClientTester/Assets.xcassets/AppIcon.appiconset/Contents.json

{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: SandboxedClientTester/Preview Content/Preview Assets.xcassets/Contents.json

{
"info" : {
"author" : "xcode",
"version" : 1
}
}


File: Server/package.json

{
"name": "@github/copilot-xcode",
"version": "0.0.1",
"description": "Package for downloading @github/copilot-language-server",
"private": true,
"scripts": {
"build": "webpack"
},
"dependencies": {
"@github/copilot-language-server": "1.537.0",
"@github/copilot-language-server-darwin-arm64": "1.537.0",
"@github/copilot-language-server-darwin-x64": "1.537.0",
"@xterm/addon-fit": "^0.10.0",
"@xterm/xterm": "^5.5.0",
"monaco-editor": "0.52.2"
},
"devDependencies": {
"@types/node": "^22.15.17",
"copy-webpack-plugin": "^14.0.0",
"css-loader": "^7.1.2",
"style-loader": "^4.0.0",
"terser-webpack-plugin": "^5.4.0",
"ts-loader": "^9.5.4",
"typescript": "^5.8.3",
"webpack": "^5.99.9",
"webpack-cli": "^6.0.1"
}
}


File: Server/tsconfig.json

{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "node",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist",
"sourceMap": true,
"allowJs": true,
"checkJs": false
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}


File: .agent-plugin/plugin.json

{
"name": "GitHub Copilot",
"slug": "github-copilot",
"description": "GitHub's AI pair programmer",
"version": "0.1.0",
"author": {
"name": "GitHub",
"url": "https://github.com/github"
},
"repository": "https://github.com/github/CopilotForXcode",
"homepage": "https://github.com/features/copilot/",
"license": "proprietary",
"icon": "https://raw.githubusercontent.com/github/CopilotForXcode/main/.agent-plugin/icon.svg",
"tags": ["copilot", "github", "acp", "ai-assistant"],
"category": "ai-agent",
"platforms": ["darwin-aarch64"]
}


File: .agent-plugin/.acp.json

{
"github-copilot": {
"distribution": {
"binary": {
"darwin-aarch64": {
"archive": "https://github.com/github/copilot-cli/releases/download/v1.0.78/copilot-darwin-arm64.tar.gz",
"cmd": "./copilot",
"args": ["--acp"],
"env": {}
}
}
},
"extendedFeatures": {
"userConfigFile": {
"path": "~/.copilot/settings.json",
"description": "GitHub Copilot configuration and authentication credentials. Populated automatically by copilot login; set store_token_plaintext: true and add a token under copilot_tokens to supply credentials without an interactive session."
}
}
}
}


File: .github/dependabot.yml

version: 2
updates:

  • package-ecosystem: "github-actions"
    directory: "/"
    schedule:
    interval: "weekly"
    cooldown:
    default-days: 7

File: .github/pull_request_template.md

At the moment we are not accepting contributions to the repository.


File: .github/actions/set-xcode-version/action.yml

name: 'Composite Xcode Path'
inputs:
xcode-version:
Xcode version to use, in semver(ish)-style matching the format on the Actions runner image.
See available versions at https://github.com/actions/runner-images/blame/main/images/macos/macos-14-Readme.md#xcode
required: false
default: '26.0'
outputs:
xcode-path:
value: ${{ steps.xcode-path.outputs.xcode-path }}
runs:
using: "composite"
steps:
- name: Set XCODE_PATH env var
env:
XCODE_PATH: "/Applications/Xcode_${{ inputs.xcode-version }}.app"
run: echo "XCODE_PATH=${{ env.XCODE_PATH }}" >> $GITHUB_ENV
shell: bash
- name: Set Xcode version
run: sudo xcode-select -s ${{ env.XCODE_PATH }}
shell: bash
- name: Enable new build system integration
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
shell: bash
- name: Output Xcode path
id: xcode-path
run: echo "xcode-path=$(echo ${{ env.XCODE_PATH }})" >> $GITHUB_OUTPUT
shell: bash


File: .github/ISSUE_TEMPLATE/bug_report.md


name: Bug report about: Create a report to help us improve GitHub Copilot for Xcode

Describe the bug

Versions

  • Copilot for Xcode: [e.g. 0.25.0]
  • Xcode: [e.g. 16.0]
  • macOS: [e.g. 14.6.1]

Steps to reproduce
1.
2.

Screenshots

Logs

Additional context


File: .github/ISSUE_TEMPLATE/config.yml

blank_issues_enabled: false
contact_links:


File: .github/ISSUE_TEMPLATE/feature_request.md


name: Feature request about: Suggest an idea for GitHub Copilot for Xcode


File: .github/workflows/codeql.yml

name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '24 23 * * 1'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

text
# required to fetch internal or private CodeQL packs
  packages: read

  # only required for workflows in private repositories
  actions: read
  contents: read

strategy:
  fail-fast: false
  matrix:
    include:
    - language: actions
      build-mode: none
    - language: javascript-typescript
      build-mode: none
    - language: python
      build-mode: none
    - language: swift
      build-mode: manual
steps:
- name: Checkout repository
  uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
  uses: github/codeql-action/init@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
  with:
    languages: ${{ matrix.language }}
    build-mode: ${{ matrix.build-mode }}
    # If you wish to specify custom queries, you can do so here or in a config file.
    # By default, queries listed here will override any specified in a config file.
    # Prefix the list here with "+" to use these queries and those in the config file.

    # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
    # queries: security-extended,security-and-quality

- if: matrix.build-mode == 'manual'
  uses: ./.github/actions/set-xcode-version

- if: matrix.build-mode == 'manual'
  shell: bash
  run: |
    xcodebuild \
      -scheme 'Copilot for Xcode' \
      -quiet \
      -archivePath build/Archives/CopilotForXcode.xcarchive \
      -configuration Release \
      -skipMacroValidation \
      -disableAutomaticPackageResolution \
      -workspace 'Copilot for Xcode.xcworkspace' \
      archive \
      CODE_SIGNING_ALLOWED="NO"

- name: Perform CodeQL Analysis
  uses: github/codeql-action/analyze@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
  with:
    category: "/language:${{matrix.language}}"