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

8

6

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

Poock answered 4/2, 2019 at 12:7 Comment(0)
P
4

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.

Prasad answered 5/3, 2020 at 11:56 Comment(1)
In my case it was because my iPhone and my Macbook were not on the same wifi.Busty
S
4

I've had this problem with react-native, if developer mode is not enabled on the iOS device, you'll get this error 70

Stirling answered 21/11, 2022 at 16:42 Comment(0)
O
3

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

Omega answered 3/4, 2021 at 13:39 Comment(0)
I
2

Issue occurs when xcode gets updated to latest and new platform version is available in xcode.

I resolved it by downloading the latest platform version

Before 17.0 was installed with xcode 15.0

After xcode auto updated to 15.1

17.2 was available, so i have resolved by installing 17.2 platform

Intensity answered 2/1 at 11:0 Comment(1)
Hello @Gokul, can you mention how to download new plataforms versions in Xcode?Interbreed
S
1

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..

Stogner answered 19/3, 2021 at 2:59 Comment(0)
E
1

I had a same issue like error code 70 and I fixed the following step.

Situation

I try to execute xcodebuild after I changed the verion of Xcode for building (16.0 => 15.4).

It happned.

Cause

Incompatiblity of target build iOS device or simulator. I hadn't installed iOS 17.5 emulator (had installed only iOS 18.0 emulator for Xcode 16).

Solution

  1. Install emulator or connect a suitable iOS device that is able to build by the Xcode version you are using.

  2. Execute 'Clean Build Folder'

  3. try 'xcodebuild' again.

Escheat answered 2/10 at 12:56 Comment(0)
S
0

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

Sinister answered 5/4, 2022 at 9:42 Comment(0)
C
0

A simple restart for both the Mac and iPhone fixed this issue.

Coomer answered 2/3 at 11:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.