I’m implementing 2 promotional offers, and have been following the official documentation. I tried to add the source code in the docs to obtain the promotional offers, like this:
if let discount = package.storeProduct.discounts.first {
Purchases.shared.getPromotionalOffer(forProductDiscount: discount, product: package.storeProduct) { (promoOffer, error) in
if let promoOffer = promoOffer {
// Promotional Offer validated, show terms of your offer to your customers
} else {
// Promotional Offer was not validated, default to normal package terms
}
}
}
but I don’t know how to obtain ‘package’, which appears in the first line of the above code.