I am new to PhoneGap programming.My question is
how to store downloaded PDF file internally with in the application for iOS. Here is what I have:
function downloadFile() {
alert('start');
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
window.resolveLocalFileSystemURI("http://www.w3.org/2011/web-apps-ws/papers/Nitobi.pdf", onResolveSuccess, fail);
}
function onFileSystemSuccess(fileSystem) {
alert(fileSystem.name);
console.log(fileSystem.name);
}
function onResolveSuccess(fileEntry) {
alert('success');
console.log(fileEntry.name);
}
function fail(evt) {
console.log(evt.target.error.code);
}
And also I added plugin as cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git
But it is not working.Do we need any plugin for this LocalSystem?Please help me.