Skip to main content

Manual Waterfall

Only for S2S communication, a feature allowing to skip the waterfall list in SDK is supported. It is supported by the integrated loader (=GFPAdLoader), GFPBannerView, and GFPVideoAdManager, and is categorized.

Load Ads

Create GFPAdLoader, GFPBannerView, and GFPVideoAdManager objects to load ads. Please refer to the guides below for creating loader objects for each advertisement.

After creating an object, import the corresponding loader header. Afterward, select and call one of the methods below according to the Waterfall Data type to be delivered.

@import GFPSDK;
...
- (void)loadAdWithDict:(NSDictionary *)preloadWaterfallResponse;
- (void)loadAdWithString:(NSString *)preloadWaterfallResponse;
- (void)loadAdWithData:(NSData *)preloadWaterfallResponse;

Example

let waterfallList = Dictionary()

let bannerView = GFPBannerView(adUnitID: "", rootViewController: target, adParam: GFPAdParam())
bannerView.loadAd(waterfallList)

let videoManager = GFPVideoAdManager(adUnitID: "", videoView: UIView(), adParam: GFPAdParam())
videoManager.loadAd(waterfallList)

let adLoader = GFPAdLoader(unitID: "", rootViewController: UIViewController(), adParam: GFPAdParam())
adLoader.loadAd(waterfallList)

Get additional size information

The Helper class method is to easily obtain the size information from S2S advertisement responses. It can be used with the following method in the GFPInternalUtils.h header. As with loading, a method should be selected based on the preloaded waterfall professional data type.

+ (NSArray <GFPWaterfallAdSize *> *) adResponseSizeWithDictionary:(NSDictionary *) preloadWfDict;
+ (NSArray <GFPWaterfallAdSize *> *) adResponseSizeWithString:(NSString *) preloadWfString;
+ (NSArray <GFPWaterfallAdSize *> *) adResponseSizeWithData:(NSData *) preloadWfData;

The size can be extracted using the following properties of the returned GFPWaterfallAdSize class.

@property (nonatomic, readonly, assign) CGFloat width;
@property (nonatomic, readonly, assign) CGFloat height;
@property (nonatomic, readonly, assign) CGSize size;

Retrieve Ad Request Query

You can look up the advertising request query based on the configured adcall parameters. Please refer to the link for the relevant guide.