CFURLDestroyResource现已在iOS7中弃用。有人知道要用什么吗? [英] CFURLDestroyResource is now deprecated in iOS7. Anyone know what to use instead?
问题描述
现在不推荐使用CFURLDestroyResource。我不确定要使用什么而不是它,并且没有任何运气通过Apple的文档挖掘。
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.
谢谢!
Scott
Thanks! Scott
推荐答案
我们也遇到了这个问题,在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屋!