1

After waiting six days, apple got back to me and rejected my iOS spritekit game (for iPad). The rejection was for crashing on startup. In all four of the crash logs, there was just one error:

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000120055098
Triggered by Thread:  0

Dyld Error Message:
  Library not loaded: /Developer/Library/Frameworks/XCTest.framework/XCTest
  Referenced from: /var/mobile/Applications/8F4649C6-39F7-4EB7-8FF9-450FDF92E543/MyGame.app/MyGame
  Reason: image not found
  Dyld Version: 324.1

I have tried to reproduce this crash by creating a .ipa file using my ad hoc provisioning profile of the exact same archive I submitted to the app store. However, when I run it (tested on two iPads), it runs perfectly fine. I also checked my ~/library/logs/crashreporter, and there are no .crash files with my app's name. I am quite confused at this point. How can I reproduce the error?

Any and all suggestions are appreciated!

EDIT:

I have tried the answer by futureelite7 and successfully completed all of the steps, however the app was rejected again by Apple, with the same error.

The next time, I removed the XCTest.framework from my app's Test target and I thought that all was well. I cleaned it and resubmitted. However, it was rejected again. This is the fourth time submitting.

Lamikins
  • 156
  • 1
  • 14
  • have you tried to clean up and clean build folder yet? – Quang Hà Jun 26 '14 at 01:42
  • You're trying to link to the XCTest framework...? – Kevin Jun 26 '14 at 01:43
  • @QuangHà no i have not. Will that make a major difference? – Lamikins Jun 26 '14 at 01:44
  • Try removing the link to the XCTest framework. Have you built the app with testing code by mistake? – futureelite7 Jun 26 '14 at 01:45
  • @Kevin I think its built in? Under my build Phases > link binary with libraries, there is no XCTest framework – Lamikins Jun 26 '14 at 01:46
  • I have a vague feeling I encountered this before when inadvertently linking to a debugging framework. This works on devices which have been "Use For Development"'ed, but not on others, presumably because that process copies over some development-specific frameworks. Try running it on a "normal" user's device, if you can. – Jesse Rusak Jun 26 '14 at 01:47
  • Had this issue just two weeks ago. I was able to reproduce it when distributing the AdHoc Version via Testflight on a device and running the app without(!) having it connected to my mac. As soon as I connected it, it started because the framework was there. It ended up removing the test target to be make the release. – Daniel Witurna Jul 16 '14 at 10:21
  • I'd recommend learning how to resign your app-store release builds with a ad-hoc provisioning profile - this allows you to test the dogfood before sending it to Apple. – marko Jul 18 '14 at 07:35
  • Does your app support iOS 6. XCTest framework does not support iOS 6.x. so please check your ipa with iOS6 – Ritu Jul 21 '14 at 12:56

6 Answers6

2

Remove the "XCTest.Framework" file from Project Navigator > Targets > 'Project Name' > Build Phases. Then, "Product" (drop-down) > Clean.

futureelite7
  • 11,462
  • 10
  • 53
  • 87
2

I had the same problem, it comes out the problem was in the podfile due OCMock. The solution is to replace this line

pod 'OCMock'

with:

target :TestsTarget, :exclusive => true do
  pod 'OCMock'
end

Replace TestsTarget with the appropriate target name.

spacifici
  • 2,186
  • 2
  • 16
  • 28
0

There could be two solutions for this

  1. What i would suggest is to remove "XCTest.Framework" file from Project Navigator > Targets > 'Project Name' > Build Phases. Then click on "Product" from the xcode menu and select > Clean. This should do the trick and then upload your app to the store. XCTest should not be included in your regular application code

  2. Check your Framework Search Paths in your test target settings. Adding XCTest to one of my projects prepended a "/" to the paths and when i removed it everything was working fine.

Bug Hunter Zoro
  • 1,743
  • 18
  • 21
0

Hi try to clean all inside your project, is possible you have many hidden files inside, so follow my post and try step by step before to resubmit your app ( i think you need my last stesp)

Binary Guide here

Community
  • 1
  • 1
BlackSheep
  • 1,087
  • 12
  • 29
0

You could try uploading your IPA file to App.io and see if it crashes. You can also use a cloud logging framework such as Papertrail to get more details of the crash.

Vijay
  • 59
  • 3
0

If you already tried what futureelite7 said, then you are compiling your UnitTests with your project, even if you are not explicitly linking agains XCTest.framework. If Xcode sees that you are compiling something that #import <XCTest/XCTest.h>, it will automatically link to that framework. Try this:

  1. Go to your project's Build Settings
  2. Search for "Link Frameworks Automatically"
  3. Set that value to "No"
  4. Clean your project (cmd+shift+K)
  5. Build again (should fail!)

If that's the case, then select your unit test files and remove them from the normal compilation process, leaving them only for the testing target, like this:

example

B.R.W.
  • 1,566
  • 9
  • 15