0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SweetPadを導入したら、「No Xcode scheme was found. Select the workspace that has the Xcode project to use SweetPad.」となったので対処した

Posted at

問題

こちらの記事を参考にCursor(VSCode)でiosアプリの開発環境を整えていた。しかし、SweetPad拡張機能を入れたところ、エラーが発生。

No Xcode scheme was found.
Select the workspace that has the Xcode project to use SweetPad.

この状態でBuildしても当然ながらうまくいかない。ログを見ると、以下のエラーが出ていた。

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

原因

macOSにはXcodeや開発ツールを探す場所として認識するディレクトリ=「アクティブデベロッパディレクトリ」という概念がある。アクティブデベロッパディレクトリがCommand Line Tools(CLT)のみに設定されているとうまくいかない。

以下のコマンドでアクティブデベロッパディレクトリに設定パスを確認してみる。

xcode-select -p

CLTが選択されている場合は

/Library/Developer/CommandLineTools

となる。

解決策

アクティブデベロッパディレクトリを以下のコマンドでXcodeに切り替えれば良い。

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

パスが

/Applications/Xcode.app/Contents/Developer

のようになっていればOK。

参考

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?