UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Tools for developing with Core Data

Forums > SwiftUI

@geoff  

Hi all, I'm trying to build Core Data apps and I'm wondering what sort of tools or practices to use in order to support my development. As you can imagine, there's a phase of building an app where I'm iterating on the data model, building basic UI to save / load / edit / delete, and constantly checking to make sure data is saving correctly. Occasionally I want to start from scratch and delete all the sample data without having to delete the whole app in the simulator.

If I were doing a sql based web app, I'd be doing select and delete queries directly to the database as I was developing the frontend.

What is the equivalent in the SwiftUI and Core Data world? Do people write custom data browsers for their apps, with custom buttons to delete some / all rows, custom UI to query with predicates, etc.? Or do they use a tool like a SQLite browser? (For the Day 61 SwiftUI challenge, I tried using a SQLite browser but it didn't seem to be able to show me the relationships between entities. There were no foreign keys and no linking tables between the many to many entities as far as I could see.)

I suppose it would be good practice for me to write my own data browsing admin interface for each core data app that I write. So it wouldn't be a total loss. But I can't be the only person who wants to build multiple different core data apps and wants to obsessively check the data during coding so I imagine there must be some timesaving tools or best practices out there.

Thanks in advance! Geoff

2      

Personally, I use Core Data Lab.

3      

@geoff  

Hi @Hatsushira, that is one that I tried! I just realized now after looking again that you have to click on a row and it shows the relationship below. When I was working on the FriendFace project I was hastily scrolling through the list without even selecting any particular rows. Thanks for making me pay more attention to this tool :)

2      

BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.

Get it on Hacking with Swift+

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.