Why is SenTestingKit causing my app to crash?
Asked Answered
G

1

5

I've created a map-based app for the iPhone, and recently submitted it to the store. I had no trouble running the app on the device or simulator. However, the store rejected it because it crashed on launch. The crash logs complain that the SenTestingKit framework wasn't found:

Date/Time:       2012-02-21 19:02:26.048 -0800
OS Version:      iPhone OS 5.0.1 (9A405)
Report Version:  104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread:  0

Dyld Error Message:
  Library not loaded: /Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit
  Referenced from: /var/mobile/Applications/*Long Application Reference Number*/MyApp.app/U of T Map
  Reason: image not found
  Dyld Version: 199.5

I've looked into others having this problem, and I'm sure as I continue to fiddle with it, I'll find the framework search path I need to include the SenTestingKit framework successfully.

What I'm confused about and need help understanding is:

  1. Why did the device and simulator run fine without the framework, but the archived version didn't?

  2. Why does it think I need this framework? I didn't use any unit testing during development. I used the SBJSON and ASIHTTPRequest libraries, but I didn't see an #import statement for SenTestingKit in any of the library code.

  3. Is it easier for me to remove the need for SenTestingKit or somehow include it properly in the archive? I'd like to fix this problem, but I need this re-submitted to the app store ASAP.

I would really like to understand this problem on a conceptual level, rather than hack away until things work.

Greening answered 26/2, 2012 at 18:49 Comment(1)
Did you ever find an answer to this?? because i am having an identical problemKingbolt
M
10

Just because you are not importing the SenTestingKit-Headers, does not mean that you are not linking its library.

Check your Build-Configuration/s => Target => Build Phases => Link Binary With Libraries for the entry SenTestingKit.framework. If that is present in anything but a Test-Target, remove it.

A Test-Target is symbolized by a little box enter image description here, as opposed to an App-Target which is symbolized by a little house enter image description here.

Minority answered 20/4, 2012 at 9:41 Comment(2)
Dude, I can't thank you enough - I've been in a struggle not able to figure out my build problem, as it was happening on my development devices, but no customer's devices via TestFlightApp builds. Only changing the SenTestingKit.framework from "required" to "optional" has fixed my problem - +1 for the great answer and A+++ for the box & house images :)Earthbound
Can you elaborate a little further? My app is exhibiting the same behavior when deployed to TestFlight but to make it more confusing, it's not happening to all of our devices just one of them.Woodnote

© 2022 - 2024 — McMap. All rights reserved.