Skip to main content

S2S Rewarded Callbacks

This guide covers cases where media server verification is available when using S2S rewarded ads.

Check if the Ad Supports Server Verification​

You can check this using GFPRewardedAdManager's isAdServerVerificationEnabled property. The correct value is set after the ad has been loaded.

@property (nonatomic, readonly, assign) BOOL isAdServerVerificationEnabled;

Delegate Calls for Each Situation During Reward Server Callback​

When the Server Reward Request Succeeds​

If the verification from the server is successful, a response is returned via the following method of GFPRewardedAdManagerDelegate.

-(void)rewardedAdManagerDidSuccessServerRewardVerification:(GFPRewardedAdManager *)manager;

When Server Reward Verification Fails​

If the verification from the server fails and the reward cannot be granted, a response is returned via the following method of GFPRewardedAdManagerDelegate. When this method is called, the verification will continue to fail even if retried, so you should handle it as a reward failure.

-(void)rewardedAdManager:(GFPRewardedAdManager *)manager didFailedServerRewardVerification:(GFPError *)error;

When an Error Occurs During Server Reward Request​

If an unexpected error—such as a network issue or timeout—occurs during the verification request to the server, a response is returned via the following method of GFPRewardedAdManagerDelegate. In this case, you should retry the request to the verification server.

-(void)rewardedAdManager:(GFPRewardedAdManager *)manager didReceiveErrorServerRewardVerification:(GFPError *)error;

Reward Request Retry APIs​

GFPRewardedAdManager provides APIs for retrying and for manually closing the ad view when a retry situation occurs or upon failure. You can implement retry logic using these APIs according to the situation. When a retry is requested, the result—whether success or failure—is delivered through the same delegate methods described above.

requestServerVerification​

Requests a retry of server verification.

self.adManager?.requestServerVerification()

close​

Forcibly closes the S2S ad. This close option is provided exclusively for S2S ads.

self.adManager?.close()