2012-06-07 30 views
4

我正在開發iPhone應用程序。我希望使用chartboost。我是這個概念的新手,所以我使用了該網站提供的代碼,但仍然無法正常工作。我在appdelegate.m文件中使用了上面的代碼。並添加了SystemConfiguration.framework和QuartzCore.framework。還有什麼我需要做的嗎?ChartBoost廣告不顯示在我的視圖

#import "Chartboost.h" 
- (void)applicationDidBecomeActive:(UIApplication *)application { 
// Configure ChartBoost 
ChartBoost *cb = [ChartBoost sharedChartBoost]; cb.appId = @"APP_ID"; 
cb.appSignature = @"APP_SIGNATURE"; 
// Notify the beginning of a user session 
[cb startSession]; 
// Show an interstitial 
[cb showInterstitial]; } 
+0

是否將您的「APP_ID」和「APP_SIGNATURE」替換爲ChartBoost網站上的實際值?像「4fd91 ...」? – AbePralle

回答

0

我的方法的實現來初始化Chartboost

- (void) initChartboost { 

    Chartboost *cb = [Chartboost sharedChartboost]; 

    // Add your own app id & signature. These can be found on App Edit page for your app in the Chartboost dashboard 
    cb.appId = @"YOUR APP ID FROM CB"; 
    cb.appSignature = @"APP SIGNATURE"; 

    // Begin a user session. This should be done once per boot 
    [cb startSession]; 

    // Cache an interstitial at the default location 
    [cb cacheInterstitial]; 

    // Cache the more apps page so it's ready & loaded 
    [cb cacheMoreApps]; 
} 

也付出你的關注,你會看到正確的模擬器間質,但看到他們在設備上,你有你的設備UDID添加到所描述的Chartboost here.