andreafrancioni commented on issue #628: URL: https://github.com/apache/cordova-plugin-file/issues/628#issuecomment-2589669484
Hi breautek, today i tested the app on IOS Simulator and it works fine, but when i build the app and install it on real devices (iPhone 13 Pro Max 18.2.1) i got the problem, i cant figure out whats its going on. I think its a problem with access permission to mobile folder, cause on Simulator the path of cached files are on: `file:///Users/andrea.francioni/Library/Developer/CoreSimulator/Devices/F8023E24-5204-496C-B442-0CB634870DB9/data/Containers/Data/Application/D75CC093-800E-4846-874A-F8022C4AD5B2/Library/NoCloud/indicazioni_piano_terra_def.mp4` And on this path i can write/read file without any problem and they load everywhere on DOM. While the path on real device is: `file:///var/mobile/Containers/Data/Application/EC749CD6-F9FE-405B-8D52-D4C6127677D0/Library/NoCloud/indicazioni_intro_def.mp4` And on this path i can write without problem but i didnt see it when i load it on dom. I also tryed add a reader object: ``` loadCachedVideo(v) { if (!v) { console.error("Il parametro 'v' รจ vuoto."); return null; } const videoUrl = this.cacheDirectory + this.getFileName(v); console.log('video url: ' + videoUrl); window.resolveLocalFileSystemURL(videoUrl, (fileEntry) => { fileEntry.file((file) => { const reader = new FileReader(); reader.onloadend = () => { console.log('File letto con successo:', reader.result); }; reader.readAsArrayBuffer(file); }, (error) => { console.error("Errore nella lettura del file:", error); }); }, (error) => { console.error("Errore nel recuperare il file:", error); }); return videoUrl; } ``` and the result of console.log of reader.onloadend is: "File letto con successo: -ArrayBuffer (byteLenght: 15310703, resizable: false, maxByteLenght: 15310703... Also tryed using the workaround u gave me with WkWebView.convertFilePath(theFilePath); but i didnt understand how to use it. -- 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. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org