iphone: Sending multitouch from the device to the simulator? - iphone

I need to record a video of a multitouch game I'm working on, and I'd like to record it from the simulator. My idea was to send touches from the device to the simulator (like this project does with the accelerometer). Just by googling I haven't found anything like that, but before I start implementing it I thought I'd ask here if anyone knows about an already existing solution.
Just to be clear, I do need full multitouch (up to 5 fingers). The pinch and drag that are available on the simulator are not enough.

Matt Gallagher has a writeup on synthesizing touch events, which might provide what you're looking for, although I've not tested it myself.

Check out iSimulate, it is an application/library pair that allows you to use to multi-touch (up to 5 fingers), the accelerometer, and the GPS in the iPhone Simulator. It takes only few minutes to integrate into your iPhone project.

Related

It is possible to record video in iPhone device screen off mode?

Am working in iPhone device camera based iOS application. I have one requirement to record video from our application even the device screen is off or in locked. I don't have iPhone, iPod and iPad. And also i don't know it is possible to record video in these conditions. Cound you please give me any idea on this? Looking forward your help. Thanks in advance.
No this is not possible. There's no other way to achieve this.
In some countries it's against the law to even take picture without sound effect, such as Japan for example. No wonder Apple don't allow to shoot pictures from locked screen.

how to detect mic position on iPhone?

iPhone 4 has a mic on bottom-left, iPhone 3GS and earlier had a mic on bottom-right.
How can I detect where is the mic on iPhone? What function does that?
You will have to detect the specific model of device (e.g. "iPhone2,1", etc.) and do a table look-up from information you determine. And to future-proof the result, you may also have to have it look up the position of the mic from your web site, where you can keep a table updated with device types as Apple introduces new ones.
I would not use the method as said in the comment to your post. The minute the new iPad or iPod Touch is released with a front facing camera, your application is off.
Why not just use a method like in this post: Determine device (iPhone, iPod Touch) with iPhone SDK
The code (if you scroll a bit down) shows how to detect which version of iPod/iPhone/etc is running on.

Is there any way to get a three finger touch in the iPhone simulator

I have an app that I need to test 3 finger touches and 2 finger touches, is there a FREE application that allows me to use 3 finger instead of being limited to only using 2 fingers like in the simulator?
Not that I'm aware of. I think the iPhone Simulator included in the SDK is the only one that exists. You can't test a 3-fingered gesture without using the actual device.
iSimulate by vimov might be close to what you are looking for. I've sent the question of three finger touches to their support. Unfortunately, it is not FREE ($15.99) and requires you have an iPhone or iPod Touch to use it. You do not need to be a signed up developer though.
UPDATE: I got the following reply from support:
Yes, iSimulate works with up to five
fingers which is the limit of iPhone
touch screen.
On MKMapView, you can simulate a three-finger pan gesture by holding ⌥ + shift and dragging your finger up/down.
Didn't test if it works with other components of the OS.

I am thinking about buying the magic mouse but can I use it's multitouch capabilities for the iphone simulator

Can you use the magic mouse to use the iphone simulator, and get like more than just two fingers on the phone simulator?
Yes and no.
You'll be able to use the simulator but not more than two fingers. Simple like that :)
Edit: There might be some drawbacks
Touch events with Magic Mouse and iPhone Simulator
I've got a MacBookPro that has a multi-touch touchpad and it doesn't allow multi-touch in the iPhone simulator. Sucks, doesn't it?

iPod app stops responding after iPod returns from standby mode

The GUI of my application stops responding after the iPod has been in standby mode. The application I have made is based on the "Utility application" template from the wizard in xcode - but the original application still works after the iPod returns from standby.
My application plays music (AudioUnit) and when the iPod enters standby the music stops but when the iPod leaves standby mode the music starts playing again but as mentioned the GUI does not respond to touches anymore. All I can do is to shut it down.
I have read about this problem here:
What happens to an iPhone app when iPhone goes into stand-by mode?
but that did not help me enough to solve the problem.
Sounds like your Audio Unit has been stopped.
If your GUI relies on the AU's progress then that would explain the problem.
Check your AU's state in applicationDidBecomeActive.
I didn't think standby mode stopped AUs, I thought only audio interruptions
did that. Anyway, you should probably look at AudioSessions as well, as you'll
find that phone calls, alarms, SMSs and ipod music will also stop your Audio Unit.
Good luck.
Actually, I've been running into this problem on the iPod application itself, in just general daily use. That is, if you are using the 3.0 firmware OS, then this is most likely a bug in the iPhone. I guess you can relax, and know that it's probably not your own code that is causing the problem. I'd file a radar ticket with Apple if you haven't already so that they can address it in the next bug fix release.
It all happens just because I have an UISlider in an UIToolbar. If I remove the UISlider from my GUI it still responds after waking up from standby/sleep mode.
Can someone explain me why that causes this problem (is it a bug in Apple's code)?
The solution is here:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/4558-app-crashing-upon-quit.html
Simply don't put a slider in a toolbar. Make a work around so it looks like the slider is in the toolbar instead. It is a bug in Apple's code.