Skip to content

Commit c444429

Browse files
committed
Update README.md
1 parent 3d1aac9 commit c444429

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,19 @@ Then set it up with the following steps:
6565

6666
### Granting Permissions to the App
6767

68-
**Permissions should be granted to `CopilotForXcodeExtensionService.app`**. Not `Copilot for Xcode.app`. It is located in `Copilot for Xcode.app/Contents/Applications/CopilotForXcodeExtensionService.app`, you can access this directory by right-clicking the app icon, and selecting `Show Package Contents`.
68+
The first time the app is open and command run, the extension will ask for the necessary permissions. (except Input Monitoring, you have to enable it manually)
6969

70-
The first time the commands are run, the extension will ask for the necessary permissions. (except Input Monitoring, you have to enable it manually)
70+
Alternatively, you may manually grant the required permissions by navigating to the `Privacy & Security` tab in the `System Settings.app`. Please note that different permissions must be assigned to different apps.
7171

72-
If you encounter an alert requesting permission that you have previously granted, please remove the permission from the list and add it again to re-grant the necessary permissions.
72+
- To grant permissions for the Accessibility API, click `Accessibility`, and drag `CopilotForXcodeExtensionService.app` to the list. You can locate the extension app by clicking `Reveal Extension App in Finder` in the host app.
73+
74+
![Accessibility API](/accessibility_api_permision.png)
7375

74-
Or you can grant them manually by going to the `Privacy & Security` tab in `System Settings.app`, and
75-
- Accessibility API: Click `Accessibility`, and drag `CopilotForXcodeExtensionService.app` to the list.
76-
- Input Monitoring (If you need real-time suggestions): Click `Input Monitoring` and drag `CopilotForXcodeExtensionService.app` to the list.
76+
- To enable Input Monitoring (for real-time suggestions cancellation by pressing esc, arrow keys or clicking the mouse), click `Input Monitoring`, and add `Copilot for Xcode.app` to the list.
77+
78+
![Input Monitoring](/input_monitoring_permission.png)
79+
80+
If you encounter an alert requesting permission that you have previously granted, please remove the permission from the list and add it again to re-grant the necessary permissions.
7781

7882
### Managing `CopilotForXcodeExtensionService.app`
7983

@@ -91,7 +95,7 @@ brew upgrade --cask copilot-for-xcode
9195

9296
Alternatively, You can download the latest version manually from the latest [release](https://github.com/intitni/CopilotForXcode/releases).
9397

94-
If you are upgrading from a version lower than 0.8.0, please run `Copilot for Xcode.app` at least once to let it set up the new launch agent for you.
98+
If you are upgrading from a version lower than **0.8.0**, please run `Copilot for Xcode.app` at least once to let it set up the new launch agent for you and re-grant the permissions according to the new rules.
9599

96100
If you want to keep track of the new releases, you can watch the releases of this repo to get notifications about updates.
97101

@@ -155,6 +159,7 @@ fi
155159
- The first run of the extension will be slow. Be patient.
156160
- The extension uses some dirty tricks to get the file and project/workspace paths. It may fail, it may be incorrect, especially when you have multiple Xcode windows running, and maybe even worse when they are in different displays. I am not sure about that though.
157161
- The suggestions are presented as C-style comments in comment mode, they may break your code if you are editing a JSON file or something.
162+
- When a real-time suggestion request is triggered, there is a chance that it may briefly block the editor. This can occur at most once for each file after each restart of the extension because the extension needs to initiate real-time suggestion by clicking an item from the menu bar. However, once a command has been executed and some information is cached, the extension will be able to trigger real-time suggestion using a different method.
158163

159164
## FAQ
160165

@@ -176,7 +181,12 @@ fi
176181
177182
**Q: I turned on real-time suggestions, but nothing happens**
178183

184+
> A: Try typing something in the editor and wait for a little while, if you see an animation from the real-time suggestion indicator or the floating widget, that means the real-time suggestion is correctly triggered.
185+
186+
**Q: I can't cancel real-time suggestions with mouse clicks, or pressing esc.**
187+
179188
> A: Please check if the [Accessibility API and Input Monitoring permission](https://github.com/intitni/CopilotForXcode#granting-permissions-to-the-app) is setup correctly.
189+
If you have followed the setup instructions as directed, please also consider granting Input Monitoring permissions to the extension app.
180190

181191
**Q: Will it work in future Xcode updates?**
182192

accessibility_api_permision.png

60.7 KB
Loading

input_monitoring_permission.png

46 KB
Loading

0 commit comments

Comments
 (0)