adPOPcornオファーウォール
adPOPcornはアプリ内にオファーウォールを表示して、ユーザーが広告に参加完了した件数に対してデベロッパー様に追加収益をご提供するサービスです。
adPOPcornに関する詳細は、以下のガイドをご確認ください。
[adPOPCornのご案内]
注意事項
- adPOPcorn add-onを連携する前に、IGAW基本連携を完了してください。「IGAW基本連携:iOS」
- adPOPcornの連携のために、AdPopcornOfferwall~*.framework ファイルを Xcode プロジェクトに追加する必要があります。「SDKインストール:iOS」
- adPOPcornの連携のために、Apple Advertising Identifier(IDFA)を取得するように設定してください。「IDFA設定の案内」
- 現金型のリワードを提供する場合、以下の検証基準を必ず確認してください。(2016年1月1日より適用)
「adPOPcorn現金型リワード媒体に対する検証基準のご案内」
adPOPcornオファーウォールAPI
adPOPcornオファーウォールを連携するために、IgaworksCore.h, AdPopcorn.Offerwall.hファイルをimportして利用します。
リワードサーバータイプの設定
以下のように ( * )リワードサーバーの連携方法を設定します。
[IgaworksCore shared].useIgaworksRewardServer = NO;
//YES : IGAWorksリワードサーバーの利用
//NO : 自体ポストバックサーバーの利用
( * )リワードサーバーの連携方法について
IGAWリワードサーバーで渡すリワード情報を受信する方法を設定します。自体ポストバックサーバーを構築していただき、ポストバックを受信する方法をお勧めします。
上記の場合、セキュリティの管理及びCS処理などの維持管理に便利です。
自体ポストバックサーバーの構築が難しい場合は、IGAWリワードサーバーを利用してクライアントからポストバックの受信が可能です。
useIgaworksRewardServer パラメータを利用して設定します。
[IgaworksCore shared].useIgaworksRewardServer = NO;
//YES : IGAWorksリワードサーバーの利用
//NO : 自体ポストバックサーバーの利用
ユーザー識別値の入力
ユーザー識別値は、キャンペーンを完了したユーザーを識別してリワードを付与するために利用する情報です。
ユーザー識別値はユーザーがオファーウォールをオープンする前に設定してください。
注意事項
- 1名のユーザーに1つの固有な識別値を持ちます。可変値は使用しないでください。
- 個人情報(メールアドレス、名前、電話番号、識別できるユーザーIDなど)を含んではいけません。
- 日本語、記号、スペースなどが含まれている場合、必ずURL Encording処理を行ってください。
- openOfferWallWithViewController: delegate: userDataDictionaryForFilter: APIを呼び出す前に設定してください。
上記の注意事項を確認し、ユーザー識別値を入力します。
[IgaworksCore setUserId:@"user10001"];
オファーウォールの表示
openOfferWallWithViewController: delegate: userDataDictionaryForFilter: APIを呼び出し、オファーウォールを表示します。
オファーウォールにアクセスするためのボタンやバナー、イメージなどのクリックイベントで呼び出しします。
#import <IgaworksCore/IgaworksCore.h>
#import <IgaworksAD/AdPopcorn.h>
-(void)didClickOpenOfferwallBtn
{
[AdPopcornOfferwall openOfferWallWithViewController:self delegate:self userDataDictionaryForFilter:nil];
}
#import <IgaworksCore/IgaworksCore.h>
#import <IgaworksAD/AdPopcorn.h>
-(void)didClickOpenOfferwallBtn
{
[AdPopcornOfferwall openOfferWallWithViewController:self delegate:self userDataDictionaryForFilter:nil];
}
Load / Show Video AD API
配信中の動画広告を読み込むために下記APIを呼び出します。
//API : loadVieoAd:delegate(id)
[AdPopcornOfferwall loadVideoAd:self];
動画広告を呼び出したときに登録したデリゲートで、2つのイベントコールバックを返却します。
■ loadVideoAdSuccess : 動画広告ロード成功
■ loadVideoAdFailedWithError (APError apError) : 動画広告ロード失敗
◆ EXCEPTION = 200;
◆ ABUSING = 500;
◆ CAN_NOT_FIND_AVAILABLE_CAMPAIGN = 1000;
◆ INVALID_MEDIA_KEY = 1400;
◆ UNKNWON_EXCEPTION = 9999;
読み込んだ動画広告を表示するために下記APIを呼び出します。
//API : showVideoAdWithViewController:delegate
[AdPopcornOfferwall showVideoAdWithViewController:self delegate:self];
動画広告を表示するときに登録したデリゲートで、5つのイベントコールバックを返却します。
■ WillOpenVideoAd,didOpenVideoAd,WillCloseVideoAd,didCloseVideoAd
■ ShowVideoAdFailedWithError: 動画広告の再生失敗
リワード動画広告の場合、動画を読み込みて表示する際に件数が消化されて参加できない場合があります。
◆ TERMINATED_OR_INVALID_CAMPAIGN = 980;
◆ TERMINATED_OR_INVALID_CAMPAIGN = 999;
◆ ALREADY_COMPLETED_CAMPAIGN = 2000;
//API : loadVieoAd:delegate(id)
[AdPopcornOfferwall loadVideoAd:self];
//API : showVideoAdWithViewController:delegate
[AdPopcornOfferwall showVideoAdWithViewController:self delegate:self];
デリゲート
オファーウォール及び動画広告のLoad / Showアクションに対するデリゲートを提供します。
デリゲートを利用するために、AdPopcornOfferwallDelegateをinterfaceに登録してください。
@interface MyViewController () <AdPopcornOfferwallDelegate>
@end
@implementation MyViewController
-(void)willOpenOfferWall {
NSLog(@"オファーウォールを開きます。");
}
-(void)didOpenOfferWall {
NSLog(@"オファーウォールを開きました。");
}
-(void)willCloseOfferWall {
NSLog(@"オファーウォールを閉じます。");
}
-(void)didCloseOfferWall {
NSLog(@"オファーウォールが終了されました。");
}
- (void)loadVideoAdSuccess{
NSLog(@"動画広告ロードを成功しました。");
}
- (void)loadVideoAdFailedWithError:(APError *)error{
NSLog(@"動画広告ロードを失敗しました。");
}
- (void)willOpenVideoAd{
NSLog(@"動画広告を開きます。");
}
- (void)didOpenVideoAd{
NSLog(@"動画広告が開かれました。");
}
- (void)willCloseVideoAd{
NSLog(@"動画広告を閉じます。");
}
- (void)didCloseVideoAd{
NSLog(@"動画広告を終了しました。");
}
- (void)showVideoAdFailedWithError:(APError *)error{
NSLog(@"動画広告の再生に失敗しました。");
}
@end
adPOPcornオファーウォールスタイルAPI
adPOPcornオファーウォールの色のスタイルを変更することができます。スタイル変更APIはAdPopcornStyle.hをimportして利用することができます。
AdPopcornStyle.hで、あらかじめ設定されているenumテーマを利用するか、直接UIColorを入力してください。
#import <AdPopcornOfferwall/AdPopcornStyle.h>
- (void)changeOfferwallTheme {
// Theme color
[AdPopcornStyle sharedInstance].adPopcornThemeColor = AdPopcornThemeYellowColor;
// Text color
[AdPopcornStyle sharedInstance].adPopcornTextThemeColor = AdPopcornThemeRedColor;
// Reward text color
[AdPopcornStyle sharedInstance].adPopcornRewardThemeColor = AdPopcornRewardThemeBlueColor;
// Reward check text color
[AdPopcornStyle sharedInstance].adPopcornRewardCheckThemeColor = AdPopcornRewardCheckThemeYellowColor;
// Theme custom color
[AdPopcornStyle sharedInstance].adPopcornCustomThemeColor = [UIColor colorWithRed:1.0f green:66/255.0f blue:66/255.0f alpha:1.0f];
// Text custom color
[AdPopcornStyle sharedInstance].adPopcornCustomTextThemeColor = [UIColor grayColor];
// Reward text custom color
[AdPopcornStyle sharedInstance].adPopcornCustomRewardThemeColor = [UIColor colorWithRed:1.0f green:66/255.0f blue:66/255.0f alpha:1.0f];
// Reward check text custom color
[AdPopcornStyle sharedInstance].adPopcornCustomRewardCheckThemeColor = [UIColor orangeColor];
}
#import <AdPopcornOfferwall/AdPopcornStyle.h>
- (void)changeOfferwallTheme {
// Theme color
[AdPopcornStyle sharedInstance].adPopcornThemeColor = AdPopcornThemeYellowColor;
// Text color
[AdPopcornStyle sharedInstance].adPopcornTextThemeColor = AdPopcornThemeRedColor;
// Reward text color
[AdPopcornStyle sharedInstance].adPopcornRewardThemeColor = AdPopcornRewardThemeBlueColor;
// Reward check text color
[AdPopcornStyle sharedInstance].adPopcornRewardCheckThemeColor = AdPopcornRewardCheckThemeYellowColor;
// Theme custom color
[AdPopcornStyle sharedInstance].adPopcornCustomThemeColor = [UIColor colorWithRed:1.0f green:66/255.0f blue:66/255.0f alpha:1.0f];
// Text custom color
[AdPopcornStyle sharedInstance].adPopcornCustomTextThemeColor = [UIColor grayColor];
// Reward text custom color
[AdPopcornStyle sharedInstance].adPopcornCustomRewardThemeColor = [UIColor colorWithRed:1.0f green:66/255.0f blue:66/255.0f alpha:1.0f];
// Reward check text custom color
[AdPopcornStyle sharedInstance].adPopcornCustomRewardCheckThemeColor = [UIColor orangeColor];
}
リワードサーバーの連携及び検収
アプリでオファーウォールを表示するための連携が完了しました。
これより、キャンペーンを完了したユーザーに実際のリワードを付与するためのリワードサーバーの連携を進めてください。
[IGAWリワードサーバー連携:adPOPcorn]
リワードサーバーの連携を完了した後、テスト広告を通じて広告の参加・リワードの付与が正常に行われるか確認し、検収の申し込みを行ってください。
adPOPcornオファーウォールをご利用いただくためには、必ず検収が必要となります。
adPOPcorn管理画面の検収の申し込みでIPAファイルをご送付いただくか、担当者まで検収をお申し込みください。1~2営業日以内に検収結果をご連絡致します。
検収に関するお問い合わせ : QA@igaworks.com
その他のお問い合わせ:bizdev-jp@igaworks.com