Flutter - The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0 && Build input file cannot be found GoogleService-Info.plist

35,464

Solution 1

To get rid of this warning:

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'AppAuth' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'GTMAppAuth' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'gRPC-Core' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'BoringSSL-GRPC' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 5.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'leveldb-library' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'nanopb' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'GTMSessionFetcher' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'gRPC-C++' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'abseil' from project 'Pods')

Make sure your Podfile contains this line

config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    end
  end
end

To make the app build successfully and get rid of:

error: Build input file cannot be found: '/Users/User/Downloads/GoogleService-Info.plist' (in target 'Runner' from project 'Runner')

remove and add again through Xcode, the GoogleService-Info.plist file.

Solution 2

With Xcode 12 using you have probably seen this error:

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.

Until this is fixed, you can add the following to your Podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end

This will remove the deployment target from all the pods in your project and allows them to inherit the project/workspace deployment target that has been specified at the top of Podfile.

Solution 3

A little improvement to maxpills answer

post_install do |installer|

  puts 'Determining pod project minimal deployment target'

  pods_project = installer.pods_project
  deployment_target_key = 'IPHONEOS_DEPLOYMENT_TARGET'
  deployment_targets = pods_project.build_configurations.map{ |config| config.build_settings[deployment_target_key] }
  minimal_deployment_target = deployment_targets.min_by{ |version| Gem::Version.new(version) }

  puts 'Minimal deployment target is ' + minimal_deployment_target
  puts 'Setting each pod deployment target to ' + minimal_deployment_target

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings[deployment_target_key] = minimal_deployment_target
    end
  end
end

This is using the target version defined at the start of the Podfile

platform :ios, '9.0'

Solution 4

Project Document in attributes inspector highlighted

  1. Open Xcode
  2. Change Project Document -> Project format -> Xcode 8.0-Compatible
  3. flutter clean, flutter pub get an flutter build iOS

Solution 5

For me it was set to 8.0 in the highlighted field here in XCode, setting it to 10 fixed it for me.

enter image description here

Share:
35,464
maxpill
Author by

maxpill

Github: https://github.com/maxpill LinkedIn: https://pl.linkedin.com/in/maksymilian-pilżys-b810b8175

Updated on June 23, 2021

Comments

  • maxpill
    maxpill about 3 years

    I cannot build a Flutter app on iOS simulator. I am getting this error over and over. My flutter-doctor is clean.

     Launching lib/main.dart on iPhone SE (2nd generation) in debug mode...
        Xcode build done.                                           26,7s
        Failed to build iOS app
        Error output from Xcode build:
        ↳
            ** BUILD FAILED **
        Xcode's output:
        ↳
            error: Build input file cannot be found: '/Users/User/Downloads/GoogleService-Info.plist' (in target 'Runner' from project 'Runner')
            note: Using new build system
            note: Building targets in parallel
            note: Planning build
            note: Constructing build description
            warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'AppAuth' from project 'Pods')
            warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'GTMAppAuth' from project 'Pods')
            warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'gRPC-Core' from project 'Pods')
            warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'BoringSSL-GRPC' from project 'Pods')
            warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 5.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'leveldb-library' from project 'Pods')
            warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
            warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'nanopb' from project 'Pods')
            warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'GTMSessionFetcher' from project 'Pods')
            warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'gRPC-C++' from project 'Pods')
            warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'abseil' from project 'Pods')
        Could not build the application for the simulator.
        Error launching application on iPhone SE (2nd generation).
        Exited (sigterm)
    

    Flutter doctor

  • p0wl
    p0wl over 3 years
    You have one line in there that says 'DEBUG=1'] Is this somehow a copy paste error? :)
  • maxpill
    maxpill over 3 years
    for sure it is @p0wl
  • p0wl
    p0wl over 3 years
    So the real question is: Is there half a line missing or should I just remove the 'DEBUG=1']?
  • Stevey
    Stevey over 3 years
    Can you please fix the syntax errors in this answer.
  • RiddlerDev
    RiddlerDev over 3 years
    When I do this... I am now getting - In file included from /Users/mridley/_development/flutter/.pub-cache/hosted/pub.da‌​rtlang.org/package_i‌​nfo-0.4.3+2/ios/Clas‌​ses/FLTPackageInfoPl‌​ugin.m:5: /Users/mridley/_development/flutter/.pub-cache/hosted/pub.da‌​rtlang.org/package_i‌​nfo-0.4.3+2/ios/Clas‌​ses/FLTPackageInfoPl‌​ugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found - Any ideas?
  • maxpill
    maxpill over 2 years
    @RiddlerDev run 'flutter pub cache repair & flutter clean & cd ios & pod deintegrate & flutter pub get' then run the app once again