전면 광고

전면 광고는 자연스럽고 적절한 상황에 표시되는 전체 화면 광고입니다. 띠배너 광고보다 10배 더 큰 사이즈로, 사용자의 관심을 사로잡아 보다 높은 광고 수익을 창출할 수 있습니다.

다음 과정을 통해 전면 광고 수익화를 시작해 보십시오.

전면 광고 설정

앱을 추가한 후 INTERSTITIAL을 선택하여 전면 광고 유형에 맞는 배치를 생성합니다.

전면 광고 배치를 생성하면 배치 ID를 사용할 수 있습니다.

전면 광고 생성

IMInterstitialUIViewController 하위 클래스로, 사용자의 터치에 반응하는 전체 화면 광고를 표시합니다.

다음 단계를 통해 전면 광고를 프로그래밍으로 생성하십시오.

  1. 헤더를 가져오고 ViewController.h 파일에서 전면 광고 인스턴스를 선언합니다. ViewController 헤더 파일의 내용은 다음과 같습니다.

    #import  <uikit uikit.h="">
    @import InMobiSDK;
    @interface ViewController : UIViewController <iminterstitialdelegate>
    @property (nonatomic, strong) IMInterstitial *interstitial;
    @end
    		</iminterstitialdelegate></uikit>
    
  2. 전면 광고 오브젝트를 인스턴스화합니다. ViewController.m 파일의 viewDidLoad 메소드는 다음과 같습니다.

    -(void)viewDidLoad {
     [super viewDidLoad];
    self. interstitial = [[IMInterstitial alloc] initWithPlacementId:@"Insert your placement ID here"];
    self. interstitial.delegate = self;
    [self.interstitial load];
    }
    
    


    중요: 배치 ID당 1개의 오브젝트를 생성하고 이후 광고 로드 시 이를 재사용합니다.

  3. 광고 상태 콜백의 경우, IMInterstitial의 델리게이트 속성을 구현합니다. 다음 콜백이 지원됩니다.

    /*Indicates that the interstitial is ready to be shown */
    - (void)interstitialDidFinishLoading:(IMInterstitial *)interstitial {
        NSLog(@"interstitialDidFinishLoading");
    }
    /* Indicates that the interstitial has failed to receive an ad. */
    - (void)interstitial:(IMInterstitial *)interstitial didFailToLoadWithError:(IMRequestStatus *)error {
        NSLog(@"Interstitial failed to load ad");
        NSLog(@"Error : %@",error.description);
    }
    /* Indicates that the interstitial has failed to present itself. */
    - (void)interstitial:(IMInterstitial *)interstitial didFailToPresentWithError:(IMRequestStatus *)error {
        NSLog(@"Interstitial didFailToPresentWithError");
        NSLog(@"Error : %@",error.description);
    }
    /* indicates that the interstitial is going to present itself. */
    - (void)interstitialWillPresent:(IMInterstitial *)interstitial {
        NSLog(@"interstitialWillPresent");
    }
    /* Indicates that the interstitial has presented itself */
    - (void)interstitialDidPresent:(IMInterstitial *)interstitial {
        NSLog(@"interstitialDidPresent");
    }
    /* Indicates that the interstitial is going to dismiss itself. */
    - (void)interstitialWillDismiss:(IMInterstitial *)interstitial {
        NSLog(@"interstitialWillDismiss");
    }
    /* Indicates that the interstitial has dismissed itself. */
    - (void)interstitialDidDismiss:(IMInterstitial *)interstitial {
        NSLog(@"interstitialDidDismiss");
    }
    /* Indicates that the user will leave the app. */
    - (void)userWillLeaveApplicationFromInterstitial:(IMInterstitial *)interstitial {
        NSLog(@"userWillLeaveApplicationFromInterstitial");
    }
    /* interstitial:didInteractWithParams: Indicates that the interstitial was interacted with. */
    - (void)interstitial:(IMInterstitial *)interstitial didInteractWithParams:(NSDictionary *)params {
        NSLog(@"InterstitialDidInteractWithParams");
    }
    / * Not used for direct integration. Notifies the delegate that the ad server has returned an ad but assets are not yet available. */
    - (void)interstitialDidReceiveAd:(IMInterstitial *)interstitial {
      NSLog(@"interstitialDidReceiveAd");
    }
    
    
  4. 전면 광고를 표시하려면 다음 코드를 사용하십시오.

    [self.interstitial showFromViewController:self];
    //[self.interstitial showFromViewController:self withAnimation:kIMInterstitialAnimationTypeCoverVertical];
    
    


    가능한 애니메이션 유형은 다음과 같습니다.

    • kIMInterstitialAnimationTypeCoverVertical
    • kIMInterstitialAnimationTypeFlipHorizontal
    • kIMInterstitialAnimationTypeNone

