Fix entitlements check

This commit is contained in:
Thomas Ricouard 2023-03-01 20:43:01 +01:00
parent c9ee764d48
commit d3486bbd7e
2 changed files with 2 additions and 2 deletions

View file

@ -228,7 +228,7 @@ struct IceCubesApp: App {
Purchases.logLevel = .error Purchases.logLevel = .error
Purchases.configure(withAPIKey: "appl_JXmiRckOzXXTsHKitQiicXCvMQi") Purchases.configure(withAPIKey: "appl_JXmiRckOzXXTsHKitQiicXCvMQi")
Purchases.shared.getCustomerInfo { info, _ in Purchases.shared.getCustomerInfo { info, _ in
if info?.entitlements.active.isEmpty == false { if info?.entitlements["Supporter"]?.isActive == false {
isSupporter = true isSupporter = true
} }
} }

View file

@ -159,7 +159,7 @@ struct SupportAppView: View {
loadingPlaceholder loadingPlaceholder
} else if let subscription { } else if let subscription {
HStack { HStack {
if customerInfo?.entitlements.active.isEmpty == false { if customerInfo?.entitlements["Supporter"]?.isActive == false {
Text(Image(systemName: "checkmark.seal.fill")) Text(Image(systemName: "checkmark.seal.fill"))
.foregroundColor(theme.tintColor) .foregroundColor(theme.tintColor)
.baselineOffset(-1) + .baselineOffset(-1) +