PhoneGap 3.3.0在URLforFilesystemPath:selector上崩溃

use*_*309 2 cocoa-touch ios cordova

好的,我更新到Phonegap 3.3.0.现在,fileTransfer.download在iOS上的运行时崩溃并显示以下消息:

[CDVAssetLibraryFilesystem URLforFilesystemPath:]: unrecognized selector sent to instance 0x14d14ea0'
Run Code Online (Sandbox Code Playgroud)

所以我去了CDVAssetLibraryFilesystem.h和CDVAssetLibraryFilesystem.m并添加了一个虚函数:

- (NSString*) URLforFilesystemPath:(NSString*)path{
    return nil;
}
Run Code Online (Sandbox Code Playgroud)

这可以避免崩溃,但文件下载失败......

File Transfer Error: Could not create target file
Run Code Online (Sandbox Code Playgroud)

他们只是忘了实施它吗?有没有人拥有以前版本的代码?

谢谢

use*_*169 5

尝试将fullPath更改为toURL()

window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, 
    function(fileSystem){  //success
        //nativeLocalRootPath = fileSystem.root.fullPath; //old way
        nativeLocalRootPath = fileSystem.root.toURL(); //3.3.0
    }, function(){} //fail
);
Run Code Online (Sandbox Code Playgroud)

Cordova FileEntry Doc