FranGhe opened a new issue, #1607:
URL: https://github.com/apache/cordova-ios/issues/1607
I have updated cordova-ios to version 8.0.0
When the application starts, it downloads images to the path:
cordova.file.dataDirectory
(file:///var/mobile/Containers/Data/Application/66537287-9DF5-4F24-9C3C-40CA69C03B34/Library/NoCloud/)
I then retrieve the images and I use cordova-plugin-wkwebview-file-xhr to
convert to app link but fail and inspecting the console it says: Failed to load
resource: The file “myFile.jpg” not exist.
This my function;
```
function setImages(thisImage){
console.log(thisImage); //
file:///var/mobile/Containers/Data/Application/66537287-9DF5-4F24-9C3C-40CA69C03B34/Library/NoCloud/myFile.jpg
var imageConverted=window.WkWebView.convertFilePath(thisImage);
console.log(imageConverted); //
app://localhost/_app_file_/var/mobile/Containers/Data/Application/66537287-9DF5-4F24-9C3C-40CA69C03B34/Library/NoCloud/myFile.jpg
$("#image").css({'background-image':'url("'+encodeURI(imageConverted)+'")'});
// on console I have: Failed to load resource: The file “myFile.jpg” not
exist.
}
```
How I can solve the problem?
This is my settings:
- Cordova Version: 13.0.0
- Cordova-ios: 8.0.0
- cordova-plugin-wkwebview-file-xhr : 3.1.1
My config.xml
```
<platform name="ios">
<preference name="hostname" value="localhost" />
<preference name="scheme" value="app" />
</platform>
```
Thanks for your support in advance
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]