Search code examples
iospopupuialertviewbanner-adsrevmob

how to respond to revmob sdk uialertview delegate?


Im trying to implement revmob sdk, it works fine but their documentation dont have much detail and support not responding. (http://sdk.revmob.com/sdks/ios/docs/index.html)

is there a way to use the delegate to know the status of the alertbox ?

this is what I currently use to call:

[BCFAds showPopupWithAppID:@"appId" withDelegate:nil];

Solution

  • after starting to ask the question I found the answer, so incase someone else have this problem here is the solution.

    1. to your .h file add a delegate called BCFAdsDelegate.
    2. add #import "BCFAds.h"
    3. in the .m file where you call the sdk add [BCFAds showPopupWithAppID:@"appId" withDelegate:self];
    4. use the method you want:

    - (void)popupDidDismissActive; // Called when user is back to the app

    - (void)popupDidReceive; // Called when a popup is available

    - (void)popupDidFail; // Called when a popup is not available

    - (void)popupDidBecomeActive; // Called when popup is displayed

    - (void)popupDidDismissActive; // Called when user is back to the app

    - (void)userWillLeaveApplication; // Called when user clicked and is about to leave the application