Mercurial > public > simoleon
comparison Simoleon/Settings.swift @ 93:529feb1fc8d5
Added UI Tests for capture screenshots
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Tue, 03 Aug 2021 12:33:32 +0100 |
parents | 822175ac4343 |
children | 87f02d4f9c26 |
comparison
equal
deleted
inserted
replaced
92:8386dbf80047 | 93:529feb1fc8d5 |
---|---|
148 } | 148 } |
149 } | 149 } |
150 | 150 |
151 // Check if user subscription is active | 151 // Check if user subscription is active |
152 private func checkEntitlement() { | 152 private func checkEntitlement() { |
153 #if DEBUG | |
154 entitlementIsActive = true | |
155 #else | |
153 Purchases.shared.purchaserInfo { (purchaserInfo, error) in | 156 Purchases.shared.purchaserInfo { (purchaserInfo, error) in |
154 if purchaserInfo?.entitlements["all"]?.isActive == true { | 157 if purchaserInfo?.entitlements["all"]?.isActive == true { |
155 entitlementIsActive = true | 158 entitlementIsActive = true |
156 } | 159 } |
157 | 160 |
159 alertTitle = error.localizedDescription | 162 alertTitle = error.localizedDescription |
160 alertMessage = error.localizedFailureReason ?? "" | 163 alertMessage = error.localizedFailureReason ?? "" |
161 showingAlert = true | 164 showingAlert = true |
162 } | 165 } |
163 } | 166 } |
167 #endif | |
164 } | 168 } |
165 } | 169 } |
166 | 170 |
167 struct Settings_Previews: PreviewProvider { | 171 struct Settings_Previews: PreviewProvider { |
168 static var previews: some View { | 172 static var previews: some View { |