2014-02-13 54 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