Failed to load test bundle from file, Error Domain=NSCocoaErrorDomain Code=3588

I have developed an app and its working fine, I decide to add Unit-Testing to the project while running the test on the device, Xcode throws me an error

-> " Failed to load test bundle from file:///private/var/containers/Bundle/Application/07F796E0-3BCE-4DF9-91E9-4D69E9B94F43/aspas%20dev.app/PlugIns/aspasDevTests.xctest/: Error Domain=NSCocoaErrorDomain Code=3588 "dlopen(/var/containers/Bundle/Application/07F796E0-3BCE-4DF9-91E9-4D69E9B94F43/aspas dev.app/PlugIns/aspasDevTests.xctest/aspasDevTests, 0x0109):"

-> " The bundle “aspasDevTests” couldn’t be loaded. Try reinstalling the bundle."

I tried many things but nothing is working, needed help in the issue, Thanks in advance

Error 3588 is NSExecutableLinkError. There are two common causes of this:

  • The test bundle imports a library, or a symbol within a library, that isn’t available.

  • There’s some sort of architectural mixup. For example, your test bundle is built for the simulator but you’re trying to load it on a device.

I recommend that you start by checking your basic setup. If you create a new app from the iOS > App template, making sure to enable unit tests, does that show the same problem?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks, Quinn! The fix to the second cause worked for me: [quote='747920022, DTS Engineer, /thread/726618?answerId=747920022#747920022'] There’s some sort of architectural mixup. For example, your test bundle is built for the simulator but you’re trying to load it on a device. [/quote]

Failed to load test bundle from file, Error Domain=NSCocoaErrorDomain Code=3588
 
 
Q