Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

spilakalb

macrumors member
Original poster
Sep 23, 2012
40
0
I have developed an iPhone app.Its working fine in simulator.I tested the app with Instruments(Leak) and everything is looking fine.
Can I gurentee that app will work in device also? My question is all the mouse click event in simulator will wok using touch/tap in device?
 
Obviously, mouse clicks in the simulator and taps on the device screen should be equivalent as far as your app is concerned. If they weren't then the simulator would be a lot less useful!

However, it's always best to test on a real device if you can. I wouldn't recommend submitting/releasing an app that has only been tested on the simulator.
 
Thanx..

I am confused with TouchEvent

touchesBegan:withEvent: – Sent when fingers are touched down.
touchesEnded:withEvent: – Sent when fingers are touched up.
touchesMoved:withEvent: – Sent when fingers move on the touch screen.
touchesCancelled:withEvent: – Sent when a touch was interrupted by a an event such as a telephone call.

I didnt implement these method in my code. In which scenario we need to use these methods?.
 
Thanx..

I am confused with TouchEvent

touchesBegan:withEvent: – Sent when fingers are touched down.
touchesEnded:withEvent: – Sent when fingers are touched up.
touchesMoved:withEvent: – Sent when fingers move on the touch screen.
touchesCancelled:withEvent: – Sent when a touch was interrupted by a an event such as a telephone call.

I didnt implement these method in my code. In which scenario we need to use these methods?.

When you want to override these methods?
You don't really understand the responder chain I guess, the API deep inside APple itself will check what points that are touched on your screen, and your app will respond to that for example like buttons and such, because this is all Apple style. But for example, when you want to draw something on the screen where the user just has been with his finger, then you could use the touchesbegan, these are just methods sended from the API, like delegate methods, so you don't have to use them, but you can use them to do something else.
 
Can I gurentee that app will work in device also?

No. That is why it is important to test your app on real devices and not just rely on the simulator. In your case, your click targets might be so small that only a mouse can click them but fingers cannot. (Although, that would be bad UX as well.) That's just one reason to test on a real device.
 
Testing on a Simulator is insufficient to ensure a working usable app.

The API support is slightly different on the device, the memory, processor and graphics performance can be vastly different, and using a small multi-touch device when not at a desk can be quite different. Stuff that is easy to see and do sitting still in front of a large monitor with a mouse easily becomes nearly invisible and impossible to see, touch and control while walking, in transit or on the road.

So you really need to test on an actual iOS device (or just get purely lucky).

You might only need to override the TouchEvents if you want more information than usual about an event (exact XY coordinates and speed in some subview, etc.), otherwise, just let the UI objects and gesture recognizers figure out stuff for themselves.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.