Implemented the "init(_: schema: url: )" initialiser function for the ModelConfiguration+Inits extension in the app target.
This commit is contained in:
parent
5bbd8dedbc
commit
e00c7f810f
@ -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
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user