0

I want to implement chartboost in my project & i have a demo of chartboost from https://github.com/ChartBoost/client-examples

i have added my cb.appId and cb.appSignature in appdelegate but when i run this code it shows error of [__NSCFDictionary setObject:forKeyedSubscript:] i have checked using breakpoint debugging it shows error after this code in ExampleAppAppdelegate.m

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:    (NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        self.viewController = [[ExampleAppViewController alloc] initWithNibName:@"ExampleAppViewController_iPhone" bundle:nil];
    } else {
        self.viewController = [[ExampleAppViewController alloc] initWithNibName:@"ExampleAppViewController_iPad" bundle:nil];
    }
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;
}

so,in appdelegate what should i have to change to overcome this error?

In my project in appdelegate.m i have added this code in applicationdidbecomeactive method i have added following code to include chartboost

-(void) applicationDidBecomeActive:(UIApplication *)application
{
    Chartboost *cb = [Chartboost sharedChartboost];

    cb.appId=@"51c3e47d17ba475b0b000002 ";
    cb.appSignature=@"392392796fb9a1603bcd2deb0aa9a17442ccd83d";

    // Begin a user session. Must not be dependent on user actions or any prior network requests.
    [cb startSession];

    // Show an interstitial
    [cb showInterstitial];
    if( [navController_ visibleViewController] == director_ )
        [director_ resume];
}

but still it gives same error

Komal Shah
  • 219
  • 1
  • 14

0 Answers0