I was just trying out a sample project on OCR. I got it from gitHub link. I added the applicationId and password and when I execute it, it gets crashed as the token is empty. This is the point where its crashing.
NSString *installationId = [responseDictionary valueForKey:@"authToken"];
[[NSUserDefaults standardUserDefaults] setObject:installationId forKey:kOCRSDKInstallationId]; NSParameterAssert(self.installationId);
I cant figure out what I am doing wrong here. Please help
コメント
5件のコメント
What could be the reason for this? Should i have to be a paid user to be authenticated?? I just wanted to have a free trial first. Thanks in advance....
According to this question in ABBYY Forum http://forum.ocrsdk.com/questions/1042/cant-find-application-id-abbyy_appid there is another hex value for applicationId which doesn't come in the email from ABBYY on registering the app. Its visible in the HTML content of the website. And on replacing this I don't get the crash instead I get 401 error. Now i don't get whats wrong here? Any guess why its happening so?? Thanks in advance.
Dear Meera,
We apologize for the long delay.
1) According to the logs of your account, you have registered two applications: "OCRTestDemo" and "CharacterReaderDemo". Only the first one has available pages for the recognition for free. Could you please clarify, if the error occurs when ApplicationID="OCRTestDemo"?
2) As I see from your post on Stackoverflow, you use iOS. Have you followed the instructions to run the sample?
Thank you for the answers.
Hi,
there seems to be a problem in the iOS example. It's trying to activate an 'installationId' before submitting the HTTP requests which IMHO is not necessary.
Change the method
activateInstallationWithDeviceId in ocrsdk.com/iOS/Pods/OCRSDKClient/OCRSDKClient/OCRSDKClient.m:82
to:
https://gist.github.com/tompie/df31c5ecaeb42cedb483
and it should work.
Cheers,
Thomas
Thank you for the solution! The developers confirmed it is a bug. The sample code should be fixed this week.
サインインしてコメントを残してください。