In iOS developing, we can reset an app by uninstalling&reinstalling it, but in macOS developing, I have to find my app's UserDefaults plist and delete it, and run this line to flush the realm db:
try! FileManager.default.removeItem(at:Realm.Configuration.defaultConfiguration.fileURL!)
Is there a more elegant way to do all the things above? Or just a better way to reset the realm db?