DataScoutCompanion

main

Embeddable SwiftData Inspector
alex566/DataScoutCompanion

DataScoutCompanion

Embeddable SwiftData Inspector into your app

DataScoutCompanion is a lightweight, embeddable Swift package that provides a UI to inspect the contents of your SwiftData/CoreData/SQLite stores at runtime. It ships as a drop‑in Swift Package, integrates seamlessly into SwiftUI, and lets you visualize and debug your data model without leaving your app.

This package is planned as a companion to the macOS app for debugging SwiftData DataScout and will be used in the future to support synchronization between devices.

screenshot

📦 Installation

Add DataScoutCompanion to your project:

  1. In Xcode, choose File > Add Package Dependencies...
  2. Enter the repository URL:
https://github.com/alex566/DataScoutCompanion.git
  1. Set the version requirement.
  2. Add the DataScoutCompanion package to your app target.

🎯 Usage

Everything you need to do is present DatabaseBrowser:

import SwiftUI
import DataScoutCompanion

struct YourRootView: View {
    @State private var isBrowserPresented = false

    var body: some View {
        YourContentView()
            .toolbar {
                Button(action: { isBrowserPresented = true }) {
                    Image(systemName: "tablecells")
                }
            }
            .sheet(isPresented: $isBrowserPresented) {
                DatabaseBrowser()
            }
    }
}

Description

  • Swift Tools 6.1.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu May 15 2025 23:27:24 GMT-0900 (Hawaii-Aleutian Daylight Time)