iOS App failing when running UI Test in XCode 7.1.

2019-02-18 15:41发布

问题:

I'm creating my first UI Test for my iOS app. Every time I run the test I get the error:

UI Testing Failure - App accessibility isn't loaded

(please see attached image)

plus an error message in the debug console:

dyld: Library not loaded: @rpath/RestKit.framework/RestKit
  Referenced from: /Users/Claus/Library/Developer/CoreSimulator/Devices/<code>/data/Containers/Bundle/Application/<code>/MyApp.app/MyApp
  Reason: image not found

I would like to point out that the RestKit (installed using CocoaPods) library doesn't give any problem when I build and run my app on the simulator or real device.

I have tried looking for both error messages in dev forums (CocoaPods:https://github.com/CocoaPods/CocoaPods/issues/4609) and StackOverflow conversations but I cannot find any relevant help.

Any idea?

Update: it works on a real device (iPhone 5C - iOS 9.1) but keeps on not working on the simulator (iPhone 6 - iOS 9.1).