Unable to Load and Execute the Cordova Application on an iOS Simulator Using Visual Studio Code

While attempting to debug using the iOS Simulator, the application does not load successfully with the following message:

No target specified for emulator. Deploying to undefined simulator.

To resolve this issue, update the configuration options in the Launch.json file to include the simulator target specification in the Run iOS on Simulator section. Then, replace the “target” : “emulator” setting with the required simulator name and iOS version.

For example:

"target": “iPhone-6-Plus, 11.4”.

The list of simulator names that are available on your Mac system can be displayed using the command:

“Cordova run ios --list”