0
|
1 //
|
|
2 // GeoQuizApp.swift
|
|
3 // GeoQuiz
|
|
4 //
|
|
5 // Created by Dennis Concepción Martín on 4/9/22.
|
|
6 //
|
|
7
|
|
8 import SwiftUI
|
11
|
9 import RevenueCat
|
0
|
10
|
|
11 @main
|
|
12 struct GeoQuizApp: App {
|
11
|
13
|
|
14 init() {
|
|
15 Purchases.configure(withAPIKey: "appl_BymTxroeoaWiXAraaFjcPlHlqbf")
|
|
16 }
|
|
17
|
0
|
18 var body: some Scene {
|
|
19 WindowGroup {
|
|
20 ContentView()
|
11
|
21 .onAppear(perform: testRevenueCat)
|
|
22 }
|
|
23 }
|
|
24
|
|
25 private func testRevenueCat() {
|
|
26 Purchases.shared.getOfferings { (offerings, error) in
|
|
27 if let packages = offerings?.current?.availablePackages {
|
|
28 // Display packages for sale
|
|
29 print(packages)
|
|
30 }
|
0
|
31 }
|
|
32 }
|
|
33 }
|