【Unity】xcrun: error: SDK "iphoneos" cannot be locatedエラーの対処法

問題

MaciOS向けにビルドした際に下記のようなエラーが発生した。

Library/Bee/artifacts/iOS/AsyncPluginsFromLinker: xcrun: error: SDK "iphoneos" cannot be located

原因

ターミナル等でXCodeコマンドラインツールのパスを確認するとこうなっていた。

$ xcode-select -p
/Library/Developer/CommandLineTools

解決方法

下記のパスに変更することで解決した。

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