2014-02-13 55 views
2

好吧,我更新到Phonegap 3.3.0。现在fileTransfer.download崩溃在运行时与消息的iOS:PhoneGap 3.3.0在URLforFilesystemPath上崩溃:选择器

[CDVAssetLibraryFilesystem URLforFilesystemPath:]: unrecognized selector sent to instance 0x14d14ea0' 

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

- (NSString*) URLforFilesystemPath:(NSString*)path{ 
    return nil; 
} 

避免了崩溃但文件下载失败...

File Transfer Error: Could not create target file 

他们只是忘了执行它吗?有没有人有以前版本的代码?

感谢

+0

你添加插件和更新的平台? – QuickFix

回答

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 
); 

Cordova FileEntry Doc