Latest 0.2.0
Homepage https://github.com/bearjaw/RBSRealmBrowser
License MIT
Platforms ios 9.0, requires ARC
Dependencies RealmSwift
Authors

CI Status
Version
License
Platform
CocoaPods

RBSRealmBrowser is based on NBNRealmBrowser by Nerdish by Nature. It’s a simple lightweight browser that lets you inspect which objects are currently in your realm database on your iOS device or simulator.
Simply edit your existing object’s property values by switching into edit mode.

Swift 4.0 Support

The latest version (0.2.0) supports swift 4 by default. For any swift version less than 4 use 0.1.9.
Swift-4 Status: Build Status

Features

  • quickly browse realm objects
  • edit realm objects
  • delete realm objects
  • quick actions(start the browser from the homescreen)

For editing objects these types are currently supported:

  • Bool
  • String
  • Int
  • Float
  • Double

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

This browser only works with RealmSwift because Realm (Objective-C) and RealmSwift ‘are not interoperable and using them together is not supported.’

override func viewDidLoad() {

super.viewDidLoad()
    // add a UIBarButtonItem 

let bbi = UIBarButtonItem(title: "Open", style: UIBarButtonItemStyle.Plain, target: self, action: #selector(ViewController.openBrowser))
    self.navigationItem.rightBarButtonItem = bbi
}

func openBrowser(id:AnyObject) {

    // get an instance of RBSRealmBrowser
    let rb = RBSRealmBrowser.realmBrowser()
    self.presentViewController(rb as! UIViewController, animated: true) { 

    }
}

Use one of the three methods to browse your Realm database

// get the RealmBrowser for default Realm 
realmBrowser()

// get the RealmBrowser for Realm 
realmBrowserForRealm(realm:Realm)

// get the RealmBrowser for Realm at a specific url
realmBroswerForRealmAtURL(path:String)

Quick actions

This latest version supports dynamic quick actions on iOS 9.0 and above.
To use the quick action add this code to your AppDelegate applicationDidFinishLaunching(:) method.

// add the realmbrowser quick action to your shortcut items array
   if #available(iOS 9.0, *) {
       application.shortcutItems = [RBSRealmBrowser.addBrowserQuickAction()]
   } else {
       // Fallback on earlier versions
   }

Now handle the action:

    func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {

        // handle the quick action
        guard let rb = RBSRealmBrowser.realmBrowser() else {
            print("realm browser is nil!")
            return
        }
        let vc = (window?.rootViewController)! as UIViewController
        vc.present(rb, animated: true)

    }

Try

To try the example project, clone the repo, and run pod try from the Example directory first.

Requirements

  • Xcode 8
  • iOS 9.0+
  • Swift 3.0 for any release after 0.1.4
  • Swift 4.0 for any release after 0.1.9

Installation

RBSRealmBrowser is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'RBSRealmBrowser'

Future features

What’s on the roadmap… 🚀

  • [ ] Tests
  • [ ] Be able to create objects
  • [ ] Clean up
  • [ ] Live reload the browser if updates happen in the background
  • [x] Layout improvements
  • [ ] Search

Documentation

Available method documentation here

RealmBrowser for Android

Realm browser by Jonas Rottmann for your Android projects available jonasrottmann/realm-browser

Author

Max Baumbach, [email protected]

License

RBSRealmBrowser is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "RBSRealmBrowser",
    "version": "0.2.0",
    "summary": "RBSRealmBrowser is a a Realm browser which you can use in your Swift projects.",
    "description": "RBSRealmBrowser is based on NBN's RealmBrowser. If you're using RealmSwift, this browser offers a brief insight into your Realm database.nInspect objects, their properties and their properties' values easly.",
    "homepage": "https://github.com/bearjaw/RBSRealmBrowser",
    "license": "MIT",
    "authors": {
        "Max Baumbach": "[email protected]"
    },
    "source": {
        "git": "https://github.com/bearjaw/RBSRealmBrowser.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/*.swift",
    "dependencies": {
        "RealmSwift": []
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This