The issue occurs because of an error in the sample code. It should be fixed this week, the temporary solution please see in this post.
ABBYY Cloud OCR SDK returning empty authToken in response?
Question
I wanted an OCR solution for my project and I found ABBYY cloud OCR SDK interesting. I was just checking out a sample provided in the gitHub link. The project requires an applicationID and a password to authenticate in their server. I got the required credentials by registering in their site as a free trial. The problem is that I cannot authenticate. I get an empty authToken as response.
It gets crash here
NSString *installationId = [responseDictionary valueForKey:@"authToken"];
[[NSUserDefaults standardUserDefaults] setObject:installationId forKey:kOCRSDKInstallationId];
NSParameterAssert(self.installationId);
These are from the sample project I used. I cannot figure out the reason for this.
Its an exceptional breakpoint at NSParameterAssert(self.installationId);
I get this on crashing
Assertion failure in -[OCRDemoClient activateInstallationWithDeviceId:success:failure:force:], /Users/meerajpai/Meera/OCR/ocrsdk.com- master/iOS/Pods/OCRSDKClient/OCRSDKClient/OCRSDKClient.m:98
Close look at the screenshot is available here
Here is the response
Printing description of responseDictionary:
{
"__name" = response;
"_xmlns" = "http://ocrsdk.com/schema/response-1.0.xsd";
"_xmlns:xsi" = "http://www.w3.org/2001/XMLSchema-instance";
"_xsi:schemaLocation" = "http://ocrsdk.com/schema/response-1.0.xsd http://ocrsdk.com/schema/response-1.0.xsd";
authToken = {
};
}
I am interested to know why cant I authenticate? Did I miss something ?
Thanks in advance
Solution