2014-09-13 72 views
3

我刚升级到Chartboost SDK 5.0。它工作正常,广告显示,但由于某种原因,我收到此警告:Chartboost委托集成警告

Chartboost Integration Warning: startWithAppId:appSignature:delegate must be called before +[Chartboost cacheInterstitial:] 

任何想法为什么?我打电话startWithAppId在我-(void)applicationDidBecomeActive:下的AppDelegate,然后我只是缓存插页不同类[Chartboost cacheInterstitial:CBLocationMainMenu];

回答

1

的警告表明,在应用程序启动顺序您

[Chartboost startWithAppId...]启动Chartboost会议前

[Chartboost cacheInterstitial...]

调用执行。

As the developer guide告诉iOS的启动顺序具有以下顺序:

  1. 应用:willFinishLaunchingWithOptions
  2. 应用中:didFinishLaunchingWithOptions
  3. applicationDidBecomeActive

所以作为当前Chartboost integration help暗示[Chartboost startWithAppId..]呼叫应然后进入didFinishLaunchingWithOptions方法他缓存通话。

希望这会有所帮助!

0

尝试添加代码以初始化Chartboost在didFinishLaunchingWithOptions

0

这可能不是一个“答案”,但避免这种情况的最简单方法是简单地将“interstital缓存”的代码放在AppDelegate的其他行之后。它也将帮助您的应用程序有更多时间来获取广告。