You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I´m building a Cordova app for iOS (Vue / Quasar based [1]). I use the plugin to share items (images, pdfs) from other apps to my app via the iOS Share Sheet. When the items are shared successfully a native file URI like file:///var/mobile/Media/PhotoData/OutgoingTemp/3DD09AF1-75C5-4D6E-AC04-A539DEA401E5/1b91976f-8b9e-4eba-8699-505458907b4b.JPG becomes available in my app. The docs hint that I need to use the cordova-plugin-file [3] to actually access and use the shared file.
I tried out two different ways to access the file with cordova-plugin-file (taken directly from their documentation [4][5]). Directly on a device.
Given item.data = file:///var/mobile/Media/PhotoData/OutgoingTemp/3DD09AF1-75C5-4D6E-AC04-A539DEA401E5/1b91976f-8b9e-4eba-8699-505458907b4b.JPG
... results in ERROR: resolveLocalFileSystemURL 1 (NOT_FOUND_ERR)
And second approach
window.requestFileSystem(window.LocalFileSystem.TEMPORARY,0,function(fs){console.log('file system open: '+fs.name)fs.root.getFile(item.data,{create: false,exclusive: false},function(fileEntry){console.log('fileEntry is file?'+fileEntry.isFile.toString())},function(err){console.error('getFile',err.code)})},function(err){console.error('requestFileSystem',err.code)})
... results in ERROR: getFile 5 (ENCODING_ERR)
I already looked extensively for possible hints to what might cause this (SO, Cordova Forums, Plugin Forums, Quasar Forums), but had no luck so far. Exploration of the plugins source code (tracing the error codes, etc) also gave me no clue to what might be the issue.
i have the same problem. it seems to be the internal url. I have compared with other plugins and this is the result with same photo, the first two are shared from Photos app and the third is added with gallery plugin.
We noticed that when the shareextension is closed, the files are deleted from the temporary folder.
We fixed that by putting a long timeout in the ios code before it closes the extension but it would be better to have some kind of .finish() method in the handler.
I´m building a Cordova app for iOS (Vue / Quasar based [1]). I use the plugin to share items (images, pdfs) from other apps to my app via the iOS Share Sheet. When the items are shared successfully a native file URI like
file:///var/mobile/Media/PhotoData/OutgoingTemp/3DD09AF1-75C5-4D6E-AC04-A539DEA401E5/1b91976f-8b9e-4eba-8699-505458907b4b.JPG
becomes available in my app. The docs hint that I need to use the cordova-plugin-file [3] to actually access and use the shared file.I tried out two different ways to access the file with cordova-plugin-file (taken directly from their documentation [4][5]). Directly on a device.
Given
item.data = file:///var/mobile/Media/PhotoData/OutgoingTemp/3DD09AF1-75C5-4D6E-AC04-A539DEA401E5/1b91976f-8b9e-4eba-8699-505458907b4b.JPG
First approach
... results in
ERROR: resolveLocalFileSystemURL 1
(NOT_FOUND_ERR
)And second approach
... results in
ERROR: getFile 5
(ENCODING_ERR
)I already looked extensively for possible hints to what might cause this (SO, Cordova Forums, Plugin Forums, Quasar Forums), but had no luck so far. Exploration of the plugins source code (tracing the error codes, etc) also gave me no clue to what might be the issue.
Anyone any ideas where to look next?
iOS: 13.5.1
[1] https://quasar.dev
[3] https://github.com/apache/cordova-plugin-file
[4] https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/#cdvfile-protocol
[5] https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/#sample-create-files-and-directories-write-read-and-append-files-
The text was updated successfully, but these errors were encountered: