view Simoleon/SimoleonApp.swift @ 74:bfb959bee6d7

Fromatted code
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Thu, 29 Jul 2021 17:01:15 +0100
parents 75c1a05176f6
children 1f657241c28f
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 {
    let persistenceController = PersistenceController.shared
    
    init() {
        Purchases.configure(withAPIKey: "\(readConfig("PURCHASES_KEY")!)")
    }
    
    var body: some Scene {
        WindowGroup {
            if UIDevice.current.userInterfaceIdiom == .pad {
                ContentViewPad()
                    .environment(\.managedObjectContext, persistenceController.container.viewContext)
            } else {
                ContentView()
                    .environment(\.managedObjectContext, persistenceController.container.viewContext)
            }
        }
    }
}