Unable to access file on iOS device

Using the capacitor filesystem plguin when I try to read a file I receive an error that I dont have permission to view it.

// Here's an example of reading a file with a full file path. Use this to
// read binary data (base64 encoded) from plugins that return File URIs, such as
// the Camera.

const data = await Filesystem.readFile({
 path: "file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/Downloads/Instrumental.wav",
});

I see

[Error] Failed to load resource: The file “Instrumental.wav” couldn’t be opened because you don’t have permission to view it.

Struggling to find any viable solution on the web.

  1. You may set right configuration on your iOS(Info.plist) and Android(AndroidManifest.xml) project (Filesystem Capacitor Plugin API | Capacitor Documentation)

  2. Before readFile() method, you need to call checkPermissions() and requestPermissions().

Hey thanks for the reply. I have the correct permissions and the checkPermissions and requestPermissions functions appear to be meant for android only. So I’m still confused.