I experience a problem when testing purchases on a physical iPhone. i.e. showing the user subscription status for subscriptions with promo offer.
While testing on the simulator the expiration date for entitlement with promo period was as expected - 7 days plus from the date of purchase (1 week free trial). But when I switched to testing on a physical device I got some issues with my code not working correctly. I’ve managed to refactor methods for showing offering details on my Paywall and the purchase of subscriptions with promo period.
- in “Purchases.shared.getOfferings” method changed from package.storeProduct.introductoryDiscount to package.storeProduct.discounts.first because otherwise it was not showing this 1-week free trial period.
- in purchasing: before performing purchase, I check if there is a discount available or not, and if available - make purchase with this method: Purchases.shared.purchase(package: package, promotionalOffer: promoOffer) { (transaction, customerInfo, error, userCancelled), if not available - I use the default method Purchases.shared.purchase(package: package) { (transaction, customerInfo, error, userCancelled).
the last issue I can’t solve - now in subscription status where should be subscription expiration date It shows me a date of purchase. I was looking for the solution both in the documentation and here in the community, but haven’t succeeded yet. May be some of you experienced the same problem. Thanks in advance!