Post

Replies

Boosts

Views

Activity

Comment on Regarding the Preview issue with SwiftData
After retesting multiple times, I found that the problem arises when defining an enumeration within a structure. The issue is that the raw value type must be specified; otherwise, the preview crashes with the message "Preview Crashed." The preview definition matches the code provided in the official documentation. I have attached a sample code snippet of the model for reference. Book.swift
Apr ’24