khstar

flutter 개발시 vscode에서 ios device가 선택 안되는 경우 본문

개발

flutter 개발시 vscode에서 ios device가 선택 안되는 경우

khstar 2021. 9. 27. 23:20
반응형

vscode로 flutter의 샘플앱을 개발해 보던중 갑자기 연결한 ios device가 나타나지 않은 문제가 발생했습니다.

 

그래서 일단 접어두고 Runner를 xCode에서 열어서 build를 해보려고 하니 xCode에서는 아래와 같은 에러가 발생합니다. 

 

command phasescriptexecution failed with a nonzero exit code

 

문제 해결은 생각보다 간단했습니다. 

 

flutter doctor를 실행하니 아래와 같은 메시지가 나옵니다.

 

[!] Xcode - develop for iOS and macOS

    Xcode installation is incomplete; a full installation is necessary for iOS development.

      Download at: https://developer.apple.com/xcode/download/

      Or install Xcode via the App Store.

      Once installed, run:

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

        sudo xcodebuild -runFirstLaunch

 

위에 빨간색으로 된 명령어를 terminal에서 실행해 주면 xCode에서도 정상적으로 빌드가 되고

vscode에도 ios device가 선택 가능하게 됩니다.

반응형
Comments