Skip to content

Commit 1599797

Browse files
Merge pull request #1 from RainbowScientist5/raindrops.ai
Rainbowbeast_Copilot_Pull_Request
2 parents dfe1195 + 486c77d commit 1599797

File tree

12 files changed

+192
-37
lines changed

12 files changed

+192
-37
lines changed
File renamed without changes.

Copilot for Xcode.xcworkspace/contents.xcworkspacedata

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict/>
5+
</plist>

Copilot for Xcode.xcodeproj/project.pbxproj renamed to Rainbowbeast_Copilot for Xcode.xcodeproj/project.pbxproj

Lines changed: 91 additions & 29 deletions
Large diffs are not rendered by default.

Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/CommunicationBridge.xcscheme renamed to Rainbowbeast_Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/CommunicationBridge.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1540"
3+
LastUpgradeVersion = "1620"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/Copilot for Xcode.xcscheme renamed to Rainbowbeast_Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/Copilot for Xcode.xcscheme

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1410"
3+
LastUpgradeVersion = "1620"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -35,7 +35,7 @@
3535
</TestPlans>
3636
</TestAction>
3737
<LaunchAction
38-
buildConfiguration = "Debug"
38+
buildConfiguration = "Release"
3939
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4040
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4141
launchStyle = "0"
@@ -46,14 +46,23 @@
4646
allowLocationSimulation = "YES">
4747
<BuildableProductRunnable
4848
runnableDebuggingMode = "0">
49+
<BuildableReference
50+
BuildableIdentifier = "primary"
51+
BlueprintIdentifier = "C8189B152938972F00C9DCDA"
52+
BuildableName = "GitHub Rainbowbeast_Copilot for Xcode Dev.app"
53+
BlueprintName = "Rainbowbeast_Copilot for Xcode"
54+
ReferencedContainer = "container:Rainbowbeast_Copilot for Xcode.xcodeproj">
55+
</BuildableReference>
56+
</BuildableProductRunnable>
57+
<MacroExpansion>
4958
<BuildableReference
5059
BuildableIdentifier = "primary"
5160
BlueprintIdentifier = "C8189B152938972F00C9DCDA"
5261
BuildableName = "GitHub Copilot for Xcode.app"
5362
BlueprintName = "Copilot for Xcode"
5463
ReferencedContainer = "container:Copilot for Xcode.xcodeproj">
5564
</BuildableReference>
56-
</BuildableProductRunnable>
65+
</MacroExpansion>
5766
<CommandLineArguments>
5867
<CommandLineArgument
5968
argument = "-_NS_4445425547 YES"
@@ -77,6 +86,15 @@
7786
ReferencedContainer = "container:Copilot for Xcode.xcodeproj">
7887
</BuildableReference>
7988
</BuildableProductRunnable>
89+
<MacroExpansion>
90+
<BuildableReference
91+
BuildableIdentifier = "primary"
92+
BlueprintIdentifier = "C8189B152938972F00C9DCDA"
93+
BuildableName = "GitHub Copilot for Xcode.app"
94+
BlueprintName = "Copilot for Xcode"
95+
ReferencedContainer = "container:Copilot for Xcode.xcodeproj">
96+
</BuildableReference>
97+
</MacroExpansion>
8098
</ProfileAction>
8199
<AnalyzeAction
82100
buildConfiguration = "Debug">

Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/EditorExtension.xcscheme renamed to Rainbowbeast_Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/EditorExtension.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1410"
3+
LastUpgradeVersion = "1620"
44
wasCreatedForAppExtension = "YES"
55
version = "2.0">
66
<BuildAction

Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/ExtensionService.xcscheme renamed to Rainbowbeast_Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/ExtensionService.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1420"
3+
LastUpgradeVersion = "1620"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/SandboxedClientTester.xcscheme renamed to Rainbowbeast_Copilot for Xcode.xcodeproj/xcshareddata/xcschemes/SandboxedClientTester.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1540"
3+
LastUpgradeVersion = "1620"
44
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"

en.lproj/DEVELOPMENT.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Development
2+
3+
## Prerequisites
4+
5+
Requires Node installed and `npm` available on your system path, e.g.
6+
7+
```sh
8+
sudo ln -s `which npm` /usr/local/bin
9+
sudo ln -s `which node` /usr/local/bin
10+
```
11+
12+
For context, this is used by an Xcode run script as part of the build. Run
13+
scripts use a very limited path to resolve commands.
14+
15+
## Targets
16+
17+
### Copilot for Xcode
18+
19+
Copilot for Xcode is the host app containing both the XPCService and the editor extension. It provides the settings UI.
20+
21+
### EditorExtension
22+
23+
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.
24+
25+
### ExtensionService
26+
27+
The `ExtensionService` is a program that operates in the background. All features are implemented in this target.
28+
29+
### CommunicationBridge
30+
31+
It's responsible for maintaining the communication between the Copilot for Xcode/EditorExtension and ExtensionService.
32+
33+
### Core and Tool
34+
35+
Most of the logics are implemented inside the package `Core` and `Tool`.
36+
37+
- The `Service` contains the implementations of the ExtensionService target.
38+
- The `HostApp` contains the implementations of the Copilot for Xcode target.
39+
40+
## Building and Archiving the App
41+
42+
1. Update the xcconfig files, bridgeLaunchAgent.plist, and Tool/Configs/Configurations.swift.
43+
2. Build or archive the Copilot for Xcode target.
44+
3. If Xcode complains that the pro package doesn't exist, please remove the package from the project.
45+
46+
## Testing Source Editor Extension
47+
48+
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.
49+
50+
## SwiftUI Previews
51+
52+
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.
53+
54+
## Unit Tests
55+
56+
To run unit tests, just run test from the `Copilot for Xcode` target.
57+
58+
For new tests, they should be added to the `TestPlan.xctestplan`.
59+
60+
## Code Style
61+
62+
We use SwiftFormat to format the code.
63+
64+
The source code mostly follows the [Ray Wenderlich Style Guide](https://github.com/raywenderlich/swift-style-guide) very closely with the following exception:
65+
66+
- Use the Xcode default of 4 spaces for indentation.
67+
68+
## App Versioning
69+
70+
The app version and all targets' version in controlled by `Version.xcconfig`.

0 commit comments

Comments
 (0)