You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/12/21 22:25:46 UTC

[GitHub] [cordova-plugin-file] BanTheRewind commented on issue #346: File Path Issue in iOS 13.1

BanTheRewind commented on issue #346:
URL: https://github.com/apache/cordova-plugin-file/issues/346#issuecomment-749231869


   I resolved this by using the application storage on iOS, rather than the "data directory".
   
   ```
   function getDataDirectory() {
       if (device.platform == "iOS") { // import { Capacitor } from '@capacitor/core';
           return `${cordova.file.applicationStorageDirectory}Documents`;
       }
       return `${cordova.file.dataDirectory}`;
   }
   
   ...
   
   window.resolveLocalFileSystemURL(getDataDirectory(), (directoryEntry) => {
     // Enjoy cross-platform success here
   }
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org