Search code examples
iphoneiosobjective-ctapjoy

TapJoy crash iPhone app


I am working on tapjoy publisher SDK integration for my iPhone app.I was working fine but after updating to latest SDK 9.0.3 its started crashing here on this line .

[TapjoyConnect requestTapjoyConnect:TAPJOY_ID secretKey:TAPJOY_SECRET_KEY];

Crash description.

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

Any help will be greatly appreciated. Thanks


Solution

  • Make sure you added TapjoyPublisherLibrary not advertising lib.

    Here is 8.x to 9.x upgrade instruction.

    #import "TapjoyConnect.h"
    
    [TapjoyConnect requestTapjoyConnect:TAPJOY_APP_ID secretKey:TAPJOY_APP_SECRECT_KEY];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getFullScreenAd:) name:TJC_FULL_SCREEN_AD_RESPONSE_NOTIFICATION object:nil];
    
    
    - (void)getFullScreenAd:(NSNotification*)notifyObj
    {
        // Displays a full screen ad, showing the current featured app.
        [TapjoyConnect showFullScreenAd];
    
    }
    
    -(void)showTapJoyAds
    {
        // This method asks the tapjoy server for the featured app object.
        [TapjoyConnect getFullScreenAd];
    }