Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRavin Kohli
3,367 PointskCFStreamErrorDomainSSL
error -NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
3 Answers
Vanessa Cantero G贸mez
7,376 PointsCan you please give more information? Where are you getting this error? Paste here the code that triggers this error.
Ravin Kohli
3,367 Points- (void)viewDidLoad { [super viewDidLoad]; NSError *error= nil; NSURL *blogURL = [NSURL URLWithString:@"https://blog.teamtreehouse.com/api/get_recent_summary/"]; NSData *jsonData = [NSData dataWithContentsOfURL:blogURL]; NSDictionary *dataDictionary= [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error]; NSLog(@"%@",jsonData); self.blogPosts = [dataDictionary objectForKey:@"resuts"];
}
Ravin Kohli
3,367 Pointsit was solved by replacing https with http thank you
Vanessa Cantero G贸mez
7,376 PointsWell, it's not exactly a good solution. With ATS (App Transport Security ) it's mandatory that our connections are secure. But, I'm not sure why it's not working. Treehouse uses TLS 1.2 and SHA-2, so I have no idea what's the issue here.