Skip to content

Commit 9dc92d3

Browse files
committed
Customize extension bundle name
1 parent 53c7820 commit 9dc92d3

File tree

8 files changed

+59
-46
lines changed

8 files changed

+59
-46
lines changed

Config.debug.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
BUNDLE_IDENTIFIER_BASE = dev.com.intii.CopilotForXcode
2+
EXTENSION_BUNDLE_NAME = Copilot Dev

Config.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
BUNDLE_IDENTIFIER_BASE = com.intii.CopilotForXcode
2+
EXTENSION_BUNDLE_NAME = Copilot

Copilot for Xcode.xcodeproj/project.pbxproj

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
C8009BFF2941C551007AA7E8 /* TurnOnRealtimeSuggestionsCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8009BFE2941C551007AA7E8 /* TurnOnRealtimeSuggestionsCommand.swift */; };
11+
C8009C012941C56C007AA7E8 /* TurnOffRealtimeSuggestionsCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8009C002941C56C007AA7E8 /* TurnOffRealtimeSuggestionsCommand.swift */; };
12+
C8009C032941C576007AA7E8 /* RealtimeSuggestionCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8009C022941C576007AA7E8 /* RealtimeSuggestionCommand.swift */; };
1013
C814588F2939EFDC00135263 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C814588E2939EFDC00135263 /* Cocoa.framework */; };
1114
C81458942939EFDC00135263 /* SourceEditorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81458932939EFDC00135263 /* SourceEditorExtension.swift */; };
1215
C81458962939EFDC00135263 /* GetSuggestionsCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81458952939EFDC00135263 /* GetSuggestionsCommand.swift */; };
@@ -123,6 +126,9 @@
123126
/* End PBXCopyFilesBuildPhase section */
124127

