diff 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
line wrap: on
line diff
--- a/GeoQuiz/GeoQuizApp.swift	Wed Oct 19 07:56:33 2022 +0200
+++ b/GeoQuiz/GeoQuizApp.swift	Wed Oct 19 10:04:17 2022 +0200
@@ -10,6 +10,7 @@
 
 @main
 struct GeoQuizApp: App {
+    @StateObject private var dataController = DataController()
     
     init() {
         Purchases.configure(withAPIKey: "appl_BymTxroeoaWiXAraaFjcPlHlqbf")
@@ -18,6 +19,7 @@
     var body: some Scene {
         WindowGroup {
             ContentView()
+                .environment(\.managedObjectContext, dataController.container.viewContext)
         }
     }
 }