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:
1if let discount = package.storeProduct.discounts.first {2 Purchases.shared.getPromotionalOffer(forProductDiscount: discount, product: package.storeProduct) { (promoOffer, error) in3 if let promoOffer = promoOffer {4 // Promotional Offer validated, show terms of your offer to your customers5 } else {6 // Promotional Offer was not validated, default to normal package terms7 }8 } 9}
but I don’t know how to obtain ‘package’, which appears in the first line of the above code.