125128
/* Begin PBXFileReference section */
129+
C8009BFE2941C551007AA7E8 /* TurnOnRealtimeSuggestionsCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TurnOnRealtimeSuggestionsCommand.swift; sourceTree = "<group>"; };
130+
C8009C002941C56C007AA7E8 /* TurnOffRealtimeSuggestionsCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TurnOffRealtimeSuggestionsCommand.swift; sourceTree = "<group>"; };
131+
C8009C022941C576007AA7E8 /* RealtimeSuggestionCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RealtimeSuggestionCommand.swift; sourceTree = "<group>"; };
126132
C814588C2939EFDC00135263 /* Copilot.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Copilot.appex; sourceTree = BUILT_PRODUCTS_DIR; };
127133
C814588E2939EFDC00135263 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
128134
C81458902939EFDC00135263 /* XcodeKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XcodeKit.framework; path = Library/Frameworks/XcodeKit.framework; sourceTree = DEVELOPER_DIR; };
@@ -210,6 +216,9 @@
210216
C87B03A6293B261900C77EAE /* RejectSuggestionCommand.swift */,
211217
C87B03A8293B262600C77EAE /* NextSuggestionCommand.swift */,
212218
C87B03AA293B262E00C77EAE /* PreviousSuggestionCommand.swift */,
219+
C8009BFE2941C551007AA7E8 /* TurnOnRealtimeSuggestionsCommand.swift */,
220+
C8009C002941C56C007AA7E8 /* TurnOffRealtimeSuggestionsCommand.swift */,
221+
C8009C022941C576007AA7E8 /* RealtimeSuggestionCommand.swift */,
213222
C81458972939EFDC00135263 /* Info.plist */,
214223
C81458982939EFDC00135263 /* EditorExtension.entitlements */,
215224
);
@@ -416,12 +425,15 @@
416425
isa = PBXSourcesBuildPhase;
417426
buildActionMask = 2147483647;
418427
files = (
428+
C8009C012941C56C007AA7E8 /* TurnOffRealtimeSuggestionsCommand.swift in Sources */,
419429
C81458942939EFDC00135263 /* SourceEditorExtension.swift in Sources */,
420430
C8520301293C4D9000460097 /* Helpers.swift in Sources */,
431+
C8009BFF2941C551007AA7E8 /* TurnOnRealtimeSuggestionsCommand.swift in Sources */,
421432
C87B03A5293B261200C77EAE /* AcceptSuggestionCommand.swift in Sources */,
422433
C87B03A9293B262600C77EAE /* NextSuggestionCommand.swift in Sources */,
423434
C87B03AB293B262E00C77EAE /* PreviousSuggestionCommand.swift in Sources */,
424435
C87B03A7293B261900C77EAE /* RejectSuggestionCommand.swift in Sources */,
436+
C8009C032941C576007AA7E8 /* RealtimeSuggestionCommand.swift in Sources */,
425437
C81458962939EFDC00135263 /* GetSuggestionsCommand.swift in Sources */,
426438
);
427439
runOnlyForDeploymentPostprocessing = 0;
@@ -476,9 +488,8 @@
476488
CURRENT_PROJECT_VERSION = 1;
477489
DEVELOPMENT_TEAM = 5YKZ4Y3DAW;
478490
ENABLE_HARDENED_RUNTIME = YES;
479-
GENERATE_INFOPLIST_FILE = YES;
480491
INFOPLIST_FILE = EditorExtension/Info.plist;
481-
INFOPLIST_KEY_CFBundleDisplayName = "Copilot Dev";
492+
INFOPLIST_KEY_CFBundleDisplayName = "$(EXTESNION_BUNDLE_NAME)";
482493
INFOPLIST_KEY_NSHumanReadableCopyright = "";
483494
LD_RUNPATH_SEARCH_PATHS = (
484495
"$(inherited)",
@@ -504,9 +515,8 @@
504515
CURRENT_PROJECT_VERSION = 1;
505516
DEVELOPMENT_TEAM = 5YKZ4Y3DAW;
506517
ENABLE_HARDENED_RUNTIME = YES;
507-
GENERATE_INFOPLIST_FILE = YES;
508518
INFOPLIST_FILE = EditorExtension/Info.plist;
509-
INFOPLIST_KEY_CFBundleDisplayName = Copilot;
519+
INFOPLIST_KEY_CFBundleDisplayName = "$(EXTESNION_BUNDLE_NAME)";
510520
INFOPLIST_KEY_NSHumanReadableCopyright = "";
511521
LD_RUNPATH_SEARCH_PATHS = (
512522
"$(inherited)",
@@ -692,6 +702,7 @@
692702
ENABLE_PREVIEWS = YES;
693703
GENERATE_INFOPLIST_FILE = YES;
694704
INFOPLIST_FILE = "Copilot-for-Xcode-Info.plist";
705+
INFOPLIST_KEY_LSApplicationCategoryType = "";
695706
INFOPLIST_KEY_NSHumanReadableCopyright = "";
696707
LD_RUNPATH_SEARCH_PATHS = (
697708
"$(inherited)",
@@ -723,6 +734,7 @@
723734
ENABLE_PREVIEWS = YES;
724735
GENERATE_INFOPLIST_FILE = YES;
725736
INFOPLIST_FILE = "Copilot-for-Xcode-Info.plist";
737+
INFOPLIST_KEY_LSApplicationCategoryType = "";
726738
INFOPLIST_KEY_NSHumanReadableCopyright = "";
727739
LD_RUNPATH_SEARCH_PATHS = (
728740
"$(inherited)",

Copilot-for-Xcode-Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
<dict>
55
<key>BUNDLE_IDENTIFIER_BASE</key>
66
<string>$(BUNDLE_IDENTIFIER_BASE)</string>
7+
<key>EXTENSION_BUNDLE_NAME</key>
8+
<string>$(EXTENSION_BUNDLE_NAME)</string>
79
</dict>
810
</plist>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// File.swift
3+
//
4+
//
5+
// Created by Shangxin Guo on 2022/12/8.
6+
//
7+
8+
import Foundation
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// File.swift
3+
//
4+
//
5+
// Created by Shangxin Guo on 2022/12/8.
6+
//
7+
8+
import Foundation

EditorExtension/Info.plist

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,34 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CFBundleShortVersionString</key>
6+
<string>$(MARKETING_VERSION)</string>
7+
<key>NSHumanReadableCopyright</key>
8+
<string></string>
9+
<key>CFBundleDevelopmentRegion</key>
10+
<string>$(DEVELOPMENT_LANGUAGE)</string>
11+
<key>CFBundlePackageType</key>
12+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
13+
<key>CFBundleDisplayName</key>
14+
<string>$(EXTESNION_BUNDLE_NAME)</string>
15+
<key>CFBundleExecutable</key>
16+
<string>$(EXECUTABLE_NAME)</string>
17+
<key>CFBundleVersion</key>
18+
<string>$(CURRENT_PROJECT_VERSION)</string>
19+
<key>CFBundleInfoDictionaryVersion</key>
20+
<string>6.0</string>
21+
<key>CFBundleIdentifier</key>
22+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
23+
<key>CFBundleName</key>
24+
<string>$(EXTENSION_BUNDLE_NAME)</string>
525
<key>BUNDLE_IDENTIFIER_BASE</key>
626
<string>$(BUNDLE_IDENTIFIER_BASE)</string>
727
<key>NSExtension</key>
828
<dict>
929
<key>NSExtensionAttributes</key>
1030
<dict>
1131
<key>XCSourceEditorCommandDefinitions</key>
12-
<array>
13-
<dict>
14-
<key>XCSourceEditorCommandClassName</key>
15-
<string>$(PRODUCT_MODULE_NAME).GetSuggestionsCommand</string>
16-
<key>XCSourceEditorCommandIdentifier</key>
17-
<string>$(PRODUCT_BUNDLE_IDENTIFIER).GetSuggestionsCommand</string>
18-
<key>XCSourceEditorCommandName</key>
19-
<string>Get Suggestions</string>
20-
</dict>
21-
<dict>
22-
<key>XCSourceEditorCommandClassName</key>
23-
<string>$(PRODUCT_MODULE_NAME).NextSuggestionCommand</string>
24-
<key>XCSourceEditorCommandIdentifier</key>
25-
<string>$(PRODUCT_BUNDLE_IDENTIFIER).NextSuggestionCommand</string>
26-
<key>XCSourceEditorCommandName</key>
27-
<string>Next Suggestion</string>
28-
</dict>
29-
<dict>
30-
<key>XCSourceEditorCommandClassName</key>
31-
<string>$(PRODUCT_MODULE_NAME).PreviousSuggestionCommand</string>
32-
<key>XCSourceEditorCommandIdentifier</key>
33-
<string>$(PRODUCT_BUNDLE_IDENTIFIER).PreviousSuggestionCommand</string>
34-
<key>XCSourceEditorCommandName</key>
35-
<string>Previous Suggestion</string>
36-
</dict>
37-
<dict>
38-
<key>XCSourceEditorCommandClassName</key>
39-
<string>$(PRODUCT_MODULE_NAME).AcceptSuggestionCommand</string>
40-
<key>XCSourceEditorCommandIdentifier</key>
41-
<string>$(PRODUCT_BUNDLE_IDENTIFIER).AcceptSuggestionCommand</string>
42-
<key>XCSourceEditorCommandName</key>
43-
<string>Accept Suggestion</string>
44-
</dict>
45-
<dict>
46-
<key>XCSourceEditorCommandClassName</key>
47-
<string>$(PRODUCT_MODULE_NAME).RejectSuggestionCommand</string>
48-
<key>XCSourceEditorCommandIdentifier</key>
49-
<string>$(PRODUCT_BUNDLE_IDENTIFIER).RejectSuggestionCommand</string>
50-
<key>XCSourceEditorCommandName</key>
51-
<string>Reject Suggestion</string>
52-
</dict>
53-
</array>
32+
<array/>
5433
<key>XCSourceEditorExtensionPrincipalClass</key>
5534
<string>$(PRODUCT_MODULE_NAME).SourceEditorExtension</string>
5635
</dict>

XPCService/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>EXTENSION_BUNDLE_NAME</key>
6+
<string>$(EXTENSION_BUNDLE_NAME)</string>
57
<key>BUNDLE_IDENTIFIER_BASE</key>
68
<string>$(BUNDLE_IDENTIFIER_BASE)</string>
79
<key>CFBundleIdentifier</key>

0 commit comments

Comments
 (0)