Search code examples
iosxcodeios-simulatorios9

IOS app does not respond to touch events on IOS Simulator on install


When I install and run my app on IOS Simulator 9.1 after resetting content and settings the app does not respond to touch events.

All of the code that runs from application:(UIApplication *)application didFinishLaunchingWithOptions and the code in the initial view's viewDidLoad and viewWillAppear runs correctly without error. There are also no error messages in XCode's console tab.

If I pause the application in XCode I see that the thread's stack trace looks exactly as it does when the app is working.

This is the backtrace:

* thread #1: tid = 0xbff0bc, 0x0369a84a libsystem_kernel.dylib`mach_msg_trap + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x0369a84a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x03699c34 libsystem_kernel.dylib`mach_msg + 68
  * frame #2: 0x01641bd6 CoreFoundation`__CFRunLoopServiceMachPort + 214
    frame #3: 0x01640fb6 CoreFoundation`__CFRunLoopRun + 1526
    frame #4: 0x01640706 CoreFoundation`CFRunLoopRunSpecific + 470
    frame #5: 0x0164051b CoreFoundation`CFRunLoopRunInMode + 123
    frame #6: 0x03f6d664 GraphicsServices`GSEventRunModal + 192
    frame #7: 0x03f6d4a1 GraphicsServices`GSEventRun + 104
    frame #8: 0x01d811eb UIKit`UIApplicationMain + 160
    frame #9: 0x0015970a MyApp`main(argc=1, argv=0xbff5384c) + 138 at main.m:6
    frame #10: 0x03371a21 libdyld.dylib`start + 1

Stopping and restarting the app doesn't fix the problem.

Sometimes recompiling the app with only a whitespace change fixes the problem and the app responds to touch events.

If that doesn't work then restarting the IOS simulator fixes the problem

Please suggest any ways that I could potentially figure out what's going wrong.

Thank you!


Solution

  • It's a bug in the simulator, I face it from time to time, I cleaned and remove archive folder and build again and it works, but this happens rarely.