How do I test a camera in the iPhone simulator?

Viewed 73778

Is there any way to test the iPhone camera in the simulator without having to deploy on a device? This seems awfully tedious.

7 Answers

There are a number of device specific features that you have to test on the device, but it's no harder than using the simulator. Just build a debug target for the device and leave it attached to the computer.

List of actions that require an actual device:

  • the actual phone
  • the camera
  • the accelerometer
  • real GPS data
  • the compass
  • vibration
  • push notifications...

I never tried it, but you can give it a try! iCimulator

 iCimulator

Nope (unless they've added a way to do it in 3.2, haven't checked yet).

I wrote a replacement view to use in debug mode. It implements the same API and makes the same delegate callbacks. In my case I made it return a random image from my test set. Pretty trivial to write.

Just found a repo on git that helps Simulate camera functions on iOS Simulator with images, videos, or your MacBook Camera.

Repo

Related