I am trying to develope an iOS application with ABBYY OCR SDK sample code. I changed OCRDemoClient.m file with my applicationID and application password recieved by email. Because I want this application run on version 7, so I fixed some depreciated methods with latest version methods. Now, the sample code can be built successful in Xcode stimulator and iPhone devices. But when I use it to recognize the sample picture, it causes error :Expected status code in (200-299), got 401. It seems that this error caused by unauthorized client request over http request. But I am new to object C, I can't find how to fix this problem. Is there anyone has the same problem? Any suggestions are more than welcome!

Regards, Leo.

asked 03 Mar '14, 02:23

Leo%20Ye's gravatar image

Leo Ye

edited 03 Mar '14, 02:46

Our developer recommends to use HTTP debugger (Fiddler, Wireshark or any other) to check if you send the right http-request.


answered 04 Mar '14, 16:03

Anastasia%20Galimova's gravatar image

Anastasia Ga... ♦♦

Hi, Anastasia, I still have some questions:

1)I followed the instructions to set up pod files, the Podfile is using "(platform :ios, "5.0" pod "OCRSDKClient", "0.2.1")", could it be changed to ios 7.0? Does the "OCRSDKClient" podfile works for ios 7.0?

2)Do I need to change some core code in the sample code(AFHTTPClient.m or AFHTTPRequestOperation.m) except providing my credentials to connect to Cloud OCR SDK.

3)I tried to dubug the http-request with Charles, It seems that it connects URL: http://cloud.orcsdk.com/activateNewInstallation?deviceId=(Xcode Stimulator ID) Status: Completed Response Code: 401 Unauthorized Is it possible that this error 401 is related with device ID??

4) Where the sample code sents the picture to OCR Cloud SDK? and Where the sample code receives the returned text? Could you list the filename and which line?

Maybe these questions are stupid, but I have been debugging this problem since last monday, but I can't solve this problem. Any help will be appreciated.

(11 Mar '14, 01:47) Leo Ye

Now, the error was fixed!! It turns out that my application was Block after resetting the password.


(11 Mar '14, 03:29) Leo Ye

We are happy to know that the issue is solved.

(11 Mar '14, 17:19) Anastasia Ga... ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 03 Mar '14, 02:23

Seen: 6,252 times

Last updated: 11 Mar '14, 17:19

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal