GoogleMobileAds Framework Reference

GADInAppPurchase

class GADInAppPurchase : NSObject

The in-app purchase item to be purchased with the purchase flow handled by you, the application developer. Instances of this class are created and passed to your GADInAppPurchaseDelegate object when users click a buy button. It is important to report the result of the purchase back to the SDK in order to track metrics about the transaction.

  • The in-app purchase product ID.

    Declaration

    Swift

    var productID: String { get }
  • The product quantity.

    Declaration

    Swift

    var quantity: Int { get }
  • The GADInAppPurchaseDelegate object must call this method after handling the in-app purchase for both successful and unsuccessful purchase attempts. This method reports ad conversion and purchase status information to Google.

    Declaration

    Swift

    func report(_ purchaseStatus: GADInAppPurchaseStatus)