0

I get a dyld fatal error as xcode attempts to initiate the UI test suite.

    dyld: Library not loaded: @rpath/XCTest.framework/XCTest
      Referenced from: /var/mobile/Containers/Bundle/Application/9A03F81B-1A93-4F0E-88B0-56C0748D1D43/ExampleUITests-Runner.app/XCTRunner
  Reason: no suitable image found.  Did find:
    /private/var/mobile/Containers/Bundle/Application/9A03F81B-1A93-4F0E-88B0-56D0748D1D43/ExampleUITests-Runner.app/Frameworks/XCTest.framework/XCTest: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/9A03F81B-1A93-4F0E-88B0-56D0748D1D43/ExampleUITests-Runner.app/Frameworks/XCTest.framework/XCTest'

So I'm running this on a Mac Mini which is a designated testing workstation. I have the same identical project on my macbook and it runs fine. I tried deleting my project and re-cloning it and it still goes through the same issue.

Any ideas on what the issue may be?

On a side note, I had this issue before. My solution was doing a re-format since re-installing Xcode and recloning my project from github did not fix the issue.

James Goe
  • 522
  • 4
  • 14

2 Answers2

0

Error seems to suggest that Xcode is not able to locate XCTest.framework on your mac mini.Did you try adding $(PLATFORM_DIR)/Developer/Library/Frameworks to Framework Search Path of your UI Test Target. You can also test adding XCTest.framework as a Build Phases Dependency.

Sushant
  • 440
  • 3
  • 8
  • 1
    Thanks for your reply! I tried that already and it had no effect. I did manage to fix it though and the problem ended up being my keychain access. I revoked everything and reset all my keychains and that took care of the error. Then I had to remove the problem apps from my device from Window > Devices and that allowed me to run my tests. – James Goe Nov 16 '15 at 14:26
0

It turned out it was an error regarding my certificates and this issue was resolved by revoking my certificates and resetting all of them.

Then I had to remove the problem apps from my device from Window > Devices and that allowed me to run my tests.

James Goe
  • 522
  • 4
  • 14