gpt4 book ai didi

ios - PhoneGap 3.3.0 在 URLforFilesystemPath : selector 上崩溃

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:28:45 25 4
gpt4 key购买 nike

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

[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

他们只是忘记实现了吗?有人有以前版本的代码吗??

谢谢

最佳答案

尝试将 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

关于ios - PhoneGap 3.3.0 在 URLforFilesystemPath : selector 上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21750113/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com