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

'initWithRequest:delegate:startImmediately:' is deprecated: first deprecated in iOS 9.0 - Use NSURLSession (see NSURLSession.h) #1318

Closed
mehranzand opened this issue Sep 27, 2015 · 7 comments

Comments

@mehranzand
Copy link

Hi,

After migrate my project to iOS 9.0 and xCode 7.0 i getting above warning.
I guess SDWebImage uses NSURLConnection instead of NSURLSession.
Please change the code and make new update.

Thanks in Advance

@bpoplauschi bpoplauschi added this to the 4.0.0 milestone Oct 1, 2015
@adle29
Copy link

adle29 commented Dec 26, 2015

I need this fixed! Have no idea how to solve it.

@Ge0rges
Copy link

Ge0rges commented Jan 23, 2016

I also get this error on the latest version.

SDWebImage/SDWebImageDownloaderOperation.m:96:52: 'initWithRequest:delegate:startImmediately:' is deprecated: first deprecated in iOS 9.0 - Use NSURLSession (see NSURLSession.h)

@Je14
Copy link

Je14 commented Feb 14, 2016

I have the same! Can anyone give me some hints?

@brandonkehl
Copy link

Just passing through, I had this same problem. Instead of using NSURLConnection you must use NSURLSession.Since I don't know what your code looks like here is a basic outline of what needs to be there. If you have any trouble consult the class reference .
`NSURLSession *session = [NSURLSession sharedSession];

NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error)
{
// do something with the data
}];
[dataTask resume];`

@dreamgo
Copy link

dreamgo commented Mar 2, 2016

@brandonkehl still doesn't work. can you show more details?

@bpoplauschi bpoplauschi modified the milestones: 3.8.0, 4.0.0 Jun 2, 2016
oanapopescu added a commit to oanapopescu/SDWebImage that referenced this issue Jun 2, 2016
…1291 SDWebImage#1318 SDWebImage#823 SDWebImage#1566

- one session per operation to preserve the ordering and priority functionalities
- removed all the runloop code that was only used to keep the operation running. I am relying on non-setting the isFinished property to keep the operation running
- todo: check deallocation, test background tasks
@bpoplauschi
Copy link
Member

Resolved by #1578

@bpoplauschi
Copy link
Member

3.8.0 version was just released.

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

7 participants