I would like to push a video into iPhone simulator to test video picking in UIImagePickerController. Is it possible to do that? And if it possible, could you please provide me with some advices?
Thanks.
None of the other methods suggested here worked for me, but I found a way that works on the latest version (6.1) of the simulator:
.m4v
file from your file system onto the simulator window. The video will now be playing in safari.You're done!
I made it easier:
first, I recorded a sample screencast with QuickTime X and saved it for iPhone.
then, I copied it to '~/Library/Application Support/iPhone Simulator/User/Media/DCIM/100APPLE/VID_0001.m4v'
(maybe you'll need to create 100APPLE directory). relaunched iPhone simulator and saw my video under 'Saved Photos' in Photos.app. when I use UIImagePickerController, that video is there and I'm able to choose it.
If that helps, I use SDK 3.2.1 on 10.6.2.
You can subclass UIImagePickerController
to override its behaviour and provide your own view. If you do this, you can then call imagePickerController:didFinishPickingMediaWithInfo:
and supply your own pre-recorded video. If you include a video actually recorded from an iPhone 3GS, the behaviour you get will be pretty damn similar to that of the actual device.
Of course, always always always test on a real device before shipping!
We use a subclass of CLLocationManager
in a very similar fashion to give a better location simulation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With