Hi, I have a routine that create a file that is working in Android, but It doesn't work in IOS.
¿Any idea?
My code:
code
var fileSystem = false;
var fnCargaSistemaFicheros = function() {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
};
function gotFS(fs) {
fileSystem = fs;
};
function fail(error) {
fnLog('ERROR:' + error.code);
};
/* WRITE TXT */
var fnWriteFile = function(fichero) {
if (fileSystem === false) {
fnCargaSistemaFicheros();
}
fileSystem.root.getFile(fichero, {
create: true,
exclusive: false
}, gotFileEntry, fail);
};
function gotFileEntry(fileEntry) {
fileEntry.createWriter(gotFileWriter, fail);
}
function gotFileWriter(writer) {
writer.onwriteend = function(evt) {
fnLog('End write');
};
writer.write("Hello world");
}
/code