无法在我的iPhone应用程序中显示playhaven全屏广告

时间:2013-06-22 12:39:38

标签: ios objective-c cocoa-touch playhaven

我有一个iPhone应用程序,我在其中成功集成了 revmob SDK和 chartboost SDK,但 playhaven SDK不起作用。

我已经下载了完整的SDK,也提到了here on this old Stack Overflow Question 。我仍然没有在我的应用程序中看到该广告。有没有好的教程?

1 个答案:

答案 0 :(得分:1)

我的PlayHavan工作示例:https://app.box.com/s/lc2p8jhngn5o8hxeuw3y

代码:

#define PLAYHAVAN_TOKEN @"e1aa8bfe19d74ba3a30d9caa7f69a083"
#define PLAYHAVAN_SECRET @"e915e3ca790546b88ab252d032876b6a"  

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   [self initPlayHavan];
   [self showPlayHavanFullScreenAds];
}


-(void) initPlayHavan
{
    [[PHPublisherContentRequest requestForApp: PLAYHAVAN_TOKEN secret: PLAYHAVAN_SECRET placement:@"game_launch" delegate:self] preload]; //level_complete

    _notificationView = [[PHNotificationView alloc] initWithApp:PLAYHAVAN_TOKEN secret:PLAYHAVAN_SECRET placement:@"game_launch"];
    _notificationView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
}


-(void)showPlayHavanFullScreenAds
{
  PHPublisherContentRequest *request = [PHPublisherContentRequest requestForApp: PLAYHAVAN_TOKEN secret: PLAYHAVAN_SECRET placement:@"game_launch" delegate:self];
    [request send];
}

确保您为此展示位置添加了展示位置game_launch并分配了插页式广告。