Prevent multi-platform purchase when redundant
This commit is contained in:
parent
96189b410f
commit
a41aa6d35e
|
@ -72,7 +72,7 @@ class PurchaseViewController: UITableViewController, StrongTableHost {
|
|||
}.sortedCaseInsensitive()
|
||||
platformVersionExtra = bullets.joined(separator: "\n")
|
||||
}
|
||||
if let skFullVersion = pm.product(withIdentifier: .fullVersion) {
|
||||
if !pm.hasPurchased(.fullVersion_macOS), let skFullVersion = pm.product(withIdentifier: .fullVersion) {
|
||||
self.skFullVersion = skFullVersion
|
||||
rows.append(.fullVersion)
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ class PurchaseViewController: NSViewController {
|
|||
}.sortedCaseInsensitive()
|
||||
platformVersionExtra = bullets.joined(separator: "\n")
|
||||
}
|
||||
if let skFullVersion = pm.product(withIdentifier: .fullVersion) {
|
||||
if !pm.hasPurchased(.fullVersion_iOS), let skFullVersion = pm.product(withIdentifier: .fullVersion) {
|
||||
self.skFullVersion = skFullVersion
|
||||
rows.append(.fullVersion)
|
||||
|
||||
|
|
|
@ -232,6 +232,10 @@ public class ProductManager: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
public func hasPurchased(_ product: Product) -> Bool {
|
||||
return purchasedFeatures.contains(product)
|
||||
}
|
||||
|
||||
public func isCancelledPurchase(_ product: Product) -> Bool {
|
||||
return cancelledPurchases.contains(product)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue