Flutter, 설치부터 실행까지
2019. 4. 14. 16:29ㆍ개발/Flutter
환경 - Flutter, MacOS, iPhone
1. Flutter SDK 설치
https://flutter.dev/docs/get-started/install/macos#get-the-flutter-sdk
- SDK 다운로드
- 압축풀고 ~/.bash_profile에 bin 경로를 추가
2. Flutter doctor
- flutter doctor 명령어로 환경을 체크할 수 있음.
- 친절하게 해야할 부분이 다 설명되어 있어서 그대로 실행하면 됨
Seobsui-MacBookAir:development seobs$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.4 18E226, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[!] iOS toolchain - develop for iOS devices (Xcode 10.2)
✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
brew update
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
[!] Android Studio (version 3.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
3. 프로젝트 생성
https://flutter.dev/docs/get-started/install/macos#create-and-run-a-simple-flutter-app
- 프로젝트를 만들고 실행하는 부분
flutter create my_app
cd my_app
flutter run
4. Xcode error
- 바로 iPhone으로 실행하면 아래처럼 에러가 나온다.
- Signing 이슈일테니 Xcode를 열어서 설정만 해주면 된다. Xcode를 여는 명령어는 open ios/Runner.scworkspace 이다.
2019-04-14 16:08:49.698 ios-deploy[43000:909726] [ !! ] Unable to locate DeviceSupport directory with suffix 'Symbols'. This probably means you don't have Xcode installed, you will need to launch the app manually and logging output will not be shown!
Could not install build/ios/iphoneos/Runner.app on 00008020-000A392226EA002E.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
Error launching application on Chang Seob의 iPhoneXS.
참고
https://flutter.dev/docs/get-started/install/macos#deploy-to-ios-devices
5. 다시 실행
flutter run
'개발 > Flutter' 카테고리의 다른 글
Flutter, Null Safety 이후의 Provider, Model, SharedPreferences 관계 사용하기 (0) | 2021.07.31 |
---|