0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

XcodeでSwiftの自動補完が効かなくなったら

0
Posted at

XcodeでSwiftを書いているとまれに頻発する

  • 自動補完が効かなくなる (文脈に応じた候補が出てこない)
  • Refactor > Rename... でエラーが出る

などの問題をXcodeを再起動せずに直したい。

解消方法

(Xcode 11.6 で確認)

以下のコマンドで補完などに関わってるプロセスをkillして強制再起動すると直る。
(killすると自動的に再起動される)

$ pgrep -f SourceKit | xargs kill

再起動するプロセス

  • /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/XPCServices/com.apple.dt.SKAgent.xpc/Contents/MacOS/com.apple.dt.SKAgent
  • /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework/Versions/A/XPCServices/SourceKitService.xpc/Contents/MacOS/SourceKitService
0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?