Search code examples
iphonexcodecameraaccelerometermicrophone

Simulating accelerometers, microphone and camera in XCode


Is it possible to simulate movement (ie the accelerometers), microphone and camera in the XCode simulator?

If so, how do you do it?

If not, are there any XCode addins or third party apps that do it? (apart from downloading to an actual iPhone of course).

Thanks in advance!


Solution

  • The easiest way I found to do it is using the Wavefront Accelerometer Data App that can be found in the App Store. All you need to do is add a single file to your application then you can use the accelerometer in your iPhone or iPod touch to send data to your app in the simulator. You'll need a WiFi connection, and a device to use.

    You could probably find a solution that runs on the desktop, but you won't be getting accurate real life readings.

    I would recommend getting an actual device or your app can behave different than you expect it to. If this is a serious endeavor, you should be able to justify the cost of a device. An iPod Touch is much cheaper but you don't get the phone or camera capability. You can get a headset that has a microphone though.

    Those are the limitations, I don't think it wise to develop an app without testing it on a device. I've run into apps that crash all the time and figure it's because they are getting away with stuff in the simulator that you can't do in the memory and cpu constraints of the device.