Community

[iOS] Empty authToken when activateInstallationWithDeviceId called

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?

Was this article helpful?

0 out of 0 found this helpful

Comments

5 comments

  • Avatar
    Dmitry Mesheryakov

    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.

    0
  • Avatar
    Permanently deleted user

    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.

    0
  • Avatar
    Permanently deleted user

    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...

    0
  • Avatar
    Permanently deleted user

    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?

    0
  • Avatar
    Permanently deleted user

    iosdev:

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

    0

Please sign in to leave a comment.