23

I am developing an app in Xcode 6.4 and it runs on the simulator, but when I try to run it on my iPhone(iOS 8.4) it crashes.

The message in the console is:

Message from debugger: failed to send the k packet.

Can someone help with this?

amagain
  • 2,042
  • 2
  • 20
  • 36
eramirez75
  • 338
  • 4
  • 8

5 Answers5

3

I had this problem just now and just fixed it with

rm -rf ~/Library/Developer/Xcode/DerivedData/* ; rm -rf ~/Library/Caches/com.apple.dt.Xcode/*

in terminal/shell/bash.

Not sure what it is exactly, but I'd toss it in the 'another XCode fart' category.

Alex Choi
  • 191
  • 2
  • 13
  • Thanks for your concern, but It didn't work for me either – eramirez75 Sep 04 '15 at 02:50
  • 1
    any of you end up fixing this? When I have xcode problems like this, I usually do the following dance: - close xcode - clear derived data and caches with above scripts - clean build - success? if that doesn't work, then i reboot, and do the above again. – Alex Choi Sep 23 '15 at 16:15
2

Just close out Xcode and reopen. This worked for me.

1

In my case, restarting the test device solved the problem.

Jan K
  • 365
  • 1
  • 14
1

They lose connection...

If you receive this message on the Xcode's console, that means your mac and the device lose connection in some time, but Xcode didn't react to that action (still doesn't know that..), still waiting, and later if you'll press the Stop or Run buttons, you'll see this message on the Xcode's console window. You can see similar scenarios possible around the disconnect theory. Everyone can have their own stories.

Lid close

Also, I saw that message when my mac connected to a device and debugging with a cable, but I suddenly decided to lid close my mac, and back to my desk after a while. And again, if I press Run or Stop I saw this message on my terminal.

Why?

This could be related to your Energy Saver options on your mac.

On your Mac, choose Apple menu > System Preferences, then click Energy Saver.

Never

Maybe this can be solved by setting the Computer Sleep and Display Sleep sliders to "Never."

Best.

MGY
  • 7,245
  • 5
  • 41
  • 74
0

Would suggest Restarting XCode, ReOpening and then cleaning the product (Product>Clean or Command + Shift + K).

Finally, I deleted the app and reinstalled it. That worked definitively, though it's possible just one of those would do :).

agrippa
  • 819
  • 10
  • 8