Hello,
First of all I want to thank you for this great framework. My app has been downloaded more that 20K, now I am about to release the the new update, and also, I have read this article.
Just have a question, my new update version for both app version and build is 11.0, so I need to detect if the originalApplicationVersion of previous users (who bought the app) is less than 11 the app should unlock the premium version. So I am doing it like this, and I was wondering am I doing it right?
First setup configurations:
init() {
Purchases.logLevel = .debug
Purchases.configure(
with: Configuration.Builder(withAPIKey: "appl_mj*****")
.with(usesStoreKit2IfAvailable: true)
.build()
)
Purchases.shared.delegate = PurchasesDelegateHandler.shared
}
and then detecting it using delegate:
func purchases(_ purchases: Purchases, receivedUpdated customerInfo: CustomerInfo) {
SubscriptionManager.shared.customerInfo = customerInfo
if let version = Double(customerInfo.originalApplicationVersion!) {
if version < 11.0 {
print("premium unlocked")
}
}
}
as the article mentioned the sandbox always gives me version 1.0. So I was wondering is this the right approach to release the app on the app store?
Thanks!