iOS Question Apple rejected app because it crashes on the simulator

Tom2525

Member
Licensed User
Longtime User
Apple rejected my app because it failed on launch. I'm assuming that the process they use, at least in some part, uses the simulator. I can verify that the app does crash on the simulator. However, the app has been tested on six different devices and none of them crash. Anyone ever had a situation where the code they use fails on a simulator but it works perfectly on a real device? If so, is there a way to get around that issue with Apple?
 

Tom2525

Member
Licensed User
Longtime User
It was known that the code fails on a simulator. The code is from this thread:

https://www.b4x.com/android/forum/threads/way-to-read-wifi-ssid.48416/#post-313941


Here is the error message:
B4X:
Copying updated assets files (364)
Application_Start
Application_Active
PAGE 1
Error occurred on line: 123 (Main)
Object was not initialized (NSObject)
Stack Trace: (
  CoreFoundation       __exceptionPreprocess + 180
  libobjc.A.dylib      objc_exception_throw + 50
  CoreFoundation       +[NSException raise:format:] + 141
  Wi-Score             -[B4IObjectWrapper object] + 154
  Wi-Score             -[B4INativeObject AsString] + 87
  Wi-Score             -[b4i_main _page1_appear] + 945
  CoreFoundation       __invoking___ + 29
  CoreFoundation       -[NSInvocation invoke] + 342
  Wi-Score             +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 2069
  Wi-Score             -[B4IShell runMethod:] + 515
 Wi-Score             -[B4IShell raiseEventImpl:method:args::] + 1888
 Wi-Score             -[B4IShellBI raiseEvent:event:params:] + 1518
 Wi-Score             __33-[B4I raiseUIEvent:event:params:]_block_invoke + 67
 libdispatch.dylib    _dispatch_call_block_and_release + 15
 libdispatch.dylib    _dispatch_client_callout + 14
 libdispatch.dylib    _dispatch_main_queue_callback_4CF + 689
 CoreFoundation       __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
 CoreFoundation       __CFRunLoopRun + 2356
 CoreFoundation       CFRunLoopRunSpecific + 470
 CoreFoundation       CFRunLoopRunInMode + 123
 GraphicsServices     GSEventRunModal + 192
 GraphicsServices     GSEventRun + 104
 UIKit                UIApplicationMain + 160
 Wi-Score             main + 138
 libdyld.dylib        start + 1
)
 
Upvote 0

Tom2525

Member
Licensed User
Longtime User
I don't know what else to do here. Apple still says that when they test the app, it crashes. However, I can't get the app to crash on any device or any device within the simulator. It's been tested on airplane mode, cellular service, no wifi, crappy wifi, etc. I asked Apple for the exact steps they took to create the crash and the app doesn't crash for me or any internal testers when those steps are reproduced. Not one person has reported a crash.

Reading the SSID is an important part of the app as it creates less frustration for users. Is there anything else I can try?
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Reading the SSID is an important part of the app as it creates less frustration for users. Is there anything else I can try?

May be the dumbest remark/question ever made to you, but how do you cope with non-broadcasting WiFi networks?
May be Apple guys test with "ghost" networks
 
Upvote 0

Tom2525

Member
Licensed User
Longtime User
May be the dumbest remark/question ever made to you, but how do you cope with non-broadcasting WiFi networks?
May be Apple guys test with "ghost" networks
I just tested it and it doesn't crash.

Did they provide any crash log?
Is this app already in the app store?
The app isn't in the app store. I'm trying to submit it. They did provide the crash log and it looks like this is what caused it but reading the report is difficult to read.

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
 
Last edited:
Upvote 0

Tom2525

Member
Licensed User
Longtime User
I received further clarification from Apple. They stated:
We tested the app on an iPad Air running iOS 9.3.1 and when it crashes, it brings us back to the iOS springboard.

The log shows:
<B4IExceptionWrapper: Error Domain=caught_exception Code=0 "Object was not initialized (NSObject)" UserInfo={NSLocalizedDescription=Object was not initialized (NSObject)}>

I have an iPad air running iOS 9.3.1 and it doesn't crash. I've tested it in every way that I know and it just doesn't crash. Maybe there's a setting they have enabled that I don't? Anyhow, I filed a TSI so perhaps they can help.
 
Last edited:
Upvote 0

Tom2525

Member
Licensed User
Longtime User
Yes, I've installed a fresh app with airplane mode turned on and the app still won't crash. The "crash" is related to the Objective C code. I can't understand how Apple claims that the app crashes but nobody that uses my app has had a crash.
 
Upvote 0
Top