Cordova build iOS error: archive not found at path 'path/to/myApp.xcarchive"
There is a work around here.
If you're building on the command-line, you can specify --buildFlag="-UseModernBuildSystem=0":
# Cordova CLI
cordova run ios --buildFlag='-UseModernBuildSystem=0'
cordova build ios --buildFlag='-UseModernBuildSystem=0'
# Ionic CLI
ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
If you're building with a build.json config file, you can add the following under the iOS release or debug config:
"buildFlag": [
"-UseModernBuildSystem=0"
]
If you are opening the project in the Xcode IDE, you need to change the build system in Workspace Settings to "Legacy Build System"
Neither solution - --buildFlag="-UseModernBuildSystem=0"
or setting the Legacy Build System worked for me.
For some reason, the error only goes away if I am sure to unplug my iPad or iPhone from usb on my computer before running the cordova build command.
Maybe something quirky about my configuration, but I thought I'd share in case it helps anyone else.