comparison GeoQuiz/GeoQuizApp.swift @ 15:f1967f8cc67b

first iteration of core data
author Dennis C. M. <dennis@denniscm.com>
date Wed, 19 Oct 2022 10:04:17 +0200
parents ce7ea84f67f5
children 1011e56b7832
comparison
equal deleted inserted replaced
14:136928bae534 15:f1967f8cc67b
8 import SwiftUI 8 import SwiftUI
9 import RevenueCat 9 import RevenueCat
10 10
11 @main 11 @main
12 struct GeoQuizApp: App { 12 struct GeoQuizApp: App {
13 @StateObject private var dataController = DataController()
13 14
14 init() { 15 init() {
15 Purchases.configure(withAPIKey: "appl_BymTxroeoaWiXAraaFjcPlHlqbf") 16 Purchases.configure(withAPIKey: "appl_BymTxroeoaWiXAraaFjcPlHlqbf")
16 } 17 }
17 18
18 var body: some Scene { 19 var body: some Scene {
19 WindowGroup { 20 WindowGroup {
20 ContentView() 21 ContentView()
22 .environment(\.managedObjectContext, dataController.container.viewContext)
21 } 23 }
22 } 24 }
23 } 25 }