본문 바로가기
Flutter

[Flutter] 실행 시 minimum iOS 버전 문제 해결

by 자연송어 2024. 5. 1.

AWS S3 파일 업로드 기능을 구현하기 위해  amplify_auth_cognito 디펜던시를 추가해야 하는데

amplify_auth_cognito은 최소 IOS 13 배포 버전이 필요하다는 내용의 오류가 발생했다.

Error: The plugin "amplify_auth_cognito" requires a higher minimum iOS deployment version than your application is targeting.
To build, increase your application's deployment target to at least 13.0 as described at https://docs.flutter.dev/deployment/ios
Error running pod install
Error launching application on iPhone 15 Pro Max.

 

확인해보니 ios 폴더 내 배포 버전이 12버전을 가리키고 있는 것으로 확인되어

다음과 같이 12버전을 13버전으로 변경하였다.

 

 

1. ios/Podfile에서 아래와 같이 버전을 13버전으로 변경 

# platform :ios, '13.0'

 

2. ios/AppFrameworkInfo.plist에서 아래와 같이 13버전으로 변경

<key>MinimumOSVersion</key>
<string>13.0</string>

 

3. 전체 검색으로 IPHONEOS_DEPLOYMENT_TARGET을 검색 후 13버전으로 변경

ios/Runner.xcodeproj/project.pbxproj

IPHONEOS_DEPLOYMENT_TARGET = 13.0;

 

4.  ios/Podfile로 이동 후 RunnerTests 항목을 주석 처리

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  # target 'RunnerTests' do
  #   inherit! :search_paths
  # end
end

 

5. 아래 코드 실행 

flutter clean && flutter pub get && cd ios/ && pod install
flutter run