How do I get video into the iPhone simulator camera roll in iOS 4.2?

David Moles picture David Moles · Jan 6, 2011 · Viewed 15.3k times · Source

I've tried the solution described here and here, namely copying a QuickTime movie to ~/Library/Application Support/iPhone Simulator/User/Media/DCIM/100APPLE/VID_0001.m4v, but this doesn't seem to do anything, and I'm guessing something's changed since iOS 3.2 to make it not work.

Note that I'd very much prefer a solution that doesn't involve adding code to my app, unless that really is the only way to do it.

ETA: I know that it's possible to include video files as a resource; what I want is to add video files to the camera roll -- as can be done with photos by (for instance) saving images from Safari -- so I can test functionality that involves picking media files.

Updated again: If somebody can definitively tell me it's not possible, with references, that would be helpful too.

Answer

Pwnosaurus picture Pwnosaurus · Aug 20, 2013

I found a way that seems to work in most versions of the simulator (confirmed for 6.1):

  1. Start up the simulator and navigate to the photos app from the home screen.
  2. Drag and drop an .m4v file from your file system onto the simulator window. The video will now be playing in safari.
  3. Click "done" in the upper left hand corner.
  4. Click on the "share" button and select "save to camera roll"

You're done!