Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, in Flutter How can I change the minimum IOS Deploying Target

Tags:

xcode

ios

flutter

I changed everything to 9.0 in the project but I'm having the same error in a lot of pods.

I tried doing a lot of different things but nothing worked. Does anyone know how can I fix this?

warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'GoogleAppMeasurement' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'FirebaseAuth' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'GoogleUtilities' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'vibration' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'nanopb' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'BoringSSL-GRPC' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'gRPC-Core' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
9.0 to 14.0.99. (in target 'gRPC-C++' from project 'Pods')

Encountered error while building for device.

like image 425
Raffaelli L.C. Avatar asked Oct 07 '22 05:10

Raffaelli L.C.


People also ask

How do I change iOS deployment target?

Select the Build Settings tab at the top and search for deployment target. The Deployment section shows four build settings that relate to the deployment target: iOS Deployment Target. macOS Deployment Target.

Is set to 8.0 but the range of supported deployment target versions is 9.0 to?

to Solve The iOS Simulator deployment targets is set to 8.0, but the range of supported deployment target version for this platform is 9.0 to 14.1 You can set up your profile to automatically match the deployment target of all the profiles to your current project deployment target like Solution 1.

Is set to 8.0 but the range of supported deployment target versions?

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14. This is happening because support for iOS 8 has been dropped, but the minimum deployment target for the pod is iOS 8.


1 Answers

What worked for me is a combination of @raffaelli-l-c and @arhan-reddy-busam answer.

Ensure that you do the following:

  • Set MinimumOSVersion to 9.0 in ios/Flutter/AppFrameworkInfo.plist
  • Ensure that you uncomment platform :ios, '9.0' in ios/Podfile
  • Ensure that ios/Podfile contains the following post install script:
    post_install do |installer|
      installer.pods_project.targets.each do |target|
        flutter_additional_ios_build_settings(target)
        target.build_configurations.each do |config|
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
        end
      end
    end

The following routine works for me when doing my production build:

    flutter clean \
        && rm ios/Podfile.lock pubspec.lock \
        && rm -rf ios/Pods ios/Runner.xcworkspace \
        && flutter build ios --build-name=1.0.0 --build-number=1 --release --dart-define=MY_APP_ENV=prod
like image 205
Je Suis Alrick Avatar answered Oct 12 '22 10:10

Je Suis Alrick