| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Copilot for Xcode is an Xcode Source Editor Extension that provides Github Copilot support for Xcode. It uses the LSP provided through Copilot.vim to generate suggestions and displays them as comments.
Thanks to LSP-copilot for showing the way to interact with Copilot. And thanks to LanguageClient for the Language Server Protocol support in Swift.
The first time the commands run, the extension will ask for 2 types of permissions:
You can manually download the latest release. After updating the app, don't forget to click Restart XPC Service in the app to kill the old version and run the new version.
If you want to keep track of the new releases, you can watch this repo's releases to get notifications on updates.
About real-time suggestions
The on/off state is persisted, make sure you turn it off manually if you no longer want it.
The implementation won't feel as smooth as that of VSCode.
The magic behind it is that it will keep calling the command from the menu when you are not typing or clicking the mouse. So it will have to listen to those events, I am not sure if people like it.
Hope that next year, Apple can spend some time on Xcode Extensions.
Since the suggestions are presented as comments, they are in your code. If you are not careful enough, they can be committed to your git repo. To avoid that, I would recommend adding a pre-commit git hook to prevent this from happening.
#!/bin/sh
# Check if the commit message contains the string
if git diff --cached --diff-filter=ACMR | grep -q "/*========== Copilot Suggestion"; then
echo "Error: Commit contains Copilot suggestions generated by Copilot for Xcode."
exit 1
fiQ: The extension doesn't show up in the Editor menu.
A: Please make sure it's turned on in Settings.app > Privacy & Security > Extensions > Xcode Source Editor Extension.
Q: The extension says it can't connect to the XPC service/helper.
A: Please make sure you have set up Launch Agents, try running launchctl list | grep com.intii from the terminal, and see if com.intii.CopilotForXcode.XPCService exists. If not, check ~/Library/LaunchAgents to see if com.intii.CopilotForXcode.XPCService.plist exists. If they don't, and the button in the app fails to create them, please try to do it by hand.
Q: The extension complains that it has no access to the Accessibility API
A: Check the list in Settings.app > Privacy & Security > Accessibility. Turn the toggle on for Copilot for Xcode. If it's not on the list, add it manually.
If you have just updated the app, consider restarting XPCService in app or trying removing the Launch Agents and set it up again!
Q: I turned on real-time suggestions, but nothing happens
A: Check the list in Settings.app > Privacy & Security > Input Monitoring. Turn the toggle on for Copilot for Xcode. If it's not on the list, add it manually. After that, you may have to restart the XPC Service.
If that doesn't help, try to restart the XPC Service again.
Q: Will it work in future Xcode updates?
A: I don't know. This extension uses many tricks to do its job, and these tricks can break in the future.
| Back | FazBrowse Home | New Git URL |