iOS: Connection error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
April 2019
April 2019
iOS: Connection error
Hello,
I initiate a request to the Visa Offers Platform with the following code:
NSError *error; NSData *postData = [NSJSONSerialization dataWithJSONObject:requestDataDictionary options:0 error:&error]; if (error) { NSException* jsonSerializationException = [NSException exceptionWithName:@"JSONSerializationException" reason:@"JSON Serialization Failed" userInfo:nil]; @throw jsonSerializationException; } [request setHTTPBody:postData]; NSURLSessionDataTask *postDataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { NSLog(@"Response:%@", response); }]; [postDataTask resume];
I get this error. Any idea what goes wrong ?
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
April 2019
April 2019
Re: iOS: Connection error
Hi,
From the logs, it seems like you are getting SSL handshake exception. It may be due to certificates not being passed along with the request. Please refer to the below blog for recommended architecture and plan to connect using a server layer.
Thanks,
Jai