scattered opened a new issue #187:
URL: https://github.com/apache/cordova-plugin-media-capture/issues/187


   # Bug Report
   
   ## Problem
   
   I can't use `cordova-plugin-file` to access a recorded video on iOS.
   
   ### What is expected to happen?
   
   I should be able to use the following code to access the recorded video file:
   ```
   window.resolveLocalFileSystemURL(path, entry => {
       // I should be able to do something with the value in `entry`
   }, err => {
       // But I get an error with the status code of 5
   });
   ```
   ### What does actually happen?
   
   When trying to use the above code, the error callback is called with `err` 
containing `{ code: 5 }`.
   
   ## Information
   
   The above code works in Android, it's only iOS that I'm having an issue.
   
   The  `fullPath` value provided after successfully calling 
`navigator.device.capture.captureVideo()` is something like the following: 
`/private/var/mobile/Containers/Data/Application/7EF20D5A-03FE-4EA1-877A-8260CBCCE049/tmp/61945023201__49A539F3-B9CF-4E9B-B8B9-E497668AD4E7.MOV`.
   
   There is an open issue for `cordova-plugin-camera` that might be similar: 
https://github.com/apache/cordova-plugin-file/issues/346
   
   I tried implementing the fix mentioned in the above issue, but even after 
copying the file to another location and renaming it I still get the same 
problem. 
   
   I've also tried adding `File://` to the start of `fullPath`, but it resulted 
in the same issue.
   
   It's worth mentioning that I've added the follow permissions to my 
`config.xml`.
   ```
   <edit-config target="NSCameraUsageDescription" file="*-Info.plist" 
mode="merge">
       <string>We need camera access to take photos and record videos for 
theholla.co</string>
   </edit-config>
   <edit-config target="NSMicrophoneUsageDescription" file="*-Info.plist" 
mode="merge">
       <string>We need microphone access to record audio while you're making 
videos for theholla.co</string>
   </edit-config>
   <edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" 
mode="merge">
       <string>We need access to your gallery so you can access photos / videos 
to upload to theholla.co</string>
   </edit-config>
   ```
   The following SOF (relates to React Native, but should still be appropriate) 
comment advises that I don't need any additional permissions to read / write to 
an iOS device. So I'm working on the assumption that the above is all that's 
needed to read / write to the device.
   
   
https://stackoverflow.com/questions/53082568/how-can-i-request-ios-storage-permission-in-react-native
   
   ### Environment, Platform, Device
   Development Environment: OSX 10.15.1 / Xcode 11.5
   Device: iPhone 6S+ (iOS 13.5.1)
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   cordova: 10.0
   cordova-ios: 6.1.0
   cordova-android: 8.1.0
   cordova-browser: 6.0.0
   cordova-plugin-android-permissions: 1.0.2
   cordova-plugin-file: 6.0.2
   cordova-plugin-media-capture: 3.0.3
   
   ## Checklist
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to