Skip to main content
Question

Issue with promotional period expiration date


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! 

update..

 

My 1 week free trial suddenly was cancelled 1 hour after purchase.  is it a normal behavior?  here is the log from RC dashboard:

Date

2023-06-01 5:46 AM UTC

Type

CANCELLATION

but i didn’t cancelled it for sure. 


ok… found out that this is a normal behavior in a sandbox environment 😆


Hi Maria,

Yep, Sandbox speeds subscriptions up for testing! We have more on the sandbox behavior here: https://www.revenuecat.com/blog/engineering/the-ultimate-guide-to-subscription-testing-on-ios/


Reply