Flutter can't connect to iOS sim


I’m trying to build an iOS app using Flutter on my 2011 MacBook Pro running macOS High Sierra (version 10.13.6) and Visual Studio Code (version 1.46.1). I’m using Flutter version 13.8 and Xcode version 9.4.1.

When I attempt to build the app on the iOS simulator, Visual Studio Code displays the following messages:

Cannot launch without an active device
Failed to launch iOS Simulator: Error: Emulator didn't connect within 60 seconds

I’m unable to build the app on the iOS simulator. How can I solve this issue?

You need to update your Xcode to a version that supports your current version of macOS. Xcode 9.4.1 is not compatible with macOS High Sierra 10.13.6. You can download the latest version of Xcode from the App Store or from the Apple Developer website. After updating Xcode, try running the iOS simulator again.