Sua Blog

Flutter IOS 빌드 에러 대응

IOS 빌드 에러 대응

Flutter에서 버전 업그레이드나 다운그레이드를 하다보면 빌드에러가 발생할 수 있다.

보통 이런 경우 cache 되어 있는 파일들을 모두 삭제 후 다시 설치하여 해결할 수 있다.

  1. ios 빌드 캐시 삭제
cd ios/
rm Podfile.lock
rm Podfile
rm -rf Pods
pod cache clean --all
  1. flutter 캐시 삭제 및 dependency 재설치
cd ..
flutter clean
flutter pub get
  • pod install전 새로 만들어진 Podfile에 추가
platform :ios, '13.0'

 target.build_configurations.each do |build_configuration|
      build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'
  1. pod 재설치
cd ios/
pod install
  1. ide 재시작
참고: https://hijigoo.github.io/flutter/2021/05/05/error-tip-01/