Flutter/Flutter 에러 해결

[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')

딸기케잌🍓 2024. 6. 4. 14:16

에러 메시지

   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/Developments/multi_package_asset/features/notification/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh: Permission denied
    Command PhaseScriptExecution failed with a nonzero exit code
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: 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 'nanopb-nanopb_Privacy' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'firebase_messaging-firebase_messaging_Privacy' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: 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 'PromisesObjC-FBLPromises_Privacy' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: 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 'flutter_local_notifications-flutter_local_notifications_privacy' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: 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 'nanopb' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: 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 'PromisesObjC' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: 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 'GoogleUtilities-GoogleUtilities_Privacy' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: 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 'GoogleUtilities' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: 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-GoogleDataTransport_Privacy' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'FirebaseCoreInternal-FirebaseCoreInternal_Privacy' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: 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')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'FirebaseCoreInternal' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'FirebaseCore-FirebaseCore_Privacy' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'FirebaseCore' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'FirebaseInstallations-FirebaseInstallations_Privacy' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'FirebaseInstallations' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'FirebaseMessaging-FirebaseMessaging_Privacy' from project 'Pods')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'FirebaseMessaging' from project 'Pods')
    note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
    note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
    /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.5.99. (in target 'Firebase' from project 'Pods')

Could not build the precompiled application for the device.

 

 

원인

  1. 스크립트 파일의 권한 문제: /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh 파일에 대한 권한 문제.
  2. iOS Deployment Target 설정 문제: 다양한 종속성에서 서로 다른 iOS Deployment Target이 설정되어 경고가 발생하고 있습니다.

 

해결

 

1. 스크립트 파일의 권한 문제 해결

스크립트 파일에 실행 권한을 부여합니다.

chmod +x /Users/dayeon/Developments/multi_package_asset/features/notification/example/ios/Pods/Target\ Support\ Files/Pods-Runner/Pods-Runner-resources.sh

 

2. CocoaPods 설치 및 업데이트

Podfile을 수정한 후, 다음 명령을 실행하여 CocoaPods 종속성을 설치 및 업데이트합니다.

cd ios
pod install
pod update

 

 

3. 프로젝트 클린 및 재빌드

flutter clean
flutter pub get
flutter build ios