xcodebuild: "No applicable devices found." when exporting archive xcodebuild: "No applicable devices found." when exporting archive xcode xcode

xcodebuild: "No applicable devices found." when exporting archive


In our case, this was a conflict with our use of a non-system ruby via rvm. To fix, you need to call xcodebuild inside the context of rvm use system. But doing this is complicated by the fact that using rvm in scripts is harder than it should be.

We created a script which fixed this for us:

#!/bin/bash --login[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"rvm use systemxcodebuild "$@"

This is a drop-in replacement for xcodebuild, where

xcodebuild arg1 ... argn

would become

path/to/xcbuild-safe.sh arg1 ... argn

I've gisted a production-ready version. Make sure you chmod +x on that file.


So the underlying issues as as alluded by Clay Bridges answer is that there is an error happening in Ruby. To be specific, this error is being caused by using an out of date version of the CFPropertyList gem.

You can simply update this gem to fix the problem. xcodebuild uses the system ruby, so simply do this:

/usr/bin/gem install CFPropertyList


Make sure xcodebuild using the system ruby.

I fixed it by doing this:

rvm use system