├── .gitignore
├── README.md
├── Search
├── Info.plist
├── Search.entitlements
├── SourceEditorCommand.swift
└── SourceEditorExtension.swift
├── Xcode-Search.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── xcuserdata
│ └── skyline.xcuserdatad
│ └── xcschemes
│ ├── Search.xcscheme
│ ├── Xcode-Search.xcscheme
│ └── xcschememanagement.plist
├── Xcode-Search
├── AppDelegate.swift
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Base.lproj
│ └── Main.storyboard
├── Info.plist
└── ViewController.swift
└── screenshot.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata
19 |
20 | ## Other
21 | *.xccheckout
22 | *.moved-aside
23 | *.xcuserstate
24 | *.xcscmblueprint
25 |
26 | ## Obj-C/Swift specific
27 | *.hmap
28 | *.ipa
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | .DS_Store
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Xcode Search
2 | ============
3 |
4 | A Xcode Source Editor Extension that searches external source(Google, StackOverflow, etc)
5 |
6 | 
7 |
8 | Usage
9 | =====
10 |
11 | 1. Install Xcode 8 Beta
12 | 2. Run Xcode 8 Beta and install additional system components
13 | 3. Open terminal.app and execute `sudo /usr/libexec/xpccachectl` if you are using OS X 10.11
14 | 4. Reboot your mac
15 | 5. Open this project in Xcode 8 Beta and run the extension. Fix code signing issues if there are any. Extensions and the app need to be signed properly.
16 | 6. Choose an app to run: Xcode 8 Beta
17 | 7. Select your code
18 | 8. Choose menu `Editor > Search`
19 |
20 | **Notice:**Currently the Source Editor Extension feature in Xcode 8 Beta is not very stable. You may find that the command is sometimes not showing up, or not available(grayed out).
21 |
22 | TODO
23 | ====
24 |
25 | * Multiline selection support
26 | * More external sources for searching
--------------------------------------------------------------------------------
/Search/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Search
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | XPC!
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSExtension
28 |
29 | NSExtensionAttributes
30 |
31 | XCSourceEditorCommandDefinitions
32 |
33 |
34 | XCSourceEditorCommandClassName
35 | $(PRODUCT_MODULE_NAME).SourceEditorCommand
36 | XCSourceEditorCommandIdentifier
37 | com.byskyline.Xcode-Search.Search.SourceEditorCommand.Google
38 | XCSourceEditorCommandName
39 | Google
40 |
41 |
42 | XCSourceEditorCommandClassName
43 | $(PRODUCT_MODULE_NAME).SourceEditorCommand
44 | XCSourceEditorCommandIdentifier
45 | com.byskyline.Xcode-Search.Search.SourceEditorCommand.StackOverflow
46 | XCSourceEditorCommandName
47 | StackOverflow
48 |
49 |
50 | XCSourceEditorCommandClassName
51 | $(PRODUCT_MODULE_NAME).SourceEditorCommand
52 | XCSourceEditorCommandIdentifier
53 | com.byskyline.Xcode-Search.Search.SourceEditorCommand.Github
54 | XCSourceEditorCommandName
55 | Github
56 |
57 |
58 | XCSourceEditorCommandClassName
59 | $(PRODUCT_MODULE_NAME).SourceEditorCommand
60 | XCSourceEditorCommandIdentifier
61 | com.byskyline.Xcode-Search.Search.SourceEditorCommand.Dash
62 | XCSourceEditorCommandName
63 | Dash
64 |
65 |
66 | XCSourceEditorExtensionPrincipalClass
67 | $(PRODUCT_MODULE_NAME).SourceEditorExtension
68 |
69 | NSExtensionPointIdentifier
70 | com.apple.dt.Xcode.extension.source-editor
71 |
72 | NSHumanReadableCopyright
73 | Copyright © 2016年 skyline. All rights reserved.
74 |
75 |
76 |
--------------------------------------------------------------------------------
/Search/Search.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Search/SourceEditorCommand.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorCommand.swift
3 | // Search
4 | //
5 | // Created by skyline on 16/6/17.
6 | // Copyright © 2016年 skyline. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 | import XcodeKit
11 |
12 | enum SearchEngine {
13 | case Google, StackOverflow, Github, Dash
14 | init(identifier:String) {
15 | let searchType = identifier.components(separatedBy: ".").last!
16 | switch searchType {
17 | case "Google":
18 | self = .Google
19 | case "StackOverflow":
20 | self = .StackOverflow
21 | case "Github":
22 | self = .Github
23 | case "Dash":
24 | self = .Dash
25 | default:
26 | self = .Google
27 | }
28 | }
29 |
30 | private func urlPrefix() -> String {
31 | switch self {
32 | case .Google:
33 | return "https://www.google.com/search?q="
34 | case .StackOverflow:
35 | return "https://stackoverflow.com/search?q="
36 | case .Github:
37 | return "https://github.com/search?q="
38 | case .Dash:
39 | return "dash://"
40 | }
41 | }
42 | func url(with keyword:String) -> String {
43 | return urlPrefix() + keyword.addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlHostAllowed())!
44 | }
45 | }
46 |
47 | class SourceEditorCommand: NSObject, XCSourceEditorCommand {
48 |
49 | func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: (NSError?) -> Void ) -> Void {
50 | guard let selection = invocation.buffer.selections.firstObject as? XCSourceTextRange else {
51 | completionHandler(NSError(domain: "Search", code: 0, userInfo: [NSLocalizedDescriptionKey: "Invalid Selection"]))
52 | return
53 | }
54 |
55 | let line = invocation.buffer.lines[selection.start.line]
56 | let range = NSRange(location: selection.start.column, length: selection.end.column - selection.start.column + 1)
57 | let keyword = line.substring(with: range)
58 | let engine = SearchEngine(identifier: invocation.commandIdentifier)
59 | openInBrowser(urlString: engine.url(with: keyword))
60 | completionHandler(nil)
61 | }
62 |
63 | private func openInBrowser(urlString:String) {
64 | NSWorkspace.shared().open(URL(string: urlString)!);
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Search/SourceEditorExtension.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SourceEditorExtension.swift
3 | // Search
4 | //
5 | // Created by skyline on 16/6/17.
6 | // Copyright © 2016年 skyline. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import XcodeKit
11 |
12 | class SourceEditorExtension: NSObject, XCSourceEditorExtension {
13 |
14 | /*
15 | func extensionDidFinishLaunching() {
16 | // If your extension needs to do any work at launch, implement this optional method.
17 | }
18 | */
19 |
20 | /*
21 | var commandDefinitions: [[XCSourceEditorCommandDefinitionKey: AnyObject]] {
22 | // If your extension needs to return a collection of command definitions that differs from those in its Info.plist, implement this optional property getter.
23 | return []
24 | }
25 | */
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/Xcode-Search.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 2DCA1ED61D141336007B0496 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DCA1ED51D141336007B0496 /* AppDelegate.swift */; };
11 | 2DCA1ED81D141336007B0496 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DCA1ED71D141336007B0496 /* ViewController.swift */; };
12 | 2DCA1EDA1D141336007B0496 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2DCA1ED91D141336007B0496 /* Assets.xcassets */; };
13 | 2DCA1EDD1D141336007B0496 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2DCA1EDB1D141336007B0496 /* Main.storyboard */; };
14 | 2DCA1EEB1D14135B007B0496 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DCA1EEA1D14135B007B0496 /* Cocoa.framework */; };
15 | 2DCA1EF01D14135B007B0496 /* SourceEditorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DCA1EEF1D14135B007B0496 /* SourceEditorExtension.swift */; };
16 | 2DCA1EF21D14135B007B0496 /* SourceEditorCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DCA1EF11D14135B007B0496 /* SourceEditorCommand.swift */; };
17 | 2DCA1EF61D14135B007B0496 /* Search.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 2DCA1EE81D14135B007B0496 /* Search.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | 2DCA1EF41D14135B007B0496 /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = 2DCA1ECA1D141336007B0496 /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = 2DCA1EE71D14135B007B0496;
26 | remoteInfo = Search;
27 | };
28 | /* End PBXContainerItemProxy section */
29 |
30 | /* Begin PBXCopyFilesBuildPhase section */
31 | 2DCA1EFA1D14135B007B0496 /* Embed App Extensions */ = {
32 | isa = PBXCopyFilesBuildPhase;
33 | buildActionMask = 2147483647;
34 | dstPath = "";
35 | dstSubfolderSpec = 13;
36 | files = (
37 | 2DCA1EF61D14135B007B0496 /* Search.appex in Embed App Extensions */,
38 | );
39 | name = "Embed App Extensions";
40 | runOnlyForDeploymentPostprocessing = 0;
41 | };
42 | /* End PBXCopyFilesBuildPhase section */
43 |
44 | /* Begin PBXFileReference section */
45 | 2DCA1ED21D141336007B0496 /* Xcode-Search.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Xcode-Search.app"; sourceTree = BUILT_PRODUCTS_DIR; };
46 | 2DCA1ED51D141336007B0496 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
47 | 2DCA1ED71D141336007B0496 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
48 | 2DCA1ED91D141336007B0496 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
49 | 2DCA1EDC1D141336007B0496 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 2DCA1EDE1D141336007B0496 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
51 | 2DCA1EE81D14135B007B0496 /* Search.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Search.appex; sourceTree = BUILT_PRODUCTS_DIR; };
52 | 2DCA1EEA1D14135B007B0496 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
53 | 2DCA1EEE1D14135B007B0496 /* Search.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Search.entitlements; sourceTree = ""; };
54 | 2DCA1EEF1D14135B007B0496 /* SourceEditorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorExtension.swift; sourceTree = ""; };
55 | 2DCA1EF11D14135B007B0496 /* SourceEditorCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceEditorCommand.swift; sourceTree = ""; };
56 | 2DCA1EF31D14135B007B0496 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
57 | /* End PBXFileReference section */
58 |
59 | /* Begin PBXFrameworksBuildPhase section */
60 | 2DCA1ECF1D141336007B0496 /* Frameworks */ = {
61 | isa = PBXFrameworksBuildPhase;
62 | buildActionMask = 2147483647;
63 | files = (
64 | );
65 | runOnlyForDeploymentPostprocessing = 0;
66 | };
67 | 2DCA1EE51D14135B007B0496 /* Frameworks */ = {
68 | isa = PBXFrameworksBuildPhase;
69 | buildActionMask = 2147483647;
70 | files = (
71 | 2DCA1EEB1D14135B007B0496 /* Cocoa.framework in Frameworks */,
72 | );
73 | runOnlyForDeploymentPostprocessing = 0;
74 | };
75 | /* End PBXFrameworksBuildPhase section */
76 |
77 | /* Begin PBXGroup section */
78 | 2DCA1EC91D141336007B0496 = {
79 | isa = PBXGroup;
80 | children = (
81 | 2DCA1ED41D141336007B0496 /* Xcode-Search */,
82 | 2DCA1EEC1D14135B007B0496 /* Search */,
83 | 2DCA1EE91D14135B007B0496 /* Frameworks */,
84 | 2DCA1ED31D141336007B0496 /* Products */,
85 | );
86 | sourceTree = "";
87 | };
88 | 2DCA1ED31D141336007B0496 /* Products */ = {
89 | isa = PBXGroup;
90 | children = (
91 | 2DCA1ED21D141336007B0496 /* Xcode-Search.app */,
92 | 2DCA1EE81D14135B007B0496 /* Search.appex */,
93 | );
94 | name = Products;
95 | sourceTree = "";
96 | };
97 | 2DCA1ED41D141336007B0496 /* Xcode-Search */ = {
98 | isa = PBXGroup;
99 | children = (
100 | 2DCA1ED51D141336007B0496 /* AppDelegate.swift */,
101 | 2DCA1ED71D141336007B0496 /* ViewController.swift */,
102 | 2DCA1ED91D141336007B0496 /* Assets.xcassets */,
103 | 2DCA1EDB1D141336007B0496 /* Main.storyboard */,
104 | 2DCA1EDE1D141336007B0496 /* Info.plist */,
105 | );
106 | path = "Xcode-Search";
107 | sourceTree = "";
108 | };
109 | 2DCA1EE91D14135B007B0496 /* Frameworks */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 2DCA1EEA1D14135B007B0496 /* Cocoa.framework */,
113 | );
114 | name = Frameworks;
115 | sourceTree = "";
116 | };
117 | 2DCA1EEC1D14135B007B0496 /* Search */ = {
118 | isa = PBXGroup;
119 | children = (
120 | 2DCA1EEF1D14135B007B0496 /* SourceEditorExtension.swift */,
121 | 2DCA1EF11D14135B007B0496 /* SourceEditorCommand.swift */,
122 | 2DCA1EF31D14135B007B0496 /* Info.plist */,
123 | 2DCA1EED1D14135B007B0496 /* Supporting Files */,
124 | );
125 | path = Search;
126 | sourceTree = "";
127 | };
128 | 2DCA1EED1D14135B007B0496 /* Supporting Files */ = {
129 | isa = PBXGroup;
130 | children = (
131 | 2DCA1EEE1D14135B007B0496 /* Search.entitlements */,
132 | );
133 | name = "Supporting Files";
134 | sourceTree = "";
135 | };
136 | /* End PBXGroup section */
137 |
138 | /* Begin PBXNativeTarget section */
139 | 2DCA1ED11D141336007B0496 /* Xcode-Search */ = {
140 | isa = PBXNativeTarget;
141 | buildConfigurationList = 2DCA1EE11D141336007B0496 /* Build configuration list for PBXNativeTarget "Xcode-Search" */;
142 | buildPhases = (
143 | 2DCA1ECE1D141336007B0496 /* Sources */,
144 | 2DCA1ECF1D141336007B0496 /* Frameworks */,
145 | 2DCA1ED01D141336007B0496 /* Resources */,
146 | 2DCA1EFA1D14135B007B0496 /* Embed App Extensions */,
147 | );
148 | buildRules = (
149 | );
150 | dependencies = (
151 | 2DCA1EF51D14135B007B0496 /* PBXTargetDependency */,
152 | );
153 | name = "Xcode-Search";
154 | productName = "Xcode-Search";
155 | productReference = 2DCA1ED21D141336007B0496 /* Xcode-Search.app */;
156 | productType = "com.apple.product-type.application";
157 | };
158 | 2DCA1EE71D14135B007B0496 /* Search */ = {
159 | isa = PBXNativeTarget;
160 | buildConfigurationList = 2DCA1EF71D14135B007B0496 /* Build configuration list for PBXNativeTarget "Search" */;
161 | buildPhases = (
162 | 2DCA1EE41D14135B007B0496 /* Sources */,
163 | 2DCA1EE51D14135B007B0496 /* Frameworks */,
164 | 2DCA1EE61D14135B007B0496 /* Resources */,
165 | );
166 | buildRules = (
167 | );
168 | dependencies = (
169 | );
170 | name = Search;
171 | productName = Search;
172 | productReference = 2DCA1EE81D14135B007B0496 /* Search.appex */;
173 | productType = "com.apple.product-type.xcode-extension";
174 | };
175 | /* End PBXNativeTarget section */
176 |
177 | /* Begin PBXProject section */
178 | 2DCA1ECA1D141336007B0496 /* Project object */ = {
179 | isa = PBXProject;
180 | attributes = {
181 | LastSwiftUpdateCheck = 0800;
182 | LastUpgradeCheck = 0800;
183 | ORGANIZATIONNAME = skyline;
184 | TargetAttributes = {
185 | 2DCA1ED11D141336007B0496 = {
186 | CreatedOnToolsVersion = 8.0;
187 | DevelopmentTeam = E4UPC35Z5N;
188 | DevelopmentTeamName = "佳亮 刘 (Personal Team)";
189 | ProvisioningStyle = Automatic;
190 | };
191 | 2DCA1EE71D14135B007B0496 = {
192 | CreatedOnToolsVersion = 8.0;
193 | DevelopmentTeam = E4UPC35Z5N;
194 | DevelopmentTeamName = "佳亮 刘 (Personal Team)";
195 | ProvisioningStyle = Automatic;
196 | };
197 | };
198 | };
199 | buildConfigurationList = 2DCA1ECD1D141336007B0496 /* Build configuration list for PBXProject "Xcode-Search" */;
200 | compatibilityVersion = "Xcode 3.2";
201 | developmentRegion = English;
202 | hasScannedForEncodings = 0;
203 | knownRegions = (
204 | en,
205 | Base,
206 | );
207 | mainGroup = 2DCA1EC91D141336007B0496;
208 | productRefGroup = 2DCA1ED31D141336007B0496 /* Products */;
209 | projectDirPath = "";
210 | projectRoot = "";
211 | targets = (
212 | 2DCA1ED11D141336007B0496 /* Xcode-Search */,
213 | 2DCA1EE71D14135B007B0496 /* Search */,
214 | );
215 | };
216 | /* End PBXProject section */
217 |
218 | /* Begin PBXResourcesBuildPhase section */
219 | 2DCA1ED01D141336007B0496 /* Resources */ = {
220 | isa = PBXResourcesBuildPhase;
221 | buildActionMask = 2147483647;
222 | files = (
223 | 2DCA1EDA1D141336007B0496 /* Assets.xcassets in Resources */,
224 | 2DCA1EDD1D141336007B0496 /* Main.storyboard in Resources */,
225 | );
226 | runOnlyForDeploymentPostprocessing = 0;
227 | };
228 | 2DCA1EE61D14135B007B0496 /* Resources */ = {
229 | isa = PBXResourcesBuildPhase;
230 | buildActionMask = 2147483647;
231 | files = (
232 | );
233 | runOnlyForDeploymentPostprocessing = 0;
234 | };
235 | /* End PBXResourcesBuildPhase section */
236 |
237 | /* Begin PBXSourcesBuildPhase section */
238 | 2DCA1ECE1D141336007B0496 /* Sources */ = {
239 | isa = PBXSourcesBuildPhase;
240 | buildActionMask = 2147483647;
241 | files = (
242 | 2DCA1ED81D141336007B0496 /* ViewController.swift in Sources */,
243 | 2DCA1ED61D141336007B0496 /* AppDelegate.swift in Sources */,
244 | );
245 | runOnlyForDeploymentPostprocessing = 0;
246 | };
247 | 2DCA1EE41D14135B007B0496 /* Sources */ = {
248 | isa = PBXSourcesBuildPhase;
249 | buildActionMask = 2147483647;
250 | files = (
251 | 2DCA1EF01D14135B007B0496 /* SourceEditorExtension.swift in Sources */,
252 | 2DCA1EF21D14135B007B0496 /* SourceEditorCommand.swift in Sources */,
253 | );
254 | runOnlyForDeploymentPostprocessing = 0;
255 | };
256 | /* End PBXSourcesBuildPhase section */
257 |
258 | /* Begin PBXTargetDependency section */
259 | 2DCA1EF51D14135B007B0496 /* PBXTargetDependency */ = {
260 | isa = PBXTargetDependency;
261 | target = 2DCA1EE71D14135B007B0496 /* Search */;
262 | targetProxy = 2DCA1EF41D14135B007B0496 /* PBXContainerItemProxy */;
263 | };
264 | /* End PBXTargetDependency section */
265 |
266 | /* Begin PBXVariantGroup section */
267 | 2DCA1EDB1D141336007B0496 /* Main.storyboard */ = {
268 | isa = PBXVariantGroup;
269 | children = (
270 | 2DCA1EDC1D141336007B0496 /* Base */,
271 | );
272 | name = Main.storyboard;
273 | sourceTree = "";
274 | };
275 | /* End PBXVariantGroup section */
276 |
277 | /* Begin XCBuildConfiguration section */
278 | 2DCA1EDF1D141336007B0496 /* Debug */ = {
279 | isa = XCBuildConfiguration;
280 | buildSettings = {
281 | ALWAYS_SEARCH_USER_PATHS = NO;
282 | CLANG_ANALYZER_NONNULL = YES;
283 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
284 | CLANG_CXX_LIBRARY = "libc++";
285 | CLANG_ENABLE_MODULES = YES;
286 | CLANG_ENABLE_OBJC_ARC = YES;
287 | CLANG_WARN_BOOL_CONVERSION = YES;
288 | CLANG_WARN_CONSTANT_CONVERSION = YES;
289 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
290 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
291 | CLANG_WARN_EMPTY_BODY = YES;
292 | CLANG_WARN_ENUM_CONVERSION = YES;
293 | CLANG_WARN_INT_CONVERSION = YES;
294 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
295 | CLANG_WARN_UNREACHABLE_CODE = YES;
296 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
297 | CODE_SIGN_IDENTITY = "-";
298 | COPY_PHASE_STRIP = NO;
299 | DEBUG_INFORMATION_FORMAT = dwarf;
300 | ENABLE_STRICT_OBJC_MSGSEND = YES;
301 | ENABLE_TESTABILITY = YES;
302 | GCC_C_LANGUAGE_STANDARD = gnu99;
303 | GCC_DYNAMIC_NO_PIC = NO;
304 | GCC_NO_COMMON_BLOCKS = YES;
305 | GCC_OPTIMIZATION_LEVEL = 0;
306 | GCC_PREPROCESSOR_DEFINITIONS = (
307 | "DEBUG=1",
308 | "$(inherited)",
309 | );
310 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
311 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
312 | GCC_WARN_UNDECLARED_SELECTOR = YES;
313 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
314 | GCC_WARN_UNUSED_FUNCTION = YES;
315 | GCC_WARN_UNUSED_VARIABLE = YES;
316 | MACOSX_DEPLOYMENT_TARGET = 10.11;
317 | MTL_ENABLE_DEBUG_INFO = YES;
318 | ONLY_ACTIVE_ARCH = YES;
319 | SDKROOT = macosx;
320 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
321 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
322 | };
323 | name = Debug;
324 | };
325 | 2DCA1EE01D141336007B0496 /* Release */ = {
326 | isa = XCBuildConfiguration;
327 | buildSettings = {
328 | ALWAYS_SEARCH_USER_PATHS = NO;
329 | CLANG_ANALYZER_NONNULL = YES;
330 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
331 | CLANG_CXX_LIBRARY = "libc++";
332 | CLANG_ENABLE_MODULES = YES;
333 | CLANG_ENABLE_OBJC_ARC = YES;
334 | CLANG_WARN_BOOL_CONVERSION = YES;
335 | CLANG_WARN_CONSTANT_CONVERSION = YES;
336 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
337 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
338 | CLANG_WARN_EMPTY_BODY = YES;
339 | CLANG_WARN_ENUM_CONVERSION = YES;
340 | CLANG_WARN_INT_CONVERSION = YES;
341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
342 | CLANG_WARN_UNREACHABLE_CODE = YES;
343 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
344 | CODE_SIGN_IDENTITY = "-";
345 | COPY_PHASE_STRIP = NO;
346 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
347 | ENABLE_NS_ASSERTIONS = NO;
348 | ENABLE_STRICT_OBJC_MSGSEND = YES;
349 | GCC_C_LANGUAGE_STANDARD = gnu99;
350 | GCC_NO_COMMON_BLOCKS = YES;
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | MACOSX_DEPLOYMENT_TARGET = 10.11;
358 | MTL_ENABLE_DEBUG_INFO = NO;
359 | SDKROOT = macosx;
360 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
361 | };
362 | name = Release;
363 | };
364 | 2DCA1EE21D141336007B0496 /* Debug */ = {
365 | isa = XCBuildConfiguration;
366 | buildSettings = {
367 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
368 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
369 | COMBINE_HIDPI_IMAGES = YES;
370 | INFOPLIST_FILE = "Xcode-Search/Info.plist";
371 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
372 | PRODUCT_BUNDLE_IDENTIFIER = "com.byskyline.Xcode-Search";
373 | PRODUCT_NAME = "$(TARGET_NAME)";
374 | SWIFT_VERSION = 3.0;
375 | };
376 | name = Debug;
377 | };
378 | 2DCA1EE31D141336007B0496 /* Release */ = {
379 | isa = XCBuildConfiguration;
380 | buildSettings = {
381 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
382 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
383 | COMBINE_HIDPI_IMAGES = YES;
384 | INFOPLIST_FILE = "Xcode-Search/Info.plist";
385 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
386 | PRODUCT_BUNDLE_IDENTIFIER = "com.byskyline.Xcode-Search";
387 | PRODUCT_NAME = "$(TARGET_NAME)";
388 | SWIFT_VERSION = 3.0;
389 | };
390 | name = Release;
391 | };
392 | 2DCA1EF81D14135B007B0496 /* Debug */ = {
393 | isa = XCBuildConfiguration;
394 | buildSettings = {
395 | CODE_SIGN_ENTITLEMENTS = Search/Search.entitlements;
396 | COMBINE_HIDPI_IMAGES = YES;
397 | INFOPLIST_FILE = Search/Info.plist;
398 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
399 | MACOSX_DEPLOYMENT_TARGET = 10.11;
400 | PRODUCT_BUNDLE_IDENTIFIER = "com.byskyline.Xcode-Search.Search";
401 | PRODUCT_NAME = "$(TARGET_NAME)";
402 | SKIP_INSTALL = YES;
403 | SWIFT_VERSION = 3.0;
404 | };
405 | name = Debug;
406 | };
407 | 2DCA1EF91D14135B007B0496 /* Release */ = {
408 | isa = XCBuildConfiguration;
409 | buildSettings = {
410 | CODE_SIGN_ENTITLEMENTS = Search/Search.entitlements;
411 | COMBINE_HIDPI_IMAGES = YES;
412 | INFOPLIST_FILE = Search/Info.plist;
413 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
414 | MACOSX_DEPLOYMENT_TARGET = 10.11;
415 | PRODUCT_BUNDLE_IDENTIFIER = "com.byskyline.Xcode-Search.Search";
416 | PRODUCT_NAME = "$(TARGET_NAME)";
417 | SKIP_INSTALL = YES;
418 | SWIFT_VERSION = 3.0;
419 | };
420 | name = Release;
421 | };
422 | /* End XCBuildConfiguration section */
423 |
424 | /* Begin XCConfigurationList section */
425 | 2DCA1ECD1D141336007B0496 /* Build configuration list for PBXProject "Xcode-Search" */ = {
426 | isa = XCConfigurationList;
427 | buildConfigurations = (
428 | 2DCA1EDF1D141336007B0496 /* Debug */,
429 | 2DCA1EE01D141336007B0496 /* Release */,
430 | );
431 | defaultConfigurationIsVisible = 0;
432 | defaultConfigurationName = Release;
433 | };
434 | 2DCA1EE11D141336007B0496 /* Build configuration list for PBXNativeTarget "Xcode-Search" */ = {
435 | isa = XCConfigurationList;
436 | buildConfigurations = (
437 | 2DCA1EE21D141336007B0496 /* Debug */,
438 | 2DCA1EE31D141336007B0496 /* Release */,
439 | );
440 | defaultConfigurationIsVisible = 0;
441 | };
442 | 2DCA1EF71D14135B007B0496 /* Build configuration list for PBXNativeTarget "Search" */ = {
443 | isa = XCConfigurationList;
444 | buildConfigurations = (
445 | 2DCA1EF81D14135B007B0496 /* Debug */,
446 | 2DCA1EF91D14135B007B0496 /* Release */,
447 | );
448 | defaultConfigurationIsVisible = 0;
449 | };
450 | /* End XCConfigurationList section */
451 | };
452 | rootObject = 2DCA1ECA1D141336007B0496 /* Project object */;
453 | }
454 |
--------------------------------------------------------------------------------
/Xcode-Search.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Xcode-Search.xcodeproj/xcuserdata/skyline.xcuserdatad/xcschemes/Search.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
6 |
9 |
10 |
16 |
22 |
23 |
24 |
30 |
36 |
37 |
38 |
39 |
40 |
45 |
46 |
47 |
48 |
54 |
55 |
56 |
57 |
58 |
59 |
70 |
72 |
78 |
79 |
80 |
81 |
82 |
83 |
90 |
92 |
98 |
99 |
100 |
101 |
103 |
104 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/Xcode-Search.xcodeproj/xcuserdata/skyline.xcuserdatad/xcschemes/Xcode-Search.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/Xcode-Search.xcodeproj/xcuserdata/skyline.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Search.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 | Xcode-Search.xcscheme
13 |
14 | orderHint
15 | 0
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 2DCA1ED11D141336007B0496
21 |
22 | primary
23 |
24 |
25 | 2DCA1EE71D14135B007B0496
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Xcode-Search/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Xcode-Search
4 | //
5 | // Created by skyline on 16/6/17.
6 | // Copyright © 2016年 skyline. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | @NSApplicationMain
12 | class AppDelegate: NSObject, NSApplicationDelegate {
13 |
14 |
15 |
16 | func applicationDidFinishLaunching(_ aNotification: Notification) {
17 | // Insert code here to initialize your application
18 | }
19 |
20 | func applicationWillTerminate(_ aNotification: Notification) {
21 | // Insert code here to tear down your application
22 | }
23 |
24 |
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/Xcode-Search/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/Xcode-Search/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
--------------------------------------------------------------------------------
/Xcode-Search/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2016年 skyline. All rights reserved.
29 | NSMainStoryboardFile
30 | Main
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Xcode-Search/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Xcode-Search
4 | //
5 | // Created by skyline on 16/6/17.
6 | // Copyright © 2016年 skyline. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | class ViewController: NSViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | // Do any additional setup after loading the view.
17 | }
18 |
19 | override var representedObject: AnyObject? {
20 | didSet {
21 | // Update the view, if already loaded.
22 | }
23 | }
24 |
25 |
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skyline75489/Xcode-Search/bcd9eb82e41089ee2a7eebe481fe0c36dcf6d381/screenshot.png
--------------------------------------------------------------------------------