"Compiler" card persists even after app code changed to use DocumentGroup

I made the changes described in the WWDC2023-10154 tutorial that were intended to allow the user to create a new (blank) document. However, every new document contains the "Compiler"/"Grace Hopper" card that was added to the persistent store in the earlier, non-document-based part of the video. I've tried a full clean and clearing derived data but I can't seem to get that card to go away.

What am I missing? How can I make sure that new documents are created without any data?

Post not yet marked as solved Up vote post of Darkmoose Down vote post of Darkmoose
396 views

Replies

Same issue here. Not sure how I''m even supposed to figure out where on disk this data is going. Really wish Apple would provide more help with this stuff.

Remove .modelContainer(for: Card.self) the container for the document is set automatically by DocumentGroup.

Multiline

Remove .modelContainer(for: Card.self) the container for the document is set automatically by DocumentGroup.

BlockQuote

That code gets removed when they have you split up the Scene builder by platform. It seems like the data is just stuck on disk with no way to tell where it is or clear it out.