Openstack RDO packstack

Host machine ovs-vsctl output: ```# ovs-vsctl show 54ef926f-9361–4fb7-a24c-e48e3316ec36 Manager “ptcp:6640:127.0.0.1” is_connected: true Bridge br-ex Controller “tcp:127.0.0.1:6633”…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How to Use Core Data in SwiftUI as a persistent storage for a macOS Ventura app

In my previous story, Programmatically open a new Window in SwiftUI on macOS Ventura (13), I wrote a simple note taking app called Scribble for demoing how to open new windows with the new WindowGroup init(for:content:) initializer.

The scribbles were stored in memory and I already mentioned that it would be wiser to implement persistent storage. Core Data is the perfect candidate for that. If you haven’t read the previous story that’s no problem we are going to write the Scribble app from scratch, except now we are calling it QuickNotes and I am going to take you each step of the way.

A screenshot of QuickNotes the macOS app we will be building in this tutorial.
Create a new macOS App project.
Give it the project name: QuickNotes.
Create a new file.
Under Core Data choose Data Model.
Name it QuickNotes. The full filename will become QuickNotes.xcdatamodeld.
Double click on Entity to rename it to QuickNote.

Add a comment

Related posts:

We have the power to improve the livelihoods of local and distant communities

I dream of a world in which no one of the estimated 10% of the global population faces extreme poverty, 3,000 children a day don’t die from malaria, and the Antarctic sheet of ice is still exactly…

Essentials For Every Business

I remember when I was younger, I dreamt of working for myself, to be my own boss. I thought it was a life filled with less work, better pay, and a more, how should I say it, chill life. It wasn´t…