requestFileSystem不会在iOS上触发任何callback
我正在使用Adobe的PhoneGap构build。 我正在尝试写入iOS本机文件存储。
我的config.xml
<gap:plugin name="org.apache.cordova.file" /> <preference name="iosPersistentFileLocation" value="Compatibility" /> <gap:platform name="ios" />
包含Index.html
<script src="cordova.js"></script>
我的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'); }
确认的插件正在加载:
我的控制台输出是:
开始了
但我没有别的,没有失败或成功的消息,所以我完全在黑暗中是否成功。