Buildbox 3 Beta Ios: Integrated Banner And Interstitial Ads (heyzap) With Custom Options

Discussion in 'Buildbox 3.0' started by particles, Oct 16, 2018.

  1. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    Hi Guys,

    Many people requested me to show, how I have integrated Banner and Interstitial Ads in my ongoing BB3 game development. I am sharing my method of showing Banner and Interstitial Ads with the custom options available in BB3.

    Post for Interstitial and Banner Ad for AdMob in iOS Device:
    https://www.buildbox.com/forum/inde...al-ads-integration-with-custom-options.14590/

    Post for Interstitial Ad for AdMob in Android Device:
    https://www.buildbox.com/forum/inde...b-interstitial-ads-with-custom-options.14365/


    You can try actual implementation Drone Escape (2049)
    in the AppStore at https://itunes.apple.com/us/app/id964179126




    Ad Banner and Interstitial

    1. Add Ad Frequency in your GameOverUI with custom options.
    2. Add HeyZap SDK in XCode by Buildbox's Official Tutorial
    3. Update Code in AdIntegrator to show Banner and Interstitial Ad.

    1. Add Ad Frequency in your GameOverUI with custom options.

    [​IMG]


    2. Add HeyZap SDK in XCode by Buildbox's Official Tutorial



    3. Update Code in AdIntegrator to show Banner and Interstitial Ad.

    1. Add banner reference and import HeyZap
    2. Enter publisher ID
    3. Show Banner
    4. Show Interstitial
    (Attached Sample AddIntegrator.mm for reference)
    [​IMG]

    A similar method is applicable to AdMob or any other ad framework through Custom options.
     

    Attached Files:

    Last edited: Apr 24, 2019
  2. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    Thanks for taking the time to do that detailed description @particles, it's really appreciated.
     
  3. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
  4. volcank

    volcank Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    794
    Likes Received:
    391
    Sweet Man!! That worked like a charm! Also with Heyzap I could make work Admob and Unity Ads. Thanks a lot for this and good luck with your game!
     
  5. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    Thanks @volcank. Yes. Can integrate with any ad framework.
     
    volcank likes this.
  6. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    There is an update in Adintegrator.mm for HeyZapAds Debug View's Show/Hide options.
    Code:
    - (void)initAds{
        NSLog(@"[Ads] initialization");
        //2. Enter Publisher Id
        [HeyzapAds startWithPublisherID: @"XXXXXXXXX"];
    
        // comment/uncomment below for HeyzapAds Debug View
        // [HeyzapAds presentMediationDebugViewController];
    }
    
    [​IMG]
     
    Last edited: Oct 16, 2018
    volcank likes this.
  7. bmsingha

    bmsingha Serious Boxer

    Joined:
    Feb 17, 2016
    Messages:
    517
    Likes Received:
    198
    @particles That's amazing sweet man, you tried with heyzap, will go for it, was facing issue while using mopub as custom
     
  8. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    @bmsingha Thanks.

    Most of the Ad Frameworks follows a similar pattern. I have already done for Admob too. So it is easier to replace in AddIntegrator.mm. If you have any problem then let me know.

    Key Line of Code is
    [UIApplicationsharedApplication].keyWindow.rootViewController.view

    That's all.

     
    bmsingha likes this.
  9. bmsingha

    bmsingha Serious Boxer

    Joined:
    Feb 17, 2016
    Messages:
    517
    Likes Received:
    198
    Perfect thanks mate, will ping you again if still we missed something :D
     
    particles likes this.
  10. bmsingha

    bmsingha Serious Boxer

    Joined:
    Feb 17, 2016
    Messages:
    517
    Likes Received:
    198
    @particles Can only see banner, but heyzap not fetching interstial adsm no ads shown on gameover screen
     
  11. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    Check Game is calling AdIntegator's showInterstitial in XCode. If it's not calling then you need to check in GameOver Screen properties. From the integration level, it always works.

    -(void)showInterstitial{
    NSLog(@"[Ads] show interstitial");
    }
     
  12. DanFarfan

    DanFarfan Avid Boxer

    Joined:
    Sep 22, 2018
    Messages:
    101
    Likes Received:
    42
    Excellent. Thanks!!
    I'm just getting started, but I know this is in my future. :)

    @DanFarfan
     
    particles likes this.
  13. bmsingha

    bmsingha Serious Boxer

    Joined:
    Feb 17, 2016
    Messages:
    517
    Likes Received:
    198
    Screen Shot 2018-10-17 at 1.49.05 PM.png

    Here it is already added
     
  14. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    I mean can you see the "[Ads] show interstitial" message in your Xcode log window, If you cant see then check your GameOver UI properties.
     
  15. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    Thanks @DanFarfan
     
  16. bmsingha

    bmsingha Serious Boxer

    Joined:
    Feb 17, 2016
    Messages:
    517
    Likes Received:
    198
    yes I can see that

    Screen Shot 2018-10-17 at 2.04.16 PM.png

    The static ads appear just for 1'st time and then it doesn't appears
     
  17. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    Okay Got it. Below that message, See you got a message HeyzapMediation 'An ad is already shown or attempting to be shown'. I think it is calling before closing the existing interstitial ad.
     
    bmsingha likes this.
  18. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
  19. bmsingha

    bmsingha Serious Boxer

    Joined:
    Feb 17, 2016
    Messages:
    517
    Likes Received:
    198
    yes using the latest SDKs itself
     
  20. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    Except for GameOver UI check and change all other UI's Ad Banner and Ad Interstitial as None. If you still can't fix it then something wrong in your implementation.
    [​IMG]
     
    Last edited: Oct 17, 2018

Share This Page