Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 404
John Cashew Avatar asked Jan 21 '16 20:01

John Cashew


People also ask

How do you tap in iOS simulator?

Use Option key to show two fingers icons on simulator screen. Place them as close as you want them to be. Then press Shift to move them to wherever on the screen you want. Save this answer.

Can iPhone simulator install apps?

Install Apps on Simulators To install an app on a connected simulator, follow these steps. Go to Apps > Install Application. Find and open the app you want to install from your Mac. The app appears in the list of installed apps on the right side of the iOS Gateway window.

Can I install IPA on iOS simulator?

It will open the Devices and Simulators window. Select the Devices section and select the device from the left pane. Drag and drop the app/IPA on to the 'INSTALLED APPS' section. Wait for Xcode to finish the installation.


2 Answers

It seems like a bug in the simulator. Pressing Command or Option while clicking usually works around it.

like image 63
Edward Brey Avatar answered Sep 28 '22 11:09

Edward Brey


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.

like image 25
DeyaEldeen Avatar answered Sep 28 '22 13:09

DeyaEldeen