requestFileSystem not firing any callbacks on iOS

放肆的年华 提交于 2019-12-08 09:08:56

问题


I'm using PhoneGap build from Adobe. I am trying to write to iOS native file storage.

My config.xml

<gap:plugin name="org.apache.cordova.file" />
<preference name="iosPersistentFileLocation" value="Compatibility" />
<gap:platform name="ios" />

Index.html contains

<script src="cordova.js"></script>

My js

window.onerror = function(error) { console.log(error); };
document.addEventListener("deviceready", onDeviceReady, true);

function onDeviceReady() {
    console.log('Here we go');
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, onFileSystemFail);
}

function onFileSystemSuccess(fileSystem) {
    console.log('Ready');
}

function onFileSystemFail(e) {
    console.log('Fail');
}

Confirmed plugins are loading:

My console output is:

here we go

But I get nothing else, no fail or success messages so I'm totally in the dark about whether it was successful or not.

来源:https://stackoverflow.com/questions/22814647/requestfilesystem-not-firing-any-callbacks-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!