중요:

  • showFromViewController를 호출하기 전에 interstitialDidFinishLoading 델리게이트가 실행되어야 합니다. 그렇지 않으면 오류 콜백 interstitial:didFailToPresentScreenWithError:가 호출됩니다. 광고를 완전히 불러왔을 때만 show를 호출하려면 전면 광고 상태를 계속 리스닝합니다.
  • 전면 광고가 표시되고 이후 해제될 때마다 [self.interstitial load];를 다시 호출해야 합니다. 그렇지 않으면 showFromViewController를 다시 호출할 수 없습니다.

CreativeID 검색 중

진행되고 있는 모든 광고 품질 검사를 피해나와, 관련성이없고 불쾌한 소재 또는 사용자에게 혼란을주는 광고를 보여줌으로써 앱의 사용자 경험을 손상시키는 불량 광고주가 가끔 있습니다. 이러한 상황을 극복하기 위해 광고 인스턴스의 creativeID를 검색하고 InMobi 담당자에게 암호화 된 creativeID를보고 할 수 있습니다.

mInterstitialAd.creativeId // mInterstitialAd는 예제 인스턴스입니다.

통합 테스트

  1. InMobi 포털에서 테스트 모드를 구성합니다.

    Tools - Diagnostics로 이동하여 Test Mode를 Global ON 또는 Selective ON으로 설정합니다.

    광고를 처음으로 연동하려는 경우 Test ModeGlobal ON으로 설정합니다.
    특정 디바이스에 선택적으로 테스트 트래픽을 활성화하려는 경우

    이미 이 광고에 이전 버전의 SDK를 연동한 적이 있으므로 몇 개의 디바이스에 테스팅을 제한해야 하는 경우
    Test ModeSelective ON으로 설정합니다.

    디바이스 섹션에서:

    1. Device ID 상자에 디바이스 ID를 입력합니다.
    2. Device Name 상자에서 이름을 설정합니다.
    3. Add Device를 클릭하여 테스트 디바이스를 추가합니다.

    이미 구성된 디바이스가 있는 경우, 해당 디바이스를 선택하면 테스트 모드가 활성화됩니다.

    참고: 앱을 정식으로 출시하기 전에 반드시 테스트 모드를 비활성화하십시오. 이를 비활성화하지 않으면 앱을 수익화할 수 없습니다.

    이제 테스트를 진행할 수 있습니다.

    디바이스 ID 확인

    디바이스 ID는 기본적으로 IDFA 또는 IFA(Identifier for Advertising)입니다. 디바이스 ID를 확인하는 가장 쉬운 방법은 SDK 로그 수준을 “디버그”로 설정하는 것입니다. 디버그 로그를 활성화하려면 아래와 같이 이를 AppDelegate.m 파일 내의 didFinishLaunchingWithOptions 메소드에 추가하십시오.

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {    
    	//Initialize InMobi SDK with your account ID
    [IMSdk initWithAccountID:@"Insert InMobi account ID here"];
    //Set log level to Debug
    [IMSdk setLogLevel:kIMSDKLogLevelDebug]; 
    	// Do your stuff.
    	return YES;
    }
    
    


    디버그 모드에서 디바이스 ID는 다음과 같이 XCode 개발자 콘솔에 로깅됩니다. “퍼블리셔 디바이스 ID는 <디바이스-ID>입니다.”

    이 디바이스 ID를 Device ID 상자에 입력할 수 있습니다.

  2. Diagnostics 탭에서 광고 및 광고 요청에 대한 피드백을 확인할 수도 있으며, 이는 특히 연동 과정에서 유용하게 활용할 수 있습니다.
  3. 전면 광고를 불러왔을 때 다음 주요 InMobi SDK 로그가 콘솔에 표시되어야 합니다.

    [InMobi] InMobi SDK initialized with account id: <your account="" here="" id=""></your>

    [InMobi] Fetching interstitial ad for placement id: <your here="" id="" placement=""></your>

    [InMobi] Publisher device id is <device here="" id=""></device>

    [InMobi] Interstitial ad successfully fetched for placement id: <your here="" id="" placement=""></your>

  4. 이제 InMobi 테스트 광고를 앱에서 확인할 수 있습니다.
  5. 광고를 생성하기 전에 SDK가 올바르게 초기화되지 않을 경우, 일반적으로 다음 로그가 표시됩니다.

    ** ERROR ** [InMobi] ___ Please initialize the SDK before creating a <ad format=""></ad> ad.

    ** ERROR ** [InMobi] ___ Account id cannot be null or empty. Please provide a valid Account id.

    [InMobi] Invalid account id passed to init. Please provide a valid account id.

