Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is SenTestingKit causing my app to crash?

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.

like image 921
Joel Koroniak Avatar asked Feb 26 '12 18:02

Joel Koroniak


1 Answers

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.

like image 124
Till Avatar answered Oct 11 '22 14:10

Till