Xcode Server error - exportArchive: no applicable devices found

I set up Xcode Server with a bot and it seems to work as expected but everytime I get a warning as follows :


Bot Issue for xxappxx (build service warning)
Integration #179 of xxappxx
Open in Xcode: xcbot://(null)/botID/216262604b43a4700a661fffc9000596/integrationID/8456bccb17577028145f624eb0e63544
Assertion: exportArchive: No applicable devices found.
File: (null):(null)
Introduced 5 integrations ago


Does anyone ever encountered this problem and know how to fix it ?

Replies

I get this with xcodebuild when I try to use the new

-exportOptionsPlist
option as well (no Bots involved).
2015-08-05 17:41:05.823 xcodebuild[27723:2124406] [MT] IDEDistribution: Step failed: : Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo=0x7fa69421d2a0 {NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.

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

OK, I now have an idea of what the problem is; I think it's trying to sign with a Distribution cert even though I'm specifying development as the method for export in my Build.plist. Trying to find some documentation on how this works in beta 4, as it worked in beta 1.

Hum interesting, I also don't have a Distribution Cert. on the server so it might be related.

Gah, so frustrating. So far it hasn't been anything I've tried, including:

  • Making sure I've specified valid values for method, uploadSymbols, uploadBitcode,and teamID in my Build.plist
  • Making sure I'm properly signed into my developer account under Preferences > Accounts (this machine still had my old password on it)
  • Verifying that the right profile was getting picked in the DVTCodesignResolver.log
  • Verifying that that profile does indeed have devices in it.

The only obvious thing that's weird now that I'm not sure how to dig into is that just after doing the following

2015-08-06 14:19:44 +0000       from /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:535:in `each'
        from /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:535:in `makeDeviceTraitsToDeviceTypesMapForDeviceIdentifiers'
        from /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:1492:in `block in ProcessIPA'
        from /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:1470:in `each'
        from /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:1470:in `ProcessIPA'
        from /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool:1907:in `<main>'

and then successfully going through the main app bundle, it gets to the next one and exits.

  Bundle 'com.xxxxxxx.***.XXXXxxxXxxxx'...
2015-08-06 14:19:44 +0000 [MT] /Applications/Xcode-beta.app/Contents/Developer/usr/bin/ipatool exited with 1


Open to suggestions.

Finally just returned to using

-exportFormat IPA
and specifying a provisioning profile, and that got me a functional build. Still getting the "No applicable devices found." error when using
-exportOptionsPlist.

compileBitcode NO was the magic exportOptionsPlist value that let me proceed. All the options are now documented; type xcodebuild -help to see them.

vleroy - Have you made any progress with this? I'm seeing the same thing with my iOS bot builds. Given that xcodebuild is under the hood, I'm not finding any of these suggestions helpful for the bot scenario.

I was running into the same issue ("No applicable devices found.").

Run on the terminal : rvm system

did the trick for me.


It seems that `ipatool`, which is invoked by xcodebuild, was failing when I ran it under my rvm ruby-2.1.3 environment. Switching back to the system's Ruby version, fixed the issue.

Using the system's ruby but still have no luck.


I successfully created an ipa for method app-store.

But I'm still struggeling with creating an ad-hoc ipa out of the same archive.

The archive contains watchkit and watchOS 2 extensions. So I cannot fall back to the old -exportFormat ipa


Using Xcode 7.0 (7A218)

I had the same issue, where I couldn't get it to export the ipa when using rvm and ruby 2.2.2. Instead of switching to system ruby, I managed to get it working with `rvm use 2.0.0` and making sure I had the CFPropertyList and sqlite3 gems available.


The 'No applicable devices found' error message seems to not actually be what's failing. At least in my case, when reading through the logs, it looked like a seg fault in sqlite, when loaded in the ipatool ruby script that xcode build uses under the hood. This error somehow caused it to bail out and report no applicable devices found.

Ok guys, I think I got it.


TL;DR;


Go to Terminal and perform:


gem update


Long story:


There's a bug in the CFPropertyList gem, a dependency of ipatool, the ultimately responsible for packaging the ipa.


The bug prevents ipatool from listing all the available platforms (This is an extract from IDEDistribution.standard.log):


2015-10-14 15:17:22 +0000 warning: Configuration issue: platform iPhoneOS.platform doesn't have a 'iPhoneOS9.0.sdk' SDK with a SDKSettings.plist; ignoring it. Exception: #<ArgumentError: invalid byte sequence in UTF-8>

/Library/Ruby/Gems/2.0.0/gems/CFPropertyList-2.3.1/lib/cfpropertylist/rbPlainCFPropertyList.rb:43:in `skip'

/Library/Ruby/Gems/2.0.0/gems/CFPropertyList-2.3.1/lib/cfpropertylist/rbPlainCFPropertyList.rb:43:in `skip_whitespaces'

/Library/Ruby/Gems/2.0.0/gems/CFPropertyList-2.3.1/lib/cfpropertylist/rbPlainCFPropertyList.rb:177:in `import_plain'

/Library/Ruby/Gems/2.0.0/gems/CFPropertyList-2.3.1/lib/cfpropertylist/rbPlainCFPropertyList.rb:24:in `load'

/Library/Ruby/Gems/2.0.0/gems/CFPropertyList-2.3.1/lib/cfpropertylist/rbCFPropertyList.rb:313:in `load_str'

/Library/Ruby/Gems/2.0.0/gems/CFPropertyList-2.3.1/lib/cfpropertylist/rbCFPropertyList.rb:299:in `load_binary_str'

/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:292:in `LoadPlist'

/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2009:in `block in allKnownPlatforms'

/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1993:in `each'

/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1993:in `allKnownPlatforms'

/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2108:in `<main>'


That's why you get the message: "no applicable devices found" (no platforms == no devices)


The bug was introduced in version 2.3.1 and solved in 2.3.2 (I'll include the link to the exact change in the github project but then this reply wil enter "Waiting for review" according to the moderation rules).


So go and check your gems:


gem outdated


This can be your case.


Regards.

From Apple DTS:


This issue happens when a newer version of the CFPropertyList Ruby gem is installed. To workaround the issue, either revert or update this gem.

Yes, upgrading the CFPropertyList gem from 2.3.1 to 2.3.2 resolved this issue for me too.

Hi,

after upgrading to Xcode 8 with iOS 10, I get this exactly this error. I am on El Capitan and using the following versions of ruby (I updated via rvm, same with 2.0.0 which is system version) and CFPropertyList:


Philipps-MacBook-Pro:mobile-sdk prakuschan$ ruby -v

ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]


Philipps-MacBook-Pro:mobile-sdk prakuschan$ gem list CF

*** LOCAL GEMS ***

CFPropertyList (2.3.3)


The xcodebuild -exportArchive command is executed in a shell script, and after a successful archive I get the following error:


** ARCHIVE SUCCEEDED **

2016-09-22 10:02:16.460 xcodebuild[10375:8369748] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/9y/r64c9wld0jx2yf3glsrzhhr00000gn/T/AppName_2016-09-22_10-02-16.456.xcdistributionlogs'.

2016-09-22 10:02:18.228 xcodebuild[10375:8369748] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7fe435f9dfb0>: 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 **


When looking into the xcdistributionlogs, the IDEDistribution.standard.log contains the following lines at the very end:


2016-09-22 08:02:18 +0000 [MT] /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool exited with a signal 6

2016-09-22 08:02:18 +0000 [MT] ipatool JSON: (null)


I don't know if it is valuable, but this is the path to ipatool:

2016-09-22 08:02:17 +0000 [MT] Running /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool


Any help is highly appreciated. I already tried many suggestions found on google, but found no solution yet.

Did you manage to solve this problem? I've got the same error message.