Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 858
maxpill Avatar asked May 15 '20 15:05

maxpill


People also ask

How do you change iOS target in flutter?

Click on pods. Select each project and target and click on build settings. Under Deployment section change the iOS Deployment Target version to anything more than 8.0 (better to try the same project version). Repeat this for every other project in your pods then run the app.

What is iOS deployment target?

In short, every application that runs on one of Apple's platforms has a deployment target. A deployment target is nothing more than the minimum version of the operating system the application can run on. Fire up Xcode and create a new project by choosing the App template from the iOS > Application section.

How do I change the minimum deployment target in Xcode?

To change your deployment target, open up your project file in Xcode and check the setting under Build Settings -> Deployment(...) Check this answer to add earlier devices support.

How do I lower app deployment target?

If you haven't already, change the deployment target to the lowest iOS version you want to support, select the project name then select your app target, choose General and change the version in Deployment Info.


2 Answers

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.

like image 148
maxpill Avatar answered Sep 17 '22 03:09

maxpill


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.

like image 36
Paresh Mangukiya Avatar answered Sep 21 '22 03:09

Paresh Mangukiya