我刚刚升级到Chartboost SDK 5.0。它工作得很好,广告显示,但出于某种原因,我收到了这个警告:
Chartboost Integration Warning: startWithAppId:appSignature:delegate must be called before +[Chartboost cacheInterstitial:]
知道为什么吗?我在-(void)applicationDidBecomeActive:
下的AppDelegate中调用startWithAppId
,然后用[Chartboost cacheInterstitial:CBLocationMainMenu];
将间隙缓存在另一个类中
警告指示在应用程序启动序列中
[Chartboost cacheInterstitial...]
在使用启动Chartboost会话之前执行的调用
[Chartboost startWithAppId...]
。
正如开发者指南告诉的那样,iOS发布顺序如下:
- 应用程序:willFinishLaunchingWithOptions
- 应用程序:didFinishLaunchingWithOptions
- 应用程序Did变为活动
因此,正如当前的Chartboost集成帮助所建议的那样,[Chartboost startWithAppId..]
调用应该进入didFinishLaunchingWithOptions
方法,然后进入缓存调用。
希望这能有所帮助!
尝试在didFinishLaunchingWithOptions 中添加初始化Chartboost的代码
这可能不是一个"答案",但最简单的避免方法是将"间隙缓存"的代码放在AppDelegate上的另一行之后。它还将帮助您的应用程序有更多的时间获得Ad.