[iOS] Empty authToken when activateInstallationWithDeviceId called

  • 1.7K Views
  • Last Post 01 August 2013
iosdev posted this 25 July 2013

Hi

I am trying out the cloud SDK for iOS, and when calling on my OCRSDKClient instance the method:

  • (void)activateInstallationWithDeviceId:(NSString )deviceId success:(void (^)(void))success failure:(void (^)(NSError error))failure force:(BOOL)force

In the success block when parsing the XML I can see the authToken return is empty... which then fail on

        NSParameterAssert(self.installationId);

So where I am not 100% sure -and the doc are not really clear, when creating the instance of OCRSDKClient what value should I pass for the applicationID ? Should it be the name of my app which is something like "TestOCRXX" or should it be some kind of ID? If this is some kind of ID where can I find it? The management area doesn't show any of that.

Thank! Really curious to try the SDK out.

[Edit] just to be clear I start my app by doing:

self.ocrClient = [OCRSDKClient clientWithApplicationId:@"TestOCRXX" password:@"XXXXX"];

and yes I double checked the app name and password. The app name is the one that appear in my management UI, and I can see that it has the default number of free pages for trial. HELP! I am trying in the Simulator... Should it be tried on a device?

Order By: Standard | Newest | Votes
Dmitry Me posted this 26 July 2013

The code you cite is from some very old sample. The updated sample is here https://github.com/abbyysdk/ocrsdk.com/tree/master/iOS - you should pass the application id which is the same as your application name.

iosdev posted this 26 July 2013

I am using the appropriate latest SDK... Remember I am not using the example code provided but my own code using directly the OCRSDKClient class instead of subclassing. The problem happen when calling the activateInstallationWithDeviceId: API which trigger the call to the server but return always an empty authToken in the XML but then because the authToken is empty the NSParameterAssert() fail and the app can't go further.

iosdev posted this 26 July 2013

The SDK I am using is: https://github.com/abbyysdk/iOS.POD.OCRSDKClient/blob/master/OCRSDKClient/OCRSDKClient.m

and the failure is happening at line 98 just after the code check the authToken...

Anastasia Galimova posted this 31 July 2013

Could you please try to run our latest sample https://github.com/abbyysdk/ocrsdk.com/tree/master/iOS using the quick start guide http://ocrsdk.com/documentation/quick-start/iphone-ocr-sdk/ and let us know if the issue occurs in this case?

Anastasia Galimova posted this 01 August 2013

iosdev:

Thank... using the latest SDK works! The example did work, and then re-using the latest SDK in my project worked too.

Close