Implemented the "init(_: schema: url: )" initialiser function for the ModelConfiguration+Inits extension in the app target.

This commit is contained in:
Javier Cicchelli 2024-10-06 00:04:33 +02:00
parent 5bbd8dedbc
commit e00c7f810f

View File

@ -0,0 +1,30 @@
//
// ModelConfiguration+Inits.swift
// Piper ~ App
//
// Created by Javier Cicchelli on 05/10/2024.
// Copyright © 2024 Röck+Cöde. All rights reserved.
//
import Foundation
import SwiftData
extension ModelConfiguration {
// MARK: Initialisers
init(
_ name: String? = nil,
schema: Schema = .entities,
url: URL = .applicationSupportDirectory.appending(component: "piper.db")
) {
self.init(
name,
schema: schema,
url: url,
allowsSave: true,
cloudKitDatabase: .none
)
}
}