2014-09-13 53 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的其他行之後。它也將幫助您的應用程序有更多時間來獲取廣告。