Chartboost Delegate Error

I integrate chartboost into my sprite kit game and have successfully integrated bridge files into my fast code. Now in my application I have the following:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch.


    let kChartboostAppID = "5554c8680d60255c6a0f4af4"
    let kChartboostAppSignature = "1d0e271cd054c9a63473d2f1212ca33a2922a19f"


    Chartboost.startWithAppId(kChartboostAppID, appSignature: kChartboostAppSignature, delegate: self)
    Chartboost.cacheMoreApps(CBLocationHomeScreen)
    return true
}

class func showChartboostAds()
{
    Chartboost.showInterstitial(CBLocationHomeScreen);
}
func didFailToLoadInterstitial(location: String!, withError error: CBLoadError) {

}

the startWithId line gives me an error that cannot call this method with these arguments (String, String, AppDelegate). This was used to work fine on my object code c .. Does anyone know how to fix this?

+4
source share
1 answer
class AppDelegate: UIResponder, UIApplicationDelegate, ChartboostDelegate

Edit (from Lalit comment below)

The startWithAppIddelegate is configured to self, so you need to set the class AppDelegateas a delegate, which is executed with:

ChartboostDelegate(protocol)
0
source

All Articles