0
  • (OK) I try to run on VS Code or android studio with the project connecting with the android emulator. there is no issue.

  • (OK) I opened Runner.xworkspace and run with iOS Simulator. It works as well.

  • (Failed) I try running with flutter run connected with iOS Simulator. But it failed with the message below.

       /Users/chhinsras/Desktop/Coding.nosync/SAISMobile/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 'OneSignalXCFramework' from project 'Pods')
      /Users/chhinsras/Desktop/Coding.nosync/SAISMobile/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_downloader-FlutterDownloaderDatabase' from project 'Pods')
      /Users/chhinsras/Desktop/Coding.nosync/SAISMobile/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 'Reachability' from project 'Pods')
      /Users/chhinsras/Desktop/Coding.nosync/SAISMobile/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 'OrderedSet' from project 'Pods')
      /Users/chhinsras/Desktop/Coding.nosync/SAISMobile/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 'OneSignal' from project 'Pods')
      /Users/chhinsras/Desktop/Coding.nosync/SAISMobile/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')
    

    I googled alot and try following from this The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1

Then, it lead to another Flutter/Flutter.h not found, something.

*NOTE: If I changed the code, then open Runnder.xworkspace and run, I could see the update without any issue.

What is the real problem of this why I can't run on VS Code.

Sras
  • 1,686
  • 2
  • 19
  • 29

2 Answers2

0

Here's one solution that worked for me: Delete your pubspec.lock file and then do re-download your packages by doing pub get (or you can use the terminal command or just press Command +S in your pubspec.yaml file).

After this, cd into your ios folder and there, in the terminal use the pod update command.

I hope it works for you as well. Cheers!

AbdulAziz Umar
  • 393
  • 2
  • 9
0

on this file ios\Runner.xcodeproj\project.pbxproj find for IPHONEOS_DEPLOYMENT_TARGET then change its value from 8 to 9

  • inside this ios\Runner.xcodeproj\project.pbxproj . all are set too 9.0. I found that ios\Pods\Pods.xcodeproj\xcuserdata\chhinsras.xcuserdatad\project.pbxprooj. there are many 8.0 set. I try to change them, but it back to 8.0 when i try to run the project – Sras Sep 05 '21 at 13:09