8

I try to run a simple test. Everything is fine in the simulator, when i run on the device, emerge following error: enter image description here

The Log is "dyld: could not load inserted library '/private/var/mobile/Containers/Data/Application/7EE29748-5E86-4E9B-B8E5-882753654F87/tmp/IDEBundleInjection.framework/IDEBundleInjection' because no suitable image found. Did find: /private/var/mobile/Containers/Data/Application/7EE29748-5E86-4E9B-B8E5-882753654F87/tmp/IDEBundleInjection.framework/IDEBundleInjection: code signature invalid for '/private/var/mobile/Containers/Data/Application/7EE29748-5E86-4E9B-B8E5-882753654F87/tmp/IDEBundleInjection.framework/IDEBundleInjection' "

I tried to make Clean & Build and remove derived data, it didn't help me.

I appreciate any tips or helps

kokos8998
  • 153
  • 1
  • 1
  • 13
  • Potentially related: http://stackoverflow.com/questions/19956390/xcode-5-tests-not-running – JAL Sep 30 '15 at 17:42
  • Nope, this one is not related. Looks different and the accepted solution doesn't work. – Gerd Castan Oct 01 '15 at 20:14
  • Are you using a Scheme that does a Release build? If so, try a Debug build instead. – matt Oct 01 '15 at 21:22
  • 3
    @Kesava I've solved that, the cause was a migration of developer account settings from xCode6 to xCode7. It required to reload all provision profiles into account setting of xCode7 for correct validation. Apple's provided a new profile as free independent developer, by this reason perhaps there was emerge a critical error. – kokos8998 Oct 07 '15 at 12:05
  • @kokos8998 is right => http://stackoverflow.com/questions/26707792/error-loading-xctest-no-suitable-image-found – Damien Romito Feb 15 '16 at 11:46
  • Thanks for posting the question! Just had the same problem. That error message from Xcode is incredibly misleading. – Alex Mar 07 '16 at 10:44

2 Answers2

2

This was due to me changing my appleID password. If you sign back in Xcode -> Preferences -> Accounts, this fixes the problem.

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
AJ9
  • 1,256
  • 1
  • 17
  • 28
0

I struggled with this problem for the whole afternoon and finally found my solution. Yes it is about the certificates again.

I heard the news that Apple's world developer relations certificate expired but never realized it'll become a problem until now.

In my keychain all the developer identifies appeared with the red status as "This certificate was signed by an unknown authority".

So the solutions is, go to http://www.apple.com/certificateauthority/ and download "Worldwide Developer Relations - G2 Certificate", import it into your keychain, check the status of your developer identity certificate and if it turns green (valid), the unit testing problem should be fixed.