GADInAppPurchase

@interface 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 }

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull productID;
  • The product quantity.

    Declaration

    Swift

    var quantity: Int { get }

    Objective-C

    @property (readonly, assign, nonatomic) NSInteger quantity;
  • 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)

    Objective-C

    - (void)reportPurchaseStatus:(GADInAppPurchaseStatus)purchaseStatus;