Question

Paywall swiftui monthly calculations

  • 24 November 2023
  • 5 replies
  • 46 views

Badge +2

The conversion from a weekly price to a price/month is wrong. If the weekly price is $0.99 then the monthly price is $4.29 and not $3.96.A month is 4.333 weeks and not 4.


5 replies

Userlevel 4
Badge +6

Hey George! 
 

Thanks for sending this in. I will share it with the team as something to look into! 

Userlevel 5
Badge +8

@George Brandes thanks for reporting! You’re right, this is a bit of an oversight. I made a PR to fix it here: https://github.com/RevenueCat/purchases-ios/pull/3480/

Badge +2

Andy

Thanks for the update. It’s an improvement but most people think there are 52 weeks in a year and not 52.14 or 52.28 in leap years. Since the subscription is for a full week I think it’s better to use 52 /12  to convert weeks to months. I also have a problem with the % OFF field. Right now (before the change) I have:

yearly cost $19.99 58% OFF
Monthly cost $3.99  (nothing shown for % OFF)
Weekly cost $0.99  this is the selected subscription and the % OFF field is a white oblong.

If the % OFF field is showing the saving between the selected subscription and another subscription then the savings for a yearly subscription is wrong. It is the savings between a monthly and a yearly subscription. A user would assume it’s between the selected and the yearly and wonder why no savings is shown for a monthly. 

How about making the % OFF field a variable so it can be hidden.

 


George 

Userlevel 5
Badge +8

Ohh that’s a good catch. The code looks for the most expensive relative subscription and then calculates percentages off of that, but I guess it doesn’t account for 2 different values being equivalent too nicely. 

 

We’ll work on it, but in the meantime using my branch (or next release when it includes the changes) should help with that, right? Meaning that you’ll get a different value for each of them so no white oblong? 

Badge +2

Andy

thanks. I think the oblong is white because the subscription was purchased. 
—-

George

Reply