Closed xykong36 closed 4 months ago
SwiftData Migration 的问题 先选择暴力更新指定database store 的位置
let databasePath = URL.documentsDirectory.appending(path: "databasev2.store")
init() {
let configuration = ModelConfiguration(url: databasePath)
do {
customModelContainer = try ModelContainer(
for: MemberGroup.self, User.self, ExpenseTransaction.self, Expense.self,
configurations: configuration
)
} catch {
fatalError("Failed to initialize model container.")
}
}
https://appstoreconnect.apple.com/apps/6499389121/testflight/crashes/AKZ93xXAk5B0qBSbBkxKuu0?appPlatform=IOS&preReleaseVersionId=6ee0ee53-ecb2-41c0-8d98-652eb25398a7&sort=-timestamp
应该是SwiftData Model 更新导致的