모든 주요 로그는 다음 표에서 확인할 수 있습니다.

SDK 초기화

시나리오 로그 수준 로그
Publisher passed null or empty account id (퍼블리셔가 null 또는 빈 계정 ID를 전달함) 오류 Account id cannot be null or empty. Please provide a valid Account id.
Publisher passed a valid account id (퍼블리셔가 올바른 계정 ID를 전달함) 디버그 InMobi SDK initialized with account id: <account id=""></account>
Publisher passed an invalid account Id (퍼블리셔가 잘못된 계정 ID를 전달함) 오류 Invalid account id passed to init. Please provide a valid account id.
Newer version of SDK is available (SDK 버전이 업데이트됨) 디버그 A newer version (ver. 6.0.0) of the InMobi SDK is available! You are currently on an older version (ver. 5.3.1). Download the latest InMobi SDK from http://www.inmobi.com/products/sdk/#downloads

광고 공통

시나리오 로그 수준 로그
Ad requested when no network available (네트워크를 사용할 수 없을 때 광고 요청됨) 오류 Network not reachable currently. Please try again.
Ad requested when ad state is loading or available (광고 상태를 불러오는 중이거나 사용할 수 있을 때 광고 요청됨) 오류 An ad load is already in progress. Please wait for the load to complete before requesting for another ad (Placement id :<placement id=""></placement>).
Ad requested when ad is viewed by user (사용자가 광고를 시청 중일 때 광고 요청됨) 오류 An ad is currently being viewed by the user. Please wait for the user to close the ad before requesting for another ad (Placement id : <placement id=""></placement>).
Publisher device Id (퍼블리셔 디바이스 ID) 디버그 Publisher device id is <device id=""></device>

전면 광고

시나리오 로그 수준 로그
Publisher created a interstitial without initializing the SDK (퍼블리셔가 SDK를 초기화하지 않고 전면 광고를 생성함) 오류 Please initialize the SDK before creating a interstitial ad
Publisher created a interstitial with an invalid placement id (퍼블리셔가 잘못된 배치 ID로 전면 광고를 생성함) 오류 Please provide a valid placement id to create a interstitial ad
Publisher called load on an interstitial (퍼블리셔가 전면 광고에 로드를 호출함) 디버그 Fetching an interstitial ad for placement id: <placement id=""></placement>
Successfully fetched ad (광고를 가져옴) 디버그 Interstitial ad successfully fetched for placement id: <placement id=""></placement>
Failed to fetch the ad (광고를 가져오지 못함) 오류 Failed to fetch Interstitial ad for placement id:<placement id=""></placement> with error:<status code="" message=""></status>
Started loading the interstitial in a webview (전면 광고를 웹뷰로 불러오기 시작함) 디버그 Started loading Interstitial ad markup in the webview for placement id: <placement id=""></placement>
Interstitial successfully loaded in the webview (전면 광고를 웹뷰로 불러옴) 디버그 Successfully loaded Interstitial ad markup in the webview for placement id: <placement id=""></placement>
Failed to load interstitial in the webview (전면 광고를 웹뷰로 불러오지 못함) 오류 Failed to load the Interstitial markup in the webview for placement id: <placement id=""></placement>
Interstitial Ad displayed (전면 광고 표시됨) 디버그 Successfully displayed Interstitial for placement id:<placement id=""></placement>
Interstitial Ad dismissed (전면 광고 해제됨) 디버그 Interstitial ad dismissed for placement id:<placement id=""></placement>
Ad show before ready Show ad before it's ready (준비되지 않은 광고가 표시됨) 오류 Ad Load is not complete. Please wait for the Ad to be in a ready state before calling show
Full screen ad cannot be displayed without a view controller. Please pass a view controller to present the full screen ad. (뷰 컨트롤러가 없는 경우 전체 화면 광고를 표시할 수 없습니다. 전체 화면 광고를 표시하려면 뷰 컨트롤러를 전달하십시오.) 오류 Full screen ad cannot be displayed without a view controller. Please pass a view controller to present the full screen ad.

이 페이지가 도움이 되었나요?

이 페이지에서

마지막 업데이트 날짜: 17 Sep, 2020