5

I am seeing following error in AppCode every time I try to deploy my app to a connected device (an iPad):

xcodebuild: error: Was unable to find a destination matching the arguments to the -destination flag: The requested device could not be found because no available devices matched the request. Build failed with 2 errors and 0 warnings in 14 sec

I can build and deploy from XCode fine.

And I am sure AppCode can see the device, since it is listed in the dropdown (Yellow 11 is the device): enter image description here

Additional Info: The project uses cocoapods XCode is version 5.1 AppCode is version 2.5.5 Deployment Target Setting in XCode is 7.0 Project is using SDK 7.1 iPad is on iOS 7.0.4

Things I have tried: - Deleting DerivedData folder's contents (via XCode's Organizer window) - Closing and Starting XCode and AppCode again - Disconnecting and reconnecting the device - Clean rebuild

Why I want to build via AppCode so bad? Because it is easier to debug and I know all the keyboard shortcuts there. Please help.

septerr
  • 6,445
  • 9
  • 50
  • 73
  • Having the same problem, I have multiple devices and when i use another one it works – igrek Jul 01 '14 at 08:40
  • 1
    Hi, I had posted the q to JetBrains' forums as well. http://devnet.jetbrains.com/thread/453592?tstart=0 See the last answer. – septerr Jul 01 '14 at 15:34
  • For the record: In my case it has been a AppCode-Bug triggered by the new xCode-beta: http://blog.jetbrains.com/objc/2015/06/appcode-3-1-7-critical-bug-fix-update/ – niggeulimann Jun 16 '15 at 14:17

2 Answers2

4

Updated version of septerr's answer using Xcode version 6.4 (at least this did it for me) :

  • Close AppCode
  • Unplug and Replug the device
  • In Xcode, Go to Window->Devices
  • Right click on the device and disable the "Show in Runs Destination Menu" option
  • Reenable "Show in Runs Destination Menu" for the device
  • Open AppCode and it was working
Godfather
  • 1,089
  • 9
  • 21
3

Following resolved the issue for me:

  • Plug the device to the computer
  • Go to Organizer in XCode Under Devices
  • delete the device
  • Unplug the device and plug it in again
  • Wait for XCode to recognize and the add device to the organizer again
  • Then go to AppCode and try to run the app on the device

Somehow, after deleting and adding the device to organizer, AppCode was able to start running the app on the device again.

septerr
  • 6,445
  • 9
  • 50
  • 73
  • 1
    In my case this problem appeared after the device was updated to a newer iOS version, which had probably changed the device specifier. This is why deleting and re-adding the device resolves the problem - after updating the name may be the same, but the specifier is different, and the compiler cannot reconcile this. – Dev-iL Aug 15 '15 at 13:50
  • None of the solutions here worked for me, AppCode 2018.1.Edit: I realized now the device never shows up for XCTest targets in Appcode. – BadmintonCat May 28 '18 at 04:21