'Can't build project on iOS Error code 70, how to fix it?

Im not able to build my project (created with js, vue.js, vuex) on iOS platform. Exactly the same project works on web while typing npm run dev and I was able to build it on Android on laptop with Windows. When I’m trying Cordova run iOS got something like this:

xcodebuild: error: Unable to find a destination matching the provided destination specifier: --HERE a lot of simulators-- Ineligible destinations for the "HelloCordova" scheme: { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device } { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device } CordovaError: Promise rejected with non-error: 'Error code 70 for command: xcodebuild with args: -xcconfig,/Users/username/Downloads/vue-webpack-vuetify-vuex-cordova-boilerplate-master copy/platforms/ios/cordova/build-debug.xcconfig,-workspace,HelloCordova.xcworkspace,-scheme,HelloCordova,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/username/Downloads/vue-webpack-vuetify-vuex-cordova-boilerplate-master copy/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/username/Downloads/vue-webpack-vuetify-vuex-cordova-boilerplate-master copy/platforms/ios/build/sharedpch' at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15) at process._tickCallback (internal/process/next_tick.js:68:7)

Iv also tried cordova build ios -- --buildFlag="-UseModernBuildSystem=0" but got the same error. Im using Xcode 10.1 and Cordova 8.1.2

Atm working on MacBook Pro



Solution 1:[1]

xcodebuild error 70 means that the target for the build was not found. It could be due to a mismatch of iOS versions, parameters, or (if using a real device) the UDID being wrong, or the device was not connected, switched off or locked.

Solution 2:[2]

In my case. I was having older versions of the iOS emulators. then I installed the latest emulator with the latest iOS. that solves the issue..

Solution 3:[3]

In my case it was because my XCode was out-of-date and not compatible with the version of iOS on my iPhone.

Solution 4:[4]

In my project.pbxproj file setting value of IPHONEOS_DEPLOYMENT_TARGET was higher then on emulator so I changed it to emulator ios version number and the problem was gone

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ron Kalian
Solution 2 Praveen Vishnu
Solution 3 Dorian
Solution 4 Ildar Nogmanov