Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将文件夹元数据设置为';无法在Phonegap 3.3.0/iOS上工作_Ios_File_Cordova_Metadata - Fatal编程技术网

将文件夹元数据设置为';无法在Phonegap 3.3.0/iOS上工作

将文件夹元数据设置为';无法在Phonegap 3.3.0/iOS上工作,ios,file,cordova,metadata,Ios,File,Cordova,Metadata,我尝试使用setMetadata方法,使用文件插件,但似乎不起作用 不执行成功或失败回调。当我使用console.log(entry.setMetadata)时,它会打印正确的方法。我使用文件插件访问、创建和删除文件和文件夹,没有问题。只有setMetadata不起作用 例如: localFileSystem = LocalFileSystem.PERSISTENT; subFolder = "Backups"; metadataKey = "com.apple.Mobi

我尝试使用setMetadata方法,使用文件插件,但似乎不起作用

不执行成功或失败回调。当我使用console.log(entry.setMetadata)时,它会打印正确的方法。我使用文件插件访问、创建和删除文件和文件夹,没有问题。只有setMetadata不起作用

例如:

    localFileSystem = LocalFileSystem.PERSISTENT;
    subFolder = "Backups";
    metadataKey = "com.apple.MobileBackup";
    metadataValue = 1;

    window.requestFileSystem(localFileSystem, 0, function(fileSystem) {
        fileSystem.root.getDirectory(subFolder, {create: true, exclusive: false}, function(parent) {

            var data = {};
            data[metadataKey] = metadataValue;
            console.log(data); // OK
            console.log(parent); // OK
            parent.setMetadata(function() {
                console.log("success setting metadata"); // Nothing
            }, function() {
                console.log("error setting metadata"); // Nothing
            }, data);
        }, function() {
            console.log("error getting dir"); // Nothing, directory is OK
        });
    }, function(error) {
        console.log(error.code); // No error here
    });

这是文件插件上的一个bug。我与Github上的开发人员进行了核对:

正在等待Phonegap站点上的更改