piper-app/Piper/Sources/App/PiperApp.swift

41 lines
838 B
Swift

//
// PiperApp.swift
// Piper ~ App
//
// Created by Javier Cicchelli on 04/10/2024.
// Copyright © 2024 Röck+Cöde. All rights reserved.
//
import SwiftUI
import SwiftData
@main
struct PiperApp: App {
// MARK: Properties
var sharedModelContainer: ModelContainer = {
let schema = Schema([
Item.self,
])
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)
do {
return try ModelContainer(for: schema, configurations: [modelConfiguration])
} catch {
fatalError("Could not create ModelContainer: \(error)")
}
}()
// MARK: Body
var body: some Scene {
MenuBarExtra {
EmptyView()
} label: {
Image(systemName: "circle.fill")
}
}
}