Ionic ios build fails, error archive not found

In addition to the answer given by jcesarmobile, another solution is to build the app with the Ionic CLI by executing the following command:

ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

According to the documentation of the ionic build command, to pass additional options to the Cordova CLI, you should use the -- separator after the Ionic CLI arguments. The execution of the build command through Ionic CLI instead of Cordova CLI will also build web assets and provide friendly checks before Cordova merely builds the app.


An example for a working build.json file (to place into your Cordova / Ionic project root directory) is the following content:

 {
  "ios": {
    "debug": {
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    },
    "release": {
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    }
  }
}

For more parameters about file build.json, see also the Cordova documentation: iOS Platform Guide


Currently cordova-ios is not compatible with Xcode 10

You can try to disable the new build system that Xcode 10 uses and use the old one by adding this to your build.json file

"buildFlag": [
  "-UseModernBuildSystem=0"
]

or adding --buildFlag="-UseModernBuildSystem=0" to the build command

The full command should be cordova build ios --buildFlag="-UseModernBuildSystem=0".

Or for Ionic ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"