apache / apache/cordova-plugin-file
File access with cordova-ios 6.0.0
- Dominant language
- JavaScript
- Stars
- 744
- Forks
- 754
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Description
I use the file plugin and I access try to access to local files via this:
`let path = cordova.file.dataDirectory + nameFile;
window.resolveLocalFileSystemURL(path, success, error);`
and with cordova-ios 6.0.0 I always receive error (NOT_FOUND_ERR).
I do not explicitly use the "file://" scheme, but actually, if I inspect the code at runtime, I see that path has the following value:
"file:///Users/[username]/Library/Developer/CoreSimulator/Devices/E56CD54C-AA0C-43F8-BB37-9D91CA3754C1/data/Containers/Data/Application/683C763A-1710-4729-83E0-DC693A142188/Library/NoCloud/[filename]"
So, maybe, I just need to change some preference in the config.xml or to do something else simple.
I also tried to read this [blog post](https://cordova.apache.org/announcements/2020/06/01/cordova-ios-release-6.0.0.html) and I tried to add the preference options indicated but they didn't work (probably, I've missed something or I've not understood something properly).
I'm also using the [ionic-webview](https://github.com/ionic-team/cordova-plugin-ionic-webview)
Thank you for any advice you can give me!
Contributor guide
Research direction
Start by reviewing the file plugin usage around window.resolveLocalFileSystemURL, the config.xml preference options from the linked Cordova iOS 6.0.0 announcement, and the interaction with ionic-webview. Reproduce the NOT_FOUND_ERR with the shown file URL; done means identifying a documented configuration or plugin change that makes the local file resolve successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100