0

For my app I have fetched the videos from the photo library on my phone and have created a collection view of all the videos. I am able to get the correct file path for each video when I go to upload it to Firebase but it won't let me because I don't have permission to view it.

picture of error in debugger console

I know the function to upload the file to Firebase works because if I access the videos using ImagePickerController and go directly to the video in my photo library I can get the URL from there and upload it.

So to summarize, how do I grant my Xcode project permission to open a video file so the URL can be uploaded to Firebase?

Any help to solve this problem is greatly appreciated!

Saveen
  • 3,742
  • 14
  • 32
  • 38
  • did you try this https://stackoverflow.com/questions/32445471/file-couldnt-be-opened-because-you-dont-have-permission?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – Kamran Apr 12 '18 at 20:21
  • Can you verify if you have this key `NSPhotoLibraryUsageDescription` in info.plist – Kamran Apr 12 '18 at 20:27
  • Please put the error message into your question as text, not a picture. – picciano Apr 12 '18 at 21:14
  • Yes I have the "Privacy - Photo Library Usage Description" inside of the p list, which is why I am confused – D'Shawn Apr 13 '18 at 02:51
  • Here is the error as it appears in the console – D'Shawn Apr 13 '18 at 02:53
  • Unable to load data: Error Domain=NSCocoaErrorDomain Code=257 "The file “IMG_7646.MOV” couldn’t be opened because you don’t have permission to view it." UserInfo={NSFilePath=/var/mobile/Media/DCIM/117APPLE/IMG_7646.MOV, NSUnderlyingError=0x1c06508c0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}} – D'Shawn Apr 13 '18 at 02:53

0 Answers0