Ich habe kürzlich mein iOS Cordova Projekt von 2.7.0 auf 3.4.0 aktualisiert.FileSystem auf Cordova 3.4.0 schlägt fehl "Konnte keine Zieldatei erstellen"
Nach dem Upgrade Dateisystemzugriff ist gebrochen. (scheint aber im Simulator zu funktionieren?)
Ich bekomme die Fehlermeldung "Ich konnte keine Zieldatei erstellen", ich googelte herum und dachte, mein "Fullpath" zu "toURL()" zu ändern, aber ohne Erfolg. Ich weiß wirklich nicht, was ich als nächstes versuchen soll.
hier ist mein Downloadcode
window.requestFileSystem(
LocalFileSystem.PERSISTENT, 0,
function onFileSystemSuccess(fileSystem) {
fileSystem.root.getFile(
"dummy.html", {
create: true,
exclusive: false
},
function gotFileEntry(fileEntry) {
var sPath = fileEntry.toURL().replace("dummy.html", "");
var fileTransfer = new FileTransfer();
fileEntry.remove();
fileTransfer.download(
"https://dl.dropbox.com/u/13253550/db02.xml",
sPath + "database.xml",
function (theFile) {
console.log("download complete: " + theFile.toURI());
showLink(theFile.toURI());
setTimeout(function() {
checkConnection();
}, 50);
},
function (error) {
console.log("download error source " + error.source);
console.log("download error target " + error.target);
console.log("upload error code: " + error.code);
});
},
fail);
},
fail);
Haben Sie das Datei-Plugin auch aktualisiert? 2.7.0 bis 3.4.0 ist ein großer Sprung. –
Ja, alle Plugins wurden auf die neuesten Versionen aktualisiert. Und obwohl ich zustimme, dass es ein großer Sprung ist, habe ich ähnliche Sprünge vorher mit anderen Projekten gemacht, dies ist der erste mit Problemen – Hessius