CFURLDestroyResource现在在iOS7中已弃用。用什么代替呢? [英] CFURLDestroyResource is now deprecated in iOS7. What to use instead?

查看:86
本文介绍了CFURLDestroyResource现在在iOS7中已弃用。用什么代替呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CFURLDestroyResource现在已被弃用。我不确定该用什么代替它,也没有运气过苹果的文档。

CFURLDestroyResource is now deprecated. I am unsure what to use instead of it though, and haven't had any luck digging through Apple's documentation.

我正在使用BlackRaccoon操纵我的FTP服务器,它利用了CFURLDestroyResource,它现在当然会引起编译器警告。

I am using BlackRaccoon to manipulate my FTP server and it makes use of CFURLDestroyResource which is of course now causing a compiler warning.

推荐答案

我们也遇到了这个问题,在Apple的框架内找不到任何替代方法。在CFURLAccess.h中,Apple建议使用NSURLConnection,但是我找不到用上述类执行删除的方法。似乎大多数第三方库也都使用CFURLDestroyResource。

We also ran into this issue and couldn't find any alternative within Apple's framework; in CFURLAccess.h, Apple recommends using NSURLConnection, but I could not find a way to perform deletions with said class. It would also seem that most third-party libraries make use of CFURLDestroyResource as well.

然后我们发掘了此内容: https://github.com/nkreipke/FTPManager 。该FTPManager利用了Objective-C是C的严格超集这一事实,并通过创建原始套接字并简单地手动编写命令来执行FTP操作。对于习惯于高级解决方案的开发人员来说,这种方法可能有点麻烦,但它的极简主义和效率却很优雅。而且当您了解它时,大多数其他FTP框架可能仍会在某种程度上执行诸如此类的命令。

Then we unearthed this: https://github.com/nkreipke/FTPManager. This FTPManager leverages the fact that Objective-C is a strict superset of C and performs the FTP operations by creating the raw sockets and simply writing the commands manually. It is a method that may be a bit "nuts and bolts" for developers who are accustomed to high-level solutions, but it's elegant in its minimalism and efficiency. And when you get right down to it, most other FTP frameworks are probably executing commands such as these at some level anyway.

这篇关于CFURLDestroyResource现在在iOS7中已弃用。用什么代替呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