Flutter 9

[에러해결] Failed to verify code signature of... | The identity used to sign the executable is no longer valid.

에러발생Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.7bcLRc/extracted/Runner.app : 0xe8008018 (The identity used to sign the executable is no longer valid.) Please ensure that the certificates used to sign your app have not expired. If this issue persists, please attach an IPA of your app when sending a report to Apple.   갑자기 빌드를 잘하던 앱이 요상한 에..

[Flutter Architecture] 앱 아키텍처 가이드

이 글은 https://docs.flutter.dev/app-architecture/guide 를 읽고 정리한 내용입니다. 프로젝트 구조 개요관심사의 분리가 가장 중요한 원리로 플러터 앱은 크게 UI 레이어와 Data 레이어로 나눠질 수 있습니다.각 레이어는 다음과 같이 더 디테일하게 분리될 수 있고, 각 구성요소는 고유한 책임, 인터페이스, 각각의 경계및 종속성을 가지고 있습니다.ViewView modelsRepositoriesServicesMVVM앱을 세개의 부분으로 나누는데 Model, ViewModel, Model 로 나눌 수 있습니다.View, ViewModel : 앱의 UI를 그리는 뷰와, 그 뷰에서 필요한 로직을 처리하는 뷰 모델Repositories, Services : 앱 데이터의 sin..

[flutter 에러해결] The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'GoogleDataTransport' from project 'Pods')

에러 메시지 Writing result bundle at path: /var/folders/jh/y9698_j138qclsq5jcwck9jh0000gn/T/flutter_tools.4Bjdjz/flutter_ios_build_temp_dirANxhRM/temporary_xcresult_bundle /Users/dayeon/Library/Developer/Xcode/DerivedData/Runner-ealmqulhcewlragkkxbxwsthahph/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-21EA686D5646CF8A3CCBD44A.sh: line 2: /Users/dayeon/Developme..

[flutter 에러 해결] Framework 'Pods_Runner' not found

재현flutter plugin 프로젝트 생성프로젝트 명/example/ios 폴더 우클릭 Flutter -> Open Ios module in XCode 클릭Xcode에서 Product -> Run 클릭 발생한 에러Framework 'Pods_Runner' not foundLinker command failed with exit code 1 (use -v to see invocation) 원인CocoaPods가 플러터 플러그인 프로젝트의 종속성을 올바르게 설치하지 못했을 때 발생해결프로젝트 클린 및 재빌드flutter cleanflutter pub getcd iospod installpod updatecd ..flutter build ios

[Flutter] flutter plugin 만들기

flutter의 앱 관리 기능을 외부에서도 가져다 쓸 수 있게 패키지화 했던 개발 기록기이다. 문제점일반적으로 IDE에서 만드는 New Flutter Project로 프로젝트를 생성할 경우flutter를 이용해서 Running하는 애플리케이션을 만드는 용도로 생성이 된다.이 구조로 flutter plugin을 만들려고 시도해서 꽤나 삽질을 했다.😂 pub.dev에서 가져온 플러그인도 내가 만드는 앱 관리 패키지에서 쓸 수 있어야 하고, 직접 만든 Plugin도 쓸 수 있어야 했는데pub.dev에서 가져온 플러그인은 잘 실행이 되고, 직접 만든 플러그인은 MainActivity.kt 파일에서 코드가 실행되지 않는 문제점이 있었다.   해결 과정내가 삽질했던 프로젝트의 구조(일반적인 방법으로 Flutter..

[flutter] Isolate를 이용한 동시성 제어

요구사항앱(.apk파일)을 다운로드하는 도중에 중지 버튼을 눌러 중지시킬 수 있어야 한다.다운로드 받으면서 실시간으로 몇 MB까지 다운로드 됐는지 UI를 계속 업데이트 해야 한다.현재 앱이 백그라운드로 내려가도, 다운로드는 중지되지 않고 계속 실행되어야 한다. => Isolate를 이용해서 앱을 별도의 쓰레드에서 다운로드 하도록 하고 중지 버튼 이벤트를 받을 수 있게 해야 한다. Isolate란 무엇인가Dart 코드는 스레드가 아닌 isolate의 내부에서 실행된다.각 isolate는 자신의 메모리 힙을 가지고, 다른 isolate에서는 자신의 상태에 접근할 수 없다. (공유하는 메모리가 없다.)Isolate를 사용하면 Dart 코드가 추가 프로세서 코어를 사용하여 여러가지 독립된 작업을 한 번에 수행할..

adb: failed to open ~build/app/outputs/flutter-apk/app-debug.apk: Operation not permitted

안드로이드 실행시 다음과 같은 에러 발생  Error: ADB exited with exit code 1Performing Streamed Installadb: failed to open /Users/chouchou/what_flutter_can_do_today/build/app/outputs/flutter-apk/app-debug.apk: Operation not permittedError launching application on sdk gphone arm64.  열심히 검색해본 결과 회사 보안프로그램 때문에 발생했다. 보안 프로그램 삭제 후 안드로이드 실행시 문제 없으 실행 됌

[에러 해결] android studio에서 Dart SDK is not configured

상황 다음 캡쳐와 같이 Dart SDK is not configured 경고 메세지가 나온다. 해결 Open Dart settings 클릭한다. Dart SDK path 부분이 중요한데 플러터를 설치한 위치 밑에 'flutter/bin/cache/dart-sdk'이 부분까지 정확히 적어줘야 한다 그리고 두 개 체크박스까지 체크해준다. 상황2 run 버튼이 비활성화되어 있고 Add Configuration...이 보인다. 해결 안드로이드 스튜디오 첫 실행시 나오는 화면에서 Plugins -> flutter 검색 -> Install 또는 command + , 눌러서 Settings 창을 열고 좌상단 검색창에 'plugins' 검색 -> flutter 검색 -> Install

[에러 해결] Flutter SDK not available (feat. Intl)

상황 VS Code에서 Flutter Intl 익스텐션 설치 후 Command + Shift + P 단축키로 Command Palette...실행 Flutter Intl: Initialize 입력하고 누를시 다음과 같은 에러 발생 시도1 flutter가 설치된 경로를 ~/.zshrc에 PATH 추가하기 which flutter 위 명령어 입력시 [경로]/flutter/bin 까지의 경로를 확인하고, 아래처럼 ~/.zshrc에 flutter SDK 경로 추가한다. export PATH="$PATH:/Users/someone/Developments/flutter/bin" 그리고 재부팅 같은 에러가 나고 해결안됨 시도2 settings.json파일에 "dart.flutterSdkPath": "/Users/so..