BLACK FRIDAY SALE: Save big on all my Swift books and bundles! >>

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

   

Personally, I use Core Data Lab.

1      

@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 :)

   

Hacking with Swift is sponsored by RevenueCat

SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.

Learn more

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

Reply to this topic…

You need to create an account or log in to reply.

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.