I am trying to run my project in ios simulator but this error comes. I tried all methods of pod install,upgrade, cache repair but still this error comes.
flutter run
Launching lib/main.dart on iPhone 12 Pro in debug mode...
Running Xcode build...
Xcode build done. 24.1s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/1y/xfyy4w9117qf36tz3pykqjc40000gn/T/flutter_tools.d5EOkm/flutter_ios_build_temp_dirJpnZlP/temporary_xc
result_bundle
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Runner/Runner-Bridging-Header.h:1:9: note: in file included from
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Runner/Runner-Bridging-Header.h:1:
#import "GeneratedPluginRegistrant.h"
^
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Runner/GeneratedPluginRegistrant.h:10:9: error: 'Flutter/Flutter.h'
file not found
#import <Flutter/Flutter.h>
^
1 error generated.
<unknown>:0: error: failed to emit precompiled header
'/Users/hanish/Library/Developer/Xcode/DerivedData/Runner-hlbnjxqvkiahufarpfxgzkipcqlr/Build/Intermediates.noindex/P
recompiledHeaders/Runner-Bridging-Header-swift_IKXG2TX2ZINE-clang_20Z0KHQ3WLHE0.pch' for bridging header
'/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Runner/Runner-Bridging-Header.h'
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Runner/Runner-Bridging-Header.h:1:9: note: in file included from
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Runner/Runner-Bridging-Header.h:1:
#import "GeneratedPluginRegistrant.h"
^
2 errors generated.
note: Building targets in dependency order
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'PhoneNumberKit' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'nanopb' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'libPhoneNumber-iOS' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'leveldb-library' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'abseil' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does
not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure
it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'abseil' from
project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'Toast' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'PromisesObjC' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'OrderedSet' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'GTMSessionFetcher' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'FMDB' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'BoringSSL-GRPC' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does
not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure
it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target
'BoringSSL-GRPC' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'AppAuth' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'razorpay-pod' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'GoogleUtilities' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'GTMAppAuth' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'GoogleDataTransport' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'FirebaseCore' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'FirebaseStorage' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'FirebaseAuth' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'FirebaseInstallations' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'gRPC-Core' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does
not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure
it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'gRPC-Core'
from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'FirebaseMessaging' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'FirebaseCrashlytics' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'GoogleAppMeasurement' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'gRPC-C++' from project 'Pods')
warning: Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does
not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure
it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'gRPC-C++'
from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'FirebaseFirestore' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'FirebaseAnalytics' from project 'Pods')
warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any
outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in
every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project
'Runner')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'GoogleSignIn' from project 'Pods')
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to
16.0.99. (in target 'Firebase' from project 'Pods')
Result bundle written to path:
/var/folders/1y/xfyy4w9117qf36tz3pykqjc40000gn/T/flutter_tools.d5EOkm/flutter_ios_build_temp_dirJpnZlP/temporary_xc
result_bundle
Error (Xcode): 'Flutter/Flutter.h' file not found
/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Runner/GeneratedPluginRegistrant.h:9:8
Error (Xcode): failed to emit precompiled header
'/Users/hanish/Library/Developer/Xcode/DerivedData/Runner-hlbnjxqvkiahufarpfxgzkipcqlr/Build/Intermediates.noindex/Preco
mpiledHeaders/Runner-Bridging-Header-swift_IKXG2TX2ZINE-clang_20Z0KHQ3WLHE0.pch' for bridging header
'/Users/hanish/FlutterDev/fitelo-mobile-app/ios/Runner/Runner-Bridging-Header.h'
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro.
Related
This question already has answers here:
The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, in Flutter How can I change the minimum IOS Deploying Target
(18 answers)
Closed 11 months ago.
macbookpro#MacBooks-MacBook-Pro regnum_toll_update % flutter run
Launching lib/main.dart on iPhone 8 Plus in debug mode...
Running pod install... 22.4s
Running Xcode build...
Xcode build done. 214.7s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/macbookpro/AndroidStudioProjects/regnum_toll_update/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRFirebaseUserAgent.m:95:53: warning: 'hasSwiftRuntime' is deprecated
[-Wdeprecated-declarations]
NSString *swiftFlagValue = [GULAppEnvironmentUtil hasSwiftRuntime] ? #"true" : #"false";
^
In file included from /Users/macbookpro/AndroidStudioProjects/regnum_toll_update/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRFirebaseUserAgent.m:19:
/Users/macbookpro/AndroidStudioProjects/regnum_toll_update/ios/Pods/Headers/Public/GoogleUtilities/GULAppEnvironmentUtil.h:50:25: note: 'hasSwiftRuntime' has been explicitly marked deprecated
here
+ (BOOL)hasSwiftRuntime __deprecated;
^
In module 'Foundation' imported from /Users/macbookpro/AndroidStudioProjects/regnum_toll_update/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRFirebaseUserAgent.h:17:
In module 'CoreFoundation' imported from
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundati
on.h:16:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/usr/include/sys/cdefs.h:196:40: note: expanded from macro
'__deprecated'
#define __deprecated attribute((deprecated))
^
1 warning generated.
While building module 'firebase_core' imported from /Users/macbookpro/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_database-6.0.0/ios/Classes/FLTFirebaseDatabasePlugin.m:8:
In file included from :1:
In file included from /Users/macbookpro/AndroidStudioProjects/regnum_toll_update/ios/Pods/Target Support Files/firebase_core/firebase_core-umbrella.h:13:
In file included from /Users/macbookpro/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.7.0/ios/Classes/FLTFirebaseCorePlugin.h:11:
/Users/macbookpro/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.7.0/ios/Classes/FLTFirebasePlugin.h:9:9: error: include of non-modular header inside framework module
'firebase_core.FLTFirebasePlugin': '/Users/macbookpro/AndroidStudioProjects/regnum_toll_update/ios/Pods/Headers/Public/FirebaseCore/FirebaseCore.h'
[-Werror,-Wnon-modular-include-in-framework-module]
#import <FirebaseCore/FirebaseCore.h>
^
1 error generated.
/Users/macbookpro/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_database-6.0.0/ios/Classes/FLTFirebaseDatabasePlugin.m:8:9: fatal error: could not build module 'firebase_core'
#import <firebase_core/FLTFirebasePlugin.h>
~~~~~~~^
2 errors generated.
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 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'Reachability' from
project 'Pods')
warning: 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.3.99. (in target 'leveldb-library'
from project 'Pods')
warning: 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.3.99. (in target 'gRPC-Core' from
project 'Pods')
warning: 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.3.99. (in target 'gRPC-C++' from
project 'Pods')
warning: 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.3.99. (in target
'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
warning: 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.3.99. (in target 'abseil' from
project 'Pods')
warning: 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.3.99. (in target 'BoringSSL-GRPC'
from project 'Pods')
warning: 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.3.99. (in target 'Flutter' from
project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 8 Plus.
Check the error message clearly. See the last line:
warning: 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.3.99. (in target 'Flutter'
from project 'Pods')
So basically, upgrade the iPhone deployment target which is required for Firebase integration. How to do that, please check this SO thread
as I said in the title I'm not able to run iOS simulator with Firecloud.
If I only add Firebase_core package to pubspec.yaml all works fine, but when I add cloud_firestore: ^3.1.5 I got this error:
P.s. With Android simulator all works fine.
Launching lib/main.dart on iPhone 13 in debug mode...
Running Xcode build...
Xcode build done. 9.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/luca/Desktop/prova/ios/Pods/gRPC-Core/third_party/upb/upb/port.c:2:10: fatal error: 'upb/port_def.inc' file not found
#include "upb/port_def.inc"
^~~~~~~~~~~~~~~~~~
1 error generated.
/Users/luca/Desktop/prova/ios/Pods/gRPC-Core/third_party/upb/upb/msg.c:2:10: fatal error: 'upb/msg.h' file not found
#include "upb/msg.h"
^~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/luca/Desktop/prova/ios/Pods/Pods.xcodeproj: warning: 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 15.2.99. (in target 'BoringSSL-GRPC' from project 'Pods')
/Users/luca/Desktop/prova/ios/Pods/Pods.xcodeproj: warning: 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 15.2.99. (in target 'abseil' from project 'Pods')
/Users/luca/Desktop/prova/ios/Pods/Pods.xcodeproj: warning: 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 15.2.99. (in target 'gRPC-Core' from project 'Pods')
/Users/luca/Desktop/prova/ios/Pods/Pods.xcodeproj: warning: 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 15.2.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
/Users/luca/Desktop/prova/ios/Pods/Pods.xcodeproj: warning: 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 15.2.99. (in target 'leveldb-library' from project 'Pods')
/Users/luca/Desktop/prova/ios/Pods/Pods.xcodeproj: warning: 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 15.2.99. (in target 'gRPC-C++' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 13.
Can anyone help me? I am stuck with this error since 2 weeks ago :S
thanks to all.
Add this line in your pod file
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
end
I'm trying to run flutter app on Apple Simulator but I can't able to run it, I got errors as below. this project woking in another Apple Mac book pro. What went wrong here?
I tried flutter clean then flutter run this wasn't works
Prasaths-MacBook-Pro:Foodom_ios prasathsivanathan$ flutter run
Launching lib/main.dart on iPhone 8 in debug mode...
Running Xcode build...
Xcode build done. 2.3s
Failed to build iOS app
Error output from Xcode build:
↳
objc[12138]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1eec8c188) and ??
(0x115c482b8). One of the two will be used. Which one is undefined.
objc[12138]: Class AMSupportURLSession is implemented in both ?? (0x1eec8c1d8) and ?? (0x115c48308). One
of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
In file included from
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/U
tilities/FIRAuthURLPresenter.m:24:
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/U
tilities/FIRAuthDefaultUIDelegate.h:18:24: error: 'TARGET_OS_WATCHOS' is not defined, evaluates to 0
[-Werror,-Wundef-prefix=TARGET_OS_]
#if !TARGET_OS_OSX && !TARGET_OS_WATCHOS
^
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'nanopb' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'Toast' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'geolocator' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'leveldb-library' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'google_maps_flutter' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'location_permissions' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'fluttertoast' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'GoogleDataTransport' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'GoogleUtilities' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'FirebaseCore' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'FirebaseDatabase' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'FirebaseAuth' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'firebase_auth' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'firebase_core' from project 'Pods')
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use
a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target
'Runner' from project 'Runner')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'Flutter' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'firebase_database' from project 'Pods')
/Users/prasathsivanathan/Desktop/Projects/Flutter/Foodom_ios/ios/Pods/Pods.xcodeproj: warning: 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.5.99. (in target 'Firebase' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 8.
I cannot build a React Native app on iOS simulator. I am getting this error over and over. Here is my console output
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:
↳
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')
Exited (sigterm)
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
Removing the set IPHONEOS_DEPLOYMENT_TARGET value in the build setting and let it auto config worked for me. In your Podfile, add
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
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)
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|
flutter_additional_ios_build_settings(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.
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'
Open Xcode
Change Project Document -> Project format -> Xcode 8.0-Compatible
flutter clean, flutter pub get an flutter build iOS
For me it was set to 8.0 in the highlighted field here in XCode, setting it to 10 fixed it for me.
I revised #Hons answer a little to resolve issues I was having using both the OneSignal and uni_links 0.5.1 packages with Xcode 12.5.
Edit the ./ios/Podspec file, uncomment the second line of file (and update with minimim target version):
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
and then replace the target code for OneSignal and post_install script with:
target 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignalXCFramework', '3.2.1'
end
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|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings[deployment_target_key] = minimal_deployment_target
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end