rubymotion ios ruby technical Jan 10, 2016
Picking images & videos from the iOS photo album with RubyMotion
We’ve been working on a video app for a client of ours. We came across the need to select videos from the iOS camera roll/photo album. It was one of those trial and error type (-frustrating) endeavours. We thought we’d write down our findings in the hope of saving someone else from the same frustration.
As with a lot of things, it ended up being pretty simple in the end.
First we use the UIImagePickerController
to check if the source type we need is available and then present the picker. The media types weren’t obvious at first. Check out the docs for more configuration options.
Then when that’s complete, you can pick up the URL of the selected video. You can copy it like we do here or do whatever else you need.