RealmDebugger
is a lightweight iOS library that helps you debug your Realm database. It provides a convenient way to browse and inspect your Realm tables and records directly from your app.
debugger-video.mp4
- Automatically present a view controller to browse and inspect Realm database tables when you shake a device.
- Supports manual invocation for presenting the debugger view.
- View records in each table by tapping on the table name.
You can add RealmDebugger
to your project using Swift Package Manager.
- In Xcode, go to
File > Swift Packages > Add Package Dependency
. - Enter the repository URL:
https://github.com/meetAhmed/RealmDebugger
. - Follow the prompts to complete the installation.
By default, RealmDebugger
can be configured to present the debugger view controller when the user shakes their device.
You can also manually present the debugger view controller using one of the provided methods:
import RealmDebugger
// Present the debugger view
RealmDebugger.presentRealmDebuggerView()
// Present the debugger view with a specific root view controller
RealmDebugger.presentRealmDebuggerView(rootViewController: UINavigationController)
// Present the debugger view for a specific table
RealmDebugger.presentRealmDebuggerViewForTable(tableName: "YourTableName")
Here's an example of how you might integrate RealmDebugger
in your app:
import SwiftUI
import RealmDebugger
struct ContentView: View {
var body: some View {
VStack {
Text("Realm Debugger Example")
.padding()
Button("Present Debugger View") {
RealmDebugger.presentRealmDebuggerView()
}
.padding()
}
}
}
RealmDebugger
is open source and contributions are welcome! Please feel free to submit pull requests or open issues to suggest features or report bugs.
RealmDebugger
is released under the MIT license. See LICENSE for details.
Created by Ahmed.
For any questions or suggestions, feel free to contact the author via GitHub/Email/Linkedin.
Enjoy debugging your Realm database with RealmDebugger
! 😊