Scroll
Follow

SDK not working / No SDK Key and Secret

Hello,

I've downloaded the SDK 8.2 of Layar. I followed the tutorial to launch a simple scan view controller, but I have all the time a crash on iPad or iPhone.

Here is my code (very simple):

- (void)initLayarSDK
{
NSString *consumerKey = @"...";
NSString *consumerSecret = @"...";
if (!self.layarSDK)
{
self.layarSDK = [LayarSDK layarSDKWithConsumerKey:consumerKey
andConsumerSecret:consumerSecret andDelegate:self];
}

[self.layarSDK viewControllerForScanningWithCompletion:^(UIViewController<LayarSDKViewController> *viewController)
{
[self presentViewController:viewController animated:YES completion:nil]; // Crash here
}];
}

- (IBAction)startLayarButtonTapped:(id)sender {
[self initLayarSDK];
}

On iPhone, I have this error:

[LPServiceProvider createServiceProviderForLayarSDKWithLocalyticsSession:andExtraServices:]: unrecognized selector sent to class 0x2420d4

And on iPad, this one:

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<LPVisionOverlayViewController 0x16d93640> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key detachContainer.'

It's the same code on iPad or iPhone, and the same "sructure": A Storyboard, an AppDelegate (not modified) and a viewController, that's it.

I have no AOuth key yet, do you think it's the reason of crash ?

Thank you for your help, I'm really lost and don't understand why it doesn't work.

Regards,
Christophe.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Max

    Hi ChristopheC,

    In order to use the SDK you will need an SDK key. You can send a request for that here :

    https://dashboard.layar.com/products/custom-solutions/sdk/request/key/

    Once you recieved the Key and Secret [ {NSString *consumerKey = @"...";NSString *consumerSecret = @"..."; ] from us you should integrate it in the SDK and then it should be working.

    Best regards,

    Max

  • Avatar
    ito_ogami

    Hi Max,

    I've downloaded the last version of the sdk, now I want to build my first app and for test it I need the Key end Secret. I tried the link u poste above https://dashboard.layar.com/products/custom-solutions/sdk/request/key/ but I got a 404 error.
    Can you please tell me how to get these numbers?

    Best regards,

    Ito

  • Avatar
    lvillarejo

    Hi, same problem.

    Filled in the SDK request form, got an email approving the SDK download. I already downloaded but tried to request de Key and Secret through here:

    https://dashboard.layar.com/products/custom-solutions/sdk/request/key/

    But got a 404.

    How can we get the key and secret?

    Thanks
    Luis

  • Avatar
    ito_ogami

    Hi ivillarejo,

    Max from layar suppor team sent me the good link, u can find the good page here:

    https://www.layar.com/solutions/request-sdk/key

    Ito

  • Avatar
    lvillarejo

    Thanks a lot Ito

  • Avatar
    itheark

    hey .. igot the sdk and the secret in my app..when i scan a test campaign..the apps show unknows or deactivated app... i just got my kery 2 days ago

  • Avatar
    pavelquevedo
    I got the same problem with the "unknown or deactivated app" message. itheark, did you solve the problem?
  • Avatar
    meadlearning

    I requested for api key but didn't get

Powered by Zendesk