Using Core Data With SwiftUI

Overview

Using Core Data With SwiftUI - An Introduction

This sample code project is associated with the following guides at andrewcbancroft.com:

Overview

How does Apple intend for us to use Core Data with SwiftUI?

This project demonstrates how to stitch things together.

It's a single-view app that can

  • Persist a list of BlogIdeas to a Core Data persistent store
  • Use the new @FetchRequest property wrapper to fetch BlogIdeas
  • Use the @Environment's managedObjectContext to create, update, and delete BlogIdeas

Within the code,

❇️ Alerts you to Core Data pieces

ℹ️ Alerts you to general info about what my brain was thinking when I wrote the code

You might also like...
iOS TODO App with Core Data
iOS TODO App with Core Data

IOS TODO App with Core Data In this project I did a to do app using Core Data. I

A document-based SwiftUI application for viewing and editing EEG data, aimed at making software for viewing brain imaging data more accessible.
A document-based SwiftUI application for viewing and editing EEG data, aimed at making software for viewing brain imaging data more accessible.

Trace A document-based SwiftUI application for viewing and editing EEG data, aimed at making software for viewing brain imaging data more accessible.

WeatherApps - Simple Weather Apps Using Core Location
WeatherApps - Simple Weather Apps Using Core Location

Simple WeatherApps Using Core Location To Get The Actual Position Using API from

UDF (Unidirectional Data Flow) is a library based on Unidirectional Data Flow pattern.
UDF (Unidirectional Data Flow) is a library based on Unidirectional Data Flow pattern.

UDF (Unidirectional Data Flow) is a library based on Unidirectional Data Flow pattern. It lets you build maintainable, testable, and scalable apps.

Examples projects using SwiftUI released by WWDC2019. Include Layout, UI, Animations, Gestures, Draw and Data.
Examples projects using SwiftUI released by WWDC2019. Include Layout, UI, Animations, Gestures, Draw and Data.

SwiftUI Examples About Examples projects using SwiftUI & Combine. Include Layout, UI, Animations, Gestures, Draw and Data. See projects files in Files

WeatherSampleApp - Weather Sample app with SwiftUI consuming data from OpenWeather and using CoreLocation
WeatherSampleApp - Weather Sample app with SwiftUI consuming data from OpenWeather and using CoreLocation

WeatherSampleApp Weather application using SwiftUI Uses data provided by https:/

Get your CPU core and cluster power draw in Watts. Supports Apple Silicon and Intel.

macos-cpupower Get your CPU core and cluster power draw in Watts. What It Does and How It Works This project is designed to get the power draw of your

Weather App with widget that fetches real weather data using the Open Weather API

WeatherExtension App Demo WeatherExtension.mp4 Description Weather App that fetches real weather data using the Open Weather API Getting Started clone

NetFun-ios-app - iOS app using BFF service to display processed data.
NetFun-ios-app - iOS app using BFF service to display processed data.

NetFun-ios-app iOS app using BFF service to display processed data. The iOS demo developed in SwiftUI and it uses BFF service to show expected UI comp

Comments
  • List doesn't update if the list order doesn't change

    List doesn't update if the list order doesn't change

    Suppose I have 3 ideas like: ideaTitle 1: A ideaTitle 2: B ideaTitle 3: C

    If I update the first idea's name to "Aa", the list will still show: ideaTitle 1: A ideaTitle 2: B ideaTitle 3: C

    Now, if i update idea 2's title to "aa" so it sorts before idea 1, the list will update to: ideaTitle 2: aa ideaTitle 1: Aa ideaTitle 3: C

    opened by SchwiftyUI 7
  • Broken in Beta v5?

    Broken in Beta v5?

    Hi Mate, Thanks for this great example on how to start SwiftUI!

    But: Are you able to run this code in preview currently? Whenever I try it dies with BlogIdeaList-SwiftUI.app crashed: communication with the app was interrupted

    Running in simulator works fine!

    Kind regards, Chris

    opened by ChristopherMeyering 3
  • Bug fix: Make edits to ideas appear in idea list

    Bug fix: Make edits to ideas appear in idea list

    • Identify blogIdea as an "@ObservedObject" on views.
    • Split out list rows into BlogIdeaCellView so that blogIdea can be identified as an "@ObservedObject", and therefore invalidate the view when changed.
    • Hack in override in BlogIdea class to call objectWillChange when willChangeValue is called to notify SwiftUI of changes so that it will invalidate/redraw affected views.
    opened by ggruen 2
  • Update to Xcode beta 6 and iOS beta 7

    Update to Xcode beta 6 and iOS beta 7

    In order to work on a real device the line will need to change to what I did.

    Here's the working code on a real device

    self.presentationMode.wrappedValue.dismiss()
    
    opened by heyjaywilson 2
Owner
Andrew Bancroft
I’m a relentless learner, passionate about discovery and about sharing new insights that come my way. Pluralsight Author | iOS & Swift | ASP.Net & C# | Data
Andrew Bancroft
Basic Todo list application built using the new SwiftUI framework and Core Data

Dub Dub Do - A sample TODO List Application in SwiftUI Updated for Xcode 11.5 This is a basic app that lets you create a list of todos, mark them as i

Stephen McMillan 67 Sep 28, 2022
Simple ToDo app using SwiftUI & Core Data

SwiftUI_ToDoApp Simple ToDo app using SwiftUI & Core Data ToDo with Empty State New Task Screen New Task Screen with data ToDo List All Task list with

Sabarinathan J 15 Oct 12, 2022
A SwiftUI Application using MVVM, Core Data and Combine

SwiftUI | Breaking Bad App Application that shows the characters of Breaking Bad.

Salvador Valverde 15 Oct 6, 2022
Building Expense Tracker iOS App with Core Data & SwiftUI Completed Project

Completed Project for Building Expense Tracker iOS App with Core Data & SwiftUI Follow the tutorial at alfianlosari.com Features Create, edit, and del

Alfian Losari 226 Dec 22, 2022
In this tutorial, you’ll write your very first Core Data application with SwiftUI in Xcode

TodoApp-IOS In this tutorial, you’ll write your very first Core Data application with SwiftUI in Xcode. You’ll see how easy it is to get started with

Noye Samuel 1 Dec 13, 2021
DEVOTE In this SwiftUI tutorial, we will develop a task manager iOS application with Core Data integration.

DEVOTE In this SwiftUI tutorial, we will develop a task manager iOS application with Core Data integration. This is not a project with a boring user interface. This iOS and iPadOS application provides a personal touch and feel.

Noye Samuel 1 Dec 21, 2021
A directory demo app written with SwiftUI, Core Data, and Alamofire

Directory-SwiftUI A directory demo app written with SwiftUI, Core Data, and Alamofire Getting Started Clone (or fork) this repo: git clone git@github.

Harold Martin 13 Dec 23, 2022
Simple Dice Rolling app made with SwiftUI & Core Data

Dice Roll A simple dice roller app made with SwiftUI by an undergraduate student About The Project Built With SwiftUI Core Data Combine Getting Starte

Andrew Almasi 4 Nov 22, 2022
CloudKit -Core Data todo example

Todo CloudKit - Core Data example This the demo project for the 4-Dec-2021 meeting for a flock of swifts show casing a number of new language and SDK

Joshua Homann 4 Jul 14, 2022
ToDo Core Data App With Swift

ToDoCoreDataApp Introduction Hi, my name is Aleksandr. I'm glad to see you on my GitHub. Features The application is developed in Swift language. In t

Aleksandr Basov 1 Jan 23, 2022