[TWTRURLSessionDelegate] Cancelling API request, SSL certificate is invalid

ios
login
twitterkit

#1

Hi,

I was testing logInWithMethods:completion: method.
and occurred error that completionHandler doesn’t get called.

Here is the error log.
2017-09-13 17:29:31.955512+0900 twitterSDK[5701:1238034] [TWTRURLSessionDelegate] Cancelling API request, SSL certificate is invalid.
2017-09-13 17:29:41.990032+0900 twitterSDK[5701:1238117] [TWTRURLSessionDelegate] Cancelling API request, SSL certificate is invalid.
2017-09-13 17:29:41.990894+0900 twitterSDK[5701:1237945] [TwitterKit] did encounter error with message “Error obtaining user auth token.”: Error Domain=TWTRLogInErrorDomain Code=-1 “” UserInfo={NSLocalizedDescription=}
2017-09-13 17:30:32.679907+0900 twitterSDK[5701:1238215] [TWTRURLSessionDelegate] Cancelling API request, SSL certificate is invalid.
2017-09-13 17:31:33.319904+0900 twitterSDK[5701:1238329] [TWTRURLSessionDelegate] Cancelling API request, SSL certificate is invalid.
2017-09-13 17:32:33.956296+0900 twitterSDK[5701:1238395] [TWTRURLSessionDelegate] Cancelling API request, SSL certificate is invalid.

Here is the test code.
[[Twitter sharedInstance] logInWithMethods:TWTRLoginMethodWebBasedForceLogin
completion:^(TWTRSession *session, NSError *error)
{
if (error == nil){
NSLog(@“loginTwitter success”);
} else {
NSLog(@“twitter error:%@”, error);
}
}];

Why doesn’t called completionHandler?
Because doesn’t called completionHandler, I can not any handle.

I’m using the TwitterCore, TwitterKit version2.8.1 and Fabric in my project.