Nativescript-cli: EXPORT FAILED xcode 8.3

Created on 7 Apr 2017  Â·  24Comments  Â·  Source: NativeScript/nativescript-cli

  • CLI: 2.5.4
  • Cross-platform modules: 2.5.2
  • Runtime(s): 2.5.0

After the Update to 2.5.4, with xcode 8.3 I'm getting this error with an empty project

tns create testApp
change package.json for a valid provisioning profile
tns run ios

** ARCHIVE SUCCEEDED **

2017-04-06 11:44:53.515 xcodebuild[5139:64979] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/v6/676b__jj5zn14nsd8jsdd7wm0000gn/T/testApp_2017-04-06_11-44-53.514.xcdistributionlogs'.
1.2.840.113635.100.1.61
1.2.840.113635.100.1.61
2017-04-06 11:44:53.876 xcodebuild[5139:64979] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7fa59f952ee0>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}

** EXPORT FAILED **

Command xcodebuild failed with exit code 70

tns device displays my device correctly with status connected

I'm only getting this error with a physical iphone (iphone 6)

bug ios webpack

All 24 comments

Just to clarify, you change the "nativescript.id" key in the package.json from something like "org.nativescript.testApp" to something like "com.telerik.BestAppEver", right?

Yes, that's correct.

I have basically the same issue.
Cloning any {N} project, changing the "nativescript id" key, creating a correct provisioning profile in Xcode 8.3.1, running on the simulator works but running on the device systematically fails with that same error.

I am having the same issue as @pierreis

I have to add that compiling and running on device the app directly within Xcode (opening the .xcodeproj in platforms/ios) works without problem.
Yet, no more luck trying to launch it via the CLI after doing that.

that used to work for me but I am now using webpack and am unable to build via xcode

I had the same issue and this keeps popping from time to time. This issue is not related with changing the "nativescript.id". Its more related with ruby warnings.

If you use RVM, please run rvm use system.
If you use chruby, please run chruby system.

For me running rvm use system made things working again on device.

@vip-git hmm I cant ru neither of those commands

@SamuelGRwebfab Are you getting the same error ?

````
* EXPORT FAILED *

Command xcodebuild failed with exit code 70
````

Which operating system are you using ?

@vip-git no i am no longer getting an export error. My error is dyld: Library not loaded: @rpath/Bolts.framework/bolts so it is no longer related to this post :/

I am also getting this error. I am running 2.5.4, and building on my device worked before. THe exact error I am getting is:

2017-04-21 14:00:16.330 xcodebuild[91401:23869247] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7ffa17b03b90>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}

** EXPORT FAILED **

Command xcodebuild failed with exit code 70

@SamuelGRwebfab did you ever find a solution? I tried setting my Pods framework to Optional but that didnt make a difference.

@davecoffin

Have you tried running :
rvm use system

Which operating system are you using ?

@vip-git I did try running that, but I got this error when running tns run ios after:
nativescript-imagecropper has Podfile and you don't have Cocoapods installed or it is not configured correctly. Please verify Cocoapods can work on your machine.

I then ran rvm default to get it to at least build, but it still wont deploy on my device.

Here is what I did to resolve my issue :
sudo gem install cocoapods
pod repo update

After running those two commands, I can now successfully run tns run ios on a physical iphone!
I would close this issue but I'll wait to see if others can resolve their problem as well.

Yea I solved it by running rvm use system then sudo gem install cocoapods
Thanks everyone!

nice 🥇

Hey all, do you still have this problem or the proposed solutions worked for you and we can close the issue?

I started having this problem with TNS 3 when trying to deploy to a physical iOS device. Simulator works fine, but when trying to deploy to a physical device, I get the same "Exit Code 70" error (described at top of this thread) after the ARCHIVE SUCCEEDED step. This is with Xcode 8.2.1 (note: I'm unable to upgrade to Xcode 8.3 because I'm using macOS 10.11).

This only applies to an app I've been trying to upgrade from TNS 2.5. New apps created with CLI deploy okay.

