view Simoleon/SimoleonApp.swift @ 160:0c589138a6f3

Implement Conversion Box
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Sun, 29 Aug 2021 19:04:34 +0100
parents 84137052813d
children 35573bdd7d9b
line wrap: on
line source

//
//  SimoleonApp.swift
//  Simoleon
//
//  Created by Dennis Concepción Martín on 08/07/2021.
//

import SwiftUI
import Purchases

@main
struct SimoleonApp: App {
    @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
    let persistenceController = PersistenceController.shared
    
    init() {
        let apiKey = readConfig(withKey: "PURCHASES_KEY")!
        Purchases.configure(withAPIKey: apiKey)
    }
    
    var body: some Scene {
        WindowGroup {
            ContentView()
                .environment(\.managedObjectContext, persistenceController.container.viewContext)
        }
    }
}