2013-06-22 99 views

回答

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和分配的插页式广告这个位置。

相关问题