Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit 1f5e279

Browse files
authored
Merge pull request #65 from haifengkao/updateIosReadme
update readme for easier iOS devilment setting
2 parents 1b2b9fe + 32c3d53 commit 1f5e279

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ You can add the following configs. This will improve your autocompletion. Though
8989
9090
### How do I get autocompletion for UIKit?
9191

92-
You can add new autocomplation targets through your configuration.
92+
With sourcekite, you can add new autocompletion targets through your configuration.
9393

9494
```json
9595
// .vscode/settings.json example for iOS and WatchOS
@@ -121,6 +121,48 @@ You can add new autocomplation targets through your configuration.
121121
}
122122
```
123123

124+
Since Xcode 11.4, you may use its built-in support for sourcekit-lsp
125+
```json
126+
// .vscode/settings.json example for iOS
127+
{
128+
"sde.languageservermode": "sourcekit-lsp",
129+
"sourcekit-lsp.serverPath": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp",
130+
"sourcekit-lsp.toolchainPath": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain",
131+
"sde.swiftBuildingParams" : [
132+
"build",
133+
"-Xswiftc",
134+
"-sdk",
135+
"-Xswiftc",
136+
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk",
137+
"-Xswiftc",
138+
"-target",
139+
"-Xswiftc",
140+
"arm64-apple-ios11.0"
141+
]
142+
}
143+
```
144+
145+
```json
146+
// .vscode/settings.json example for WatchOS
147+
{
148+
"sde.languageservermode": "sourcekit-lsp",
149+
"sourcekit-lsp.serverPath": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp",
150+
"sourcekit-lsp.toolchainPath": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain",
151+
"sde.swiftBuildingParams" : [
152+
"build",
153+
"-Xswiftc",
154+
"-sdk",
155+
"-Xswiftc",
156+
"/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk",
157+
"-Xswiftc",
158+
"-target",
159+
"-Xswiftc",
160+
"armv7k-apple-watchos4.0"
161+
]
162+
}
163+
```
164+
165+
124166
### Other questions?
125167

126168
If so, file an [issue](https://github.com/vknabel/swift-development-environment/issues), please :)

0 commit comments

Comments
 (0)