CFURLDestroyResource is now deprecated in iOS7. What to use instead?

好久不见. 提交于 2019-12-06 01:48:00

问题


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.

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


回答1:


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.

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.



来源:https://stackoverflow.com/questions/20179995/cfurldestroyresource-is-now-deprecated-in-ios7-what-to-use-instead

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!