PFProduct

Objective-C

@interface PFProduct : NSObject

Swift

class PFProduct : NSObject

Product! This represents product from PurchaseFly

  • Product identifier

    Declaration

    Objective-C

    @property (readonly) NSString *_Nonnull productId;

    Swift

    var productId: String { get }
  • Product name

    Declaration

    Objective-C

    @property (readonly) NSString *_Nonnull name;

    Swift

    var name: String { get }
  • Product source, possible values: [App Store, Play Store]

    Declaration

    Objective-C

    @property (readonly) NSString *_Nonnull source;

    Swift

    var source: String { get }
  • Product title (localized)

    Declaration

    Objective-C

    @property (readonly) NSString *_Nonnull productTitle;

    Swift

    var productTitle: String { get }
  • Product description (localized)

    Declaration

    Objective-C

    @property (readonly) NSString *_Nonnull productDescription;

    Swift

    var productDescription: String { get }
  • Duration of the product, possible values are “P1W” (one week), “P1M” (one month), “P3M” (three months), “P6M” (six months), and “P1Y” (one year).

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull productDuration;

    Swift

    var productDuration: String { get }
  • Product price

    Declaration

    Objective-C

    @property (readonly) CGFloat price;

    Swift

    var price: CGFloat { get }
  • The locale used to format the price of the product

    Declaration

    Objective-C

    @property (readonly) NSLocale *_Nonnull locale;

    Swift

    var locale: Locale { get }
  • Type of the product. Possible values are PFProductType

    Declaration

    Objective-C

    @property (readonly) PFProductType type;

    Swift

    var type: PFProductType { get }
  • Status of the product. Possible values are PFProductStatus

    Declaration

    Objective-C

    @property (readonly) PFProductStatus status;

    Swift

    var status: PFProductStatus { get }
  • This returns all the discounts that this product has.

    Declaration

    Objective-C

    - (nonnull NSArray<PFDiscount *> *)productDiscounts;

    Swift

    func productDiscounts() -> [PFDiscount]