Mercurial > public > lazybear
comparison LazyBear/Tests/RevenueCatTest.swift @ 423:bdfdf3a1b34e
Testing RevenueCat
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Sun, 13 Jun 2021 19:40:18 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
422:a38e8acccb85 | 423:bdfdf3a1b34e |
---|---|
1 // | |
2 // RevenueCatTest.swift | |
3 // LazyBear | |
4 // | |
5 // Created by Dennis Concepción Martín on 13/6/21. | |
6 // | |
7 | |
8 import SwiftUI | |
9 import Purchases | |
10 | |
11 struct RevenueCatTest: View { | |
12 var body: some View { | |
13 Text("Hello world") | |
14 .onAppear { showOfferings() } | |
15 } | |
16 | |
17 private func showOfferings() { | |
18 Purchases.shared.offerings { (offerings, error) in | |
19 if let offerings = offerings { | |
20 // Display current offering with offerings.current | |
21 print(offerings.current as Any) | |
22 print("dennis") | |
23 } | |
24 } | |
25 } | |
26 } | |
27 | |
28 struct RevenueCatTest_Previews: PreviewProvider { | |
29 static var previews: some View { | |
30 RevenueCatTest() | |
31 } | |
32 } |