Hey guys,since NSURLConnection is deprecated in iOS 9, I'm trying to replace it with the recommended NSURLSession. When the completion handler of my NSURLSessionDataTask is getting called my app terminates due to an uncaught exception 'NSInvalidArgumentException' – the reason: 'data parameter is nil'. Of course a corrupt URL can be the reason for this error, but I've already checked that. Now, let me show you my code:- (void)downloadItemsWithQuery:(NSString *)searchString { NSString *theQuery = [searchString uppercaseString]; NSString *encodedString = [theQuery stringByAddingPercentEncodingWithAllowedCharacters: [NSCharacterSet characterSetWithCharactersInString:@!*'();:@&=+$,/?%#[]]]; NSURL *theURL = [NSURL URLWithString:[NSString stringWithFormat: @http://alexpoets.com/VPlan/service.php?klasse=%@, encodedString]]; NSURLSessionDataTask *dataTask = [[NSURLSession sharedSession] dataTaskWithURL:theURL completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { _downloadedData = [[