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.
- Load banner ads
- Load native normal ads
- Load native simple ads
- Load video ads
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.
- Source
@import GFPSDK;
...
- (void)loadAdWithDict:(NSDictionary *)preloadWaterfallResponse;
- (void)loadAdWithString:(NSString *)preloadWaterfallResponse;
- (void)loadAdWithData:(NSData *)preloadWaterfallResponse;
Example
- Swift
- Objective-C
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)
NSDictionary *waterfallList = [NSDictionary new];
GFPBannerView *bannerView = [[GFPBannerView alloc] initWithAdUnitID: @"" rootViewController:VC adParam:nil];
[bannerView loadAd: waterfallList];
GFPVideoAdManager *videoManager = [[GFPVideoAdManager alloc] initWithAdUnitID: @""
videoView: UIView()
adParam: nil];
[videoManager loadAd: waterfallList];
GFPAdLoader *adLoader = [[GFPAdLoader alloc] initWithUnitID: @"" rootViewController:VC adParam:nil];
[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.
- Source
+ (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.
- Source
@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.