B4i Library Google App Open Ads

This is a wrapper of Google AppOpen Ads library for B4i. I made this for @Jack Cole and he gave me permission to post this in forum to help other users.

B4A wrapper is available here.

iGADAppOpenAd

Author:
@Biswajit
Version: 1
  • iGADAppOpenAd
    Google AppOpenAd.
    • Events:
      • AppOpenAd_Event (event As String)
    • Functions:
      • Initialize (callback As Object)
        Initializes the object on Application_Start.
      • IsInitialized As BOOL
        Tests whether the object has been initialized.
      • RequestAppOpenAd (adID As String)
        Request an ad for later use.
        Like you can call this after the user dismisses the first ad.
      • SetTestDevices (ID As String)
        NOT NEEDED FOR SIMULATORS
        If you are testing the ad integrtion then call this after initializing.
        ID that is displayed in the logs
      • TryToPresentAppOpenAd (adID As String)
        Call this method on Application_Active event.
        If there is no ad loaded then it will first load the ad then present the ad.
Installation:
  1. Download the latest libraries from here.
  2. Download the attached library zip.
  3. Copy the .a and .h to the local build server Libs folder on your mac.
  4. Copy the xml file to the B4i additional library folder on windows.
  5. Download the GoogleMobileAds frameworks from: www.b4x.com/b4i/files/GoogleMobileAds-v7.69.0.zip
  6. Copy all the frameworks to the local build server Libs folder on your mac
 

Attachments

Last edited:
I updated to version B4i10 and the library no longer works. Does anyone have a solution for that?
B4X: Copy
error: 'iGADAppOpenAd.h' file not found (in target 'B4iProject' from project 'B4iProject')
    /Users/ereluziel/Documents/UploadedProjects/<user id>/B4iProject/b4i_variables.m:2:9: note: in file included from /Users/ereluziel/Documents/UploadedProjects/<user id>/B4iProject/b4i_variables.m:2:
 
The problem still exists with a different error message.
Thank you for your assistance.

B4X: Copy
error: 'iCore.h' file not found (in target 'B4iProject' from project 'B4iProject')
    /Users/ereluziel/Documents/UploadedProjects/<user id>/B4iProject/b4i_variables.m:2:9: note: in file included from /Users/ereluziel/Documents/UploadedProjects/<user id>/B4iProject/b4i_variables.m:2:
    /Users/ereluziel/Documents/UploadedProjects/<user id>/B4iProject/b4i_variables.h:9:9: note: in file included from /Users/ereluziel/Documents/UploadedProjects/<user id>/B4iProject/b4i_variables.h:9:


The library was missing from the new builders. Please try again.
 
I've fixed this error, however it looks like this library isn't compatible with latest version of Google MobileAds sdk.

I'm getting a different error: +[GADAppOpenAd loadWithAdUnitID:request:orientation:completionHandler:]: unrecognized selector sent to class 0x1009a6f00

It will probably be simpler to implement this feature without the library. I will take a look.
 
Back
Top