Reputation: 1903
UPDATE
Works in iOS9 Beta 5
ORIGINAL QUESTION
Executing this line of code causes an EXC_BAD_ACCESS error to happen shortly after in some library code on a non-main thread before the completion handler is called.
[[[NSURLSession sharedSession] downloadTaskWithURL:[NSURL URLWithString: @"https://www.google.com/images/srpr/logo11w.png"]
completionHandler:^(NSURL *location,
NSURLResponse *response,
NSError *error) {
NSLog(@"At Download Completion Handler");
}] resume];
It happens on my iPad model A1403 on iOS 9 Beta 3 and 4, but not on iOS8.1, and works fine on my iPad model A1566 on both iOS 9 and iOS 8.4.
I've logged a bug with Apple.
Is anyone else having this issue? Does anyone see a workaround?
Tests:
Testing by Tander:
So the problem is really only occurring on device A1403 with iOS 9...
Upvotes: 2
Views: 596
Reputation: 7360
So I have tested this bit of code for you on the following versions of iOS: 8,3
(device) 9.0
(Simulator) and 9.4
(Device) - the completionHandler
always executes and the log is printed out on all test devices. Not a bug it would seem. Are you testing on an actual device(s) ?
Upvotes: 1