PALSessionClient

public protocol PALSessionClient

Represents client side interface for [PALSession] instance.

  • Should be called when the user clicks on the ad that was requested with the nonce generated by this manager.

    Declaration

    Swift

    func sendClick()
  • A gesture recognizer that must be attached to each view each ad is displayed in during playback.

    Attach this gesture recognizer through UIView‘s addGestureRecognizer: method. Once the ad is complete, the gesture recognizer may be removed with removeGestureRecognizer: and added to another one if the view is not the same. This recognizer does not trigger any network requests.

    Example: When ad is being displayed in a video player view:

    if let palGestureRecognizer = getPalGestureRecognizer() {
        videoPlayerView.addGestureRecognizer(palGestureRecognizer)
    }
    

    Once the ad is complete and remove the gesture recognizer:

    if let palGestureRecognizer = getPalGestureRecognizer() {
       videoPlayerView.removeGestureRecognizer(palGestureRecognizer)
       // } You can add the gesture recognizer to another view if needed
       anotherView.addGestureRecognizer(palGestureRecognizer)
    }
    

    Declaration

    Swift

    func getPalGestureRecognizer() -> UIGestureRecognizer?

    Return Value

    An optional UIGestureRecognizer instance created by Google PAL SDK.