I've tried the suggested workarounds in this thread, but they haven't solved the problem. Are there any other suggestions for debugging this issue? Are there other caches to try clearing?

UPDATE
Following other advice, I'm digging-in to the .xcdistributionlogs created by Xcode to try to find more detail about the problem. Looks like the issue is related to either TNSWidgets or a specific plugin being used in my app. Will provide another update once I've tried to isolate these variables.

UPDATE 2
The more I dig-in to this build problem, the more it seems to be plug-in related. What makes this hard to solve, though, is that builds work fine for the iOS Simulator. Only fail for devices.

UPDATE 3
I still don't 100% understand the difference between BUILD and ARCHIVE for iOS, but I can confirm the errors I'm hitting are all plug-in related. In some cases, the plugin was including the node_modules > tns-core-modules folder (which was causing the Archive to fail). In another, the Pod referenced by the plugin was built with a newer version of Xcode, causing the Archive to fail with a "Invalid bitcode version" error. Either way, seems like this is definitely a YMMV problem, and the best solution is to start looking for problematic plugins.

Guys,

I had the same error here using Nativescript 3.0:

error: exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but found ad-hoc  
Error Domain=IDEFoundationErrorDomain Code=1 "exportOptionsPlist error for key 'method': expected one of {}, but found ad-hoc" UserInfo=0x7f865f953140 {NSLocalizedDescription=exportOptionsPlist error for key 'method': expected one of {}, but found ad-hoc}  
** EXPORT FAILED **

SOLUTION
The solution that workd to me was updating cocoapods to a beta version.

sudo gem install cocoapods --pre
cocoapods-core-1.3.0.beta.2

@odubuc @smarza @toddanglin @vip-git @davecoffin @pierreis
It looks you have different kind of problems (cocapods, ruby, changing bundle id, webpack, plugins) and most of you found the solution for their specific problem.
I suggest closing this issue and let you log separate issues for specific problems (if such still exists).

If you log an issue, please try to provide as much info as you can:

  • Version of npm, node, tns, xcode, cocoapods
  • Steps to reproduce the issue (list exact command you run)
  • Do you encounter the issue only with web-pack?
  • Can you reproduce the issue on hello-world application?
  • Types of provisioning profile you use (developer, distribution, adhoc) when build
  • Please also re-test the issue with nativescript@next since we pushed some fixes for iOS builds last week

I have the same problem with EXPORT FAILED && exit code 70.
I tried all workarounds above but nothing.

I’ve been having the same problem since Sunday.

Did you get a solution?

error: archive not found at path ‘/Users/brenomayder/Documents/naCampanha/mobile/platforms/ios/naCampanha.xcarchive’
* EXPORT FAILED *

(node:2670) UnhandledPromiseRejectionWarning: Error code 65 for command: xcodebuild with args: -exportArchive,-archivePath,naCampanha.xcarchive,-exportOptionsPlist,/Users/brenomayder/Documents/naCampanha/mobile/platforms/ios/exportOptions.plist,-exportPath,/Users/brenomayder/Documents/naCampanha/mobile/platforms/ios/build/device
(node:2670) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2670) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Mayders-Mac:mobile brenomayder$ ionic info

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:

cordova (Cordova CLI) : 8.0.0
local packages:

@ionic/app-scripts : 3.1.9
Cordova Platforms : ios 4.5.5
Ionic Framework : ionic-angular 3.9.2
System:

ios-deploy : 1.9.2
ios-sim : 7.0.0
Node : v8.11.3
npm : 6.4.1
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255
Environment Variables:

ANDROID_HOME : not set
Misc:

backend : pro

Hey @mayder ,
It looks like you are using ionic. This repository is related to NativeScript and NativeScript CLI. You may get better answer if you post your question in the ionic repository.
Anyway, it looks like for some reason your build operation has failed, probably there's some additional error in your log. I suggest you to post all of the log when opening a new issue in ionic repository, so the guys there will be able to investigate what's causing the problem.

Was this page helpful?
0 / 5 - 0 ratings