In a larger context I resorted back to creating a blank project and running my build commands. Same error:
ionic start myApp blank
cd myApp
ionic cordova run
This problem is caused because Xcode 10 contains a new build system which is currently not compatible with cordova-ios@4 - see here.
The solution for now is to run Cordova with the --buildFlag='-UseModernBuildSystem=0' option to instruct Xcode to use the old build system, e.g.:
cordova run ios --debug --target "iPhone-8" --buildFlag='-UseModernBuildSystem=0'
Update: For my own convenience, I've wrapped this in a shell script:
#!/bin/bash
# Adds build flag to make cordova-ios@4 work with Xcode 10
cordova "$@" --buildFlag='-UseModernBuildSystem=0'
I saved this in a file called cordova-xcode10, made sure it's in the path and made it executable (chmod a+x cordova-xcode10), then I can just do:
cordova-xcode10 run ios --target "iPhone-8"
and it will work with Xcode 10