Rob
Rob

Reputation: 4239

Can't run unit tests on iOS device

I can't run unit tests on my iPhone. I need to run the unit tests on the phone because I need to access devices on the phone that the simulator cannot emulate. But every time I am get a breakpoint:

Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1200c1088)

The code highlighted at the breakpoint is:

dyld`dyld_fatal_error:
->  0x1200c1088 <+0>: brk    #0x3

Has anyone seen this before?

Upvotes: 1

Views: 5394

Answers (3)

Alexei Zaitsev
Alexei Zaitsev

Reputation: 77

Just had similar issue. What worked for me (Xcode 8 beta 6):

  1. Disconnect device
  2. Open DerivedData folder in Finder (Preferences->Locations)
  3. Quit Xcode
  4. Delete DerivedData folder
  5. Restart Mac
  6. Restart Device

Upvotes: 0

Marcin Czenko
Marcin Czenko

Reputation: 401

I experienced exactly the same symptoms. The tests ran on the simulator but not on device. In my case, the following were the steps to fix the problem:

  1. Make sure that your main target has the Team selected in Identity option of the General target settings (it is not set to None: Main Application Target Team Setting
  2. Then in the test target in the Code Signing Identity make sure it is not set to Don't Code Sign:

    BEFORE:

    Test Target Code Signing Identity BEFORE

    AFTER:

    Test Target Code Signing Identity AFTER

Upvotes: 3

Robin Kment
Robin Kment

Reputation: 115

I had the same issue

To fix it:

  1. close Xcode
  2. Clean (CMD+Shift+K)
  3. Build (CMD+B)
  4. try it

this worked for me.

Upvotes: 2

Related Questions