Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用NSURLSession代替NSURLConnection #31

Open
yxztj opened this issue Dec 24, 2015 · 10 comments
Open

使用NSURLSession代替NSURLConnection #31

yxztj opened this issue Dec 24, 2015 · 10 comments

Comments

@yxztj
Copy link

yxztj commented Dec 24, 2015

在NSURLConnection.h里面提到
/*** DEPRECATED: The NSURLConnection class should no longer be used. NSURLSession is the replacement for NSURLConnection ***/
是否考虑把YYWebImageOperation里的NSURLConnection替换为NSURLSession?

@ibireme
Copy link
Owner

ibireme commented Dec 24, 2015

目前还能用,而且还需要支持 iOS6,所以没打算换。
不过以后总会找机会换掉的。

@yxztj
Copy link
Author

yxztj commented Dec 25, 2015

OK。或者也可以像AFNetworking那样分版本支持不同的iOS版本?
毕竟使用deprecated的类有一定风险。

@ibireme
Copy link
Owner

ibireme commented Dec 25, 2015

这种 API,只有大版本号更新的时候,才会有被完全抛弃的危险,在那之前有好几个月的测试版,来得及改。

@smithereensarr
Copy link

smithereensarr commented Jun 30, 2016

感谢作者,iOS10马上就出了,是否有考虑抛弃iOS6?目前90%以上的公司都面向iOS7+,并在明年直接考虑面向iOS8+,我也建议改为NSURLSession,希望作者能采纳!最后,对您的贡献表示感谢🙏

@xxycode
Copy link

xxycode commented Aug 11, 2016

SD也早些时候换成nsurlsession了

@Smeegol
Copy link

Smeegol commented Feb 21, 2017

现在都iOS8+了,iOS7也是时候抛弃了

@crespoxiao
Copy link

有 一个 PR 是做这个的 ,但是代码是有一些问题的,比如 LOCK 都没初始化,暂时不敢用

@indulgeIn
Copy link

作者有空希望替换为 NSURLSession 。

@muxueChen
Copy link

今天读了YYWebImage,在源码里面好像没有看见处理相同url 重复下载的代码

@muxueChen
Copy link

看了源码,里面还是用的是 NSURLConnection,现在这个网络这一块都是在用 NSURLSession 了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants