2

I created a simple Cordova App (iOS) with the following basic functionality:

  1. One taps a button to select a video from the Camera Roll (using the Camera plugin)
  2. This video file is transferred to Amazon S3 (using the FileTransfer plugin)

This works splendidly, but I wanted to make this even more effortless by implementing a Sharing Extension. I succeeded in creating a plugin (based on Cordova: sharing browser URL to my iOS app (Clipper ios share extension)) which allows the user to tap the 'Share with...' button in any video app and select my app.

In my app, I receive the file URL of the selected video:

file:///var/mobile/Media/DCIM/101APPLE/IMG_1347.MOV

This is an URL directly to the Camera Roll. Is it possible to access (and copy) this file using the Cordova File plugin (or any other plugin)? Or do I need to adjust my Swift code to copy this file to the App Sandbox first?

Community
  • 1
  • 1
Flock Dawson
  • 1,842
  • 4
  • 22
  • 34
  • Looks like the Camera plugin has the option to either grab a picture from the Camera itself, or the photo library: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/#camerapicturesourcetype--enum – Jason Washo Jun 29 '17 at 16:46

0 Answers0