Why is window.requestFileSystemSync undefined?
-
09-02-2021 - |
Question
I'm working with phonegap API developing in IOS. I need to retrieve the storage directory synchronously. I am trying to use window.requestFileSystemSync(LocalFileSystem.PERSISTENT,0)
but window.requestFileSystemSync
is undefined
. Any help? Thanks
Solution
According to the documentation of PhoneGap v1.1.0, there is only an asynchronous method to do this called requestFileSystem
.
OTHER TIPS
Two things come to mind:
- did you wait for phonegap device ready event?
- did you include the phonegap.js file in your html page?
The problem was that, phonegap does not define sync file system. Will have to do with async version. Thanks.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow