Skip to content

Commit dccf02c

Browse files
committed
Update DEVELOPMENT.md
1 parent 209c25d commit dccf02c

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

DEVELOPMENT.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,36 @@
44

55
### Copilot for Xcode
66

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

99
### EditorExtension
1010

11-
As its name suggests, the 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 to bypass the limitations. The XPCService identifier must be included in the `com.apple.security.temporary-exception.mach-lookup.global-name` entitlements.
11+
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.
1212

1313
### ExtensionService
1414

15-
The `ExtensionService` is a program that operates in the background and performs a wide range of tasks. It redirects requests from the `EditorExtension` to the `CopilotService` and returns the updated code back to the extension, or presents it in a GUI outside of Xcode.
15+
The `ExtensionService` is a program that operates in the background. All features are implemented in this target.
16+
17+
### CommunicationBridge
18+
19+
It's responsible for maintaining the communication between the Copilot for Xcode/EditorExtension and ExtensionService.
1620

1721
### Core and Tool
1822

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

21-
- The `Service` is responsible for handling the requests from the `EditorExtension`, communicating with the `CopilotService`, update the code blocks and present the GUI.
22-
- The `Client` is basically just a wrapper around the XPCService
23-
- The `SuggestionInjector` is responsible for injecting the suggestions into the code. Used in comment mode to present the suggestions, and all modes to accept suggestions.
24-
- The `SuggestionWidget` is responsible for the UI of the widgets.
25+
- The `Service` contains the implementations of the ExtensionService target.
26+
- The `HostApp` contains the implementations of the Copilot for Xcode target.
2527

2628
## Building and Archiving the App
2729

28-
1. Update the xcconfig files, launchAgent.plist, and Tool/Configs/Configurations.swift.
30+
1. Update the xcconfig files, bridgeLaunchAgent.plist, and Tool/Configs/Configurations.swift.
2931
2. Build or archive the Copilot for Xcode target.
30-
3. If Xcode complains that the pro package doesn't exist, please remove the package from the project, and update the last function in Core/Package.swift to return false.
32+
3. If Xcode complains that the pro package doesn't exist, please remove the package from the project.
3133

3234
## Testing Source Editor Extension
3335

34-
Just run both the `ExtensionService` and the `EditorExtension` Target. Read [Testing Your Source Editor Extension](https://developer.apple.com/documentation/xcodekit/testing_your_source_editor_extension) for more details.
36+
Just run both the `ExtensionService`, `CommunicationBridge` and the `EditorExtension` Target. Read [Testing Your Source Editor Extension](https://developer.apple.com/documentation/xcodekit/testing_your_source_editor_extension) for more details.
3537

3638
## SwiftUI Previews
3739

0 commit comments

Comments
 (0)