I have been trying to setup device based subscriptions in my app using SKDemo from WWDC session (2021-10114)
When I try to change the subscription from yearly to monthly, the screen shows misleading renewal info date.
Inside StatusInfoView
struct, there is this renewalDescription function:
fileprivate func renewalDescription(_ renewalInfo: RenewalInfo, _ expirationDate: Date) -> String {
var description = ""
if let newProductID = renewalInfo.autoRenewPreference {
if let newProduct = store.subscriptions.first(where: { $0.id == newProductID }) {
description += "\nYour subscription to \(newProduct.displayName)"
description += " will begin when your current subscription expires on \(expirationDate.formattedDate())."
}
} else if renewalInfo.willAutoRenew {
description += "\nNext billing date: \(expirationDate.formattedDate())."
}
return description
}
On Mar 22, 2023 subscription purchase date, it goes into the renewalInfo.autoRenewPreference part, and there, it prints something like:
"You are currently subscribed to Monthly.\nYour subscription to Monthly will begin when your current subscription expires on Apr 23, 2023."
This is misleading, because it seems to talk about two different subscription options, but actually talks only about single one - monthly one.
If the user switched from Yearly to monthly, the message should be like:
"You are currently subscribed to Yearly.\nYour subscription to Monthly will begin when your current subscription expires on Mar 22, 2024."
However, if the change happens from smaller to higher subscription, it seems to respect the pre-existing older subscription date before starting the newer subscription.
Another problem with the example SKDemo is that the StatusInfoView
fails to update subscription checkmark sign i.e. upon scrolling up and down, it shows the Buy button enabled.
What am I missing?
Thanks in advance,