[
  {
    "path": ".gitignore",
    "content": "# Xcode\n.DS_Store\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\n*.xcworkspace\n!default.xcworkspace\nxcuserdata\nprofile\n*.moved-aside\nDerivedData\n.idea/\nPods/\n\n# fastlane\nfastlane/report.xml\nfastlane/test_output\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: objective-c\nosx_image: xcode8.3\ninstall: bundle install\nscript: bundle exec fastlane test\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "3.0.1 Release notes (2017-11-03)\n=============================================================\n* Fix crash when deleting rows.\n* Show the size of data properties in their cell.\n\n3.0.0 Release notes (2017-10-16)\n=============================================================\n* Update to Realm 3.0.0.\n\n2.1.12 Release notes (2017-07-27)\n=============================================================\n* Update to Realm 2.9.0 that fixes an issue connecting to multiple servers with the same user. \n\n2.1.11 Release notes (2017-07-17)\n=============================================================\n* Fix crash when import from CSV/XLSX\n* Fix crash when deleting currently displayed array from another process\n* Fix crash when open realm while Simulator startup\n\n2.1.10 Release notes (2017-06-27)\n=============================================================\n* Improved user experience when connect to the Realm Object Server\n* Hide internal realms from server browser window\n* Adds an ability to add object links to lists\n\n2.1.9 Release notes (2017-06-13)\n=============================================================\n* Fixed several issues related to opening and displaying synced realms after schema migration\n* Fixed issue with logging out the user when working with multiple realms simultaneously\n\n2.1.8 Release notes (2017-05-17)\n=============================================================\n* Fixed crash when opening realms from Object Server\n* Fixed crash when searching for special characters\n* Fixed C# model definitions export\n* Save credentials when connecting to Object Server\n* Object Server Browser window doesn’t close after opening realm\n\n2.1.7 Release notes (2017-03-29)\n=============================================================\n* Updated to Realm 2.5 to support new file format\n* Fixed the issue with selection when filter realms on Realm Object Server\n\n2.1.6 Release notes (2017-03-02)\n=============================================================\n* Fixed an issue with token expiration for Realms opened from Realm Mobile Platform\n* Stability improvements\n\n2.1.5 Release notes (2017-02-10)\n=============================================================\n* Added the ability to save C# and JavaScript (@ksibod) model definitions\n* Added an option to copy object's property value in context menu (@fergusean)\n* Fixed compatibility issue with OS X 10.9\n* Minor UI improvements\n\n2.1.4 Release notes (2017-01-31)\n=============================================================\n* Updated to Realm 2.4.1 that fixes an authentication issue when working with synced Realms.\n\n2.1.3 Release notes (2017-01-17)\n=============================================================\n* Fixed CSV export of synced realms\n* Stability and performance improvements\n\n2.1.2 Release notes (2016-12-09)\n=============================================================\n* Added the ability to filter Realms on Realm Object Server\n* Improved error description if Realm file failed to open and for other errors\n* Disabled editing values for primary key properties\n* Fixed crash when removed object is being edited while table view reloading\n* Fixed multiline text editing\n* Fixed dates editing\n* Fixed other UI issues\n\n2.1.1 Release notes (2016-11-29)\n=============================================================\n* Added in-app crash reporting\n* Added the ability to connect to Realm Object Server with admin username/password\n* Improved property type detection when import from CSV files\n* Fixed export to Compacted Realm\n* Fixed crash related to sync metadata reset\n\n2.0.1 Release notes (2016-10-06)\n=============================================================\nThis release introduces support for the Realm Mobile Platform!\nSee <https://realm.io/news/introducing-realm-mobile-platform/> for an overview\nof these great new features.\n\n* Fixed opening encryped Realms \n* Fixed export to compressed Realm\n* Fixed some UI issues\n\n2.0.0 Release notes (2016-09-27)\n=============================================================\nThis release introduces support for the Realm Mobile Platform!\nSee <https://realm.io/news/introducing-realm-mobile-platform/> for an overview\nof these great new features.\n\n* Support for Realm Mobile Platform\n* Fixed export to CSV files\n\n1.0.2 Release notes (2016-08-30)\n=============================================================\n* Updated Realm Browser app and file format icons to Realm's new look\n* Adding support for optional fields (Java exporter)\n* Improved Realm file discovery in \"Open Common Location\"\n* Added the ability for multiple CSV file importing\n\n0.103.1 Release notes (2016-05-20)\n=============================================================\n* Updated to Realm Objective-C 0.103.1\n* UI layout and performance enhancements\n\n0.102.1 Release notes (2016-05-17)\n=============================================================\n* Updated to Realm Objective-C 0.102.1\n\n0.102.0 Release notes (2016-05-12)\n=============================================================\n* Updated to Realm Objective-C 0.102.0\n\n0.100.0 Release notes (2016-05-02)\n=============================================================\n* Updated to Realm Objective-C 0.100.0\n  * *(This fixes a bug where encrypted Realm files opened in the Browser would sometimes become corrupted.)*\n* Fixed a crash in OS X Mavericks\n\n0.98.6 Release notes (2016-03-29)\n=============================================================\n* Updated to Realm 0.98.6\n\n0.98.5 Release notes (2016-03-15)\n=============================================================\n* Updated to Realm 0.98.5\n* Added the ability to generate Swift model classes from a Realm file.\n* Improvements to the Objective-C model generation, including generics and Realm's latest features.\n* Improvements to the Java model generation, handling primary, indexed and required fields.\n* Fixed a rendering issue involving properties in different objects that had the same name.\n\n0.97.0 Release notes (2016-01-14)\n=============================================================\n* Updated to Realm to Objective-C 0.97.0.\n* Improvements to the scrolling performance of the main table view in Realm documents.\n* String-based searches in Realm files made non-case sensitive.\n* Added 'Cut', 'Copy', 'Paste' and 'Select All' menu options, initially to make editing text values easier.\n* Fixed an issue where editing properties in Realm objects weren't properly saving to disk.\n* Added tooltip for boolean valued columns.\n* Improved user experience when opening Ream files.\n\n0.96.2 Release notes (2015-10-12)\n=============================================================\nEnhancements:\n* Updated Realm to Objective-C 0.96.2\n* Added a prompt to alert users about the mandatory format upgrade in Realm Objective-C 0.96.\n\nBug Fixes:\n* Fixed an issue where the width of text fields wouldn't update when resizing columns in OS X El Capitan.\n\n0.95.2 Release notes (2015-10-12)\n=============================================================\nEnhancements:\n* Updated to Realm 0.95.2\n* Add the ability to set child Realm objects in parent objects.\n* Export compressed copies of Realm files.\n* Open encrypted Realm files.\n\nBug Fixes:\n* Update project for Xcode 7\n* Fix several warnings when compiling in OS X 10.11\n* Fixed a bug where object number badges were displaying incorrectly in OS X 10.11\n* Added a Retina version of the \"Lock\" icon.\n\n0.93.0 App Store Release Notes (2015-08-4)\n=============================================================\nEnhancements:\n* OSX sandbox handling added to file read/write operations.\n* New file format icon\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\n## Filing Issues\n\nWhether you find a bug, typo or an API call that could be clarified, please [file an issue](https://github.com/realm/realm-browser-osx/issues) on our GitHub repository.\n\nWhen filing an issue, please provide as much of the following information as possible in order to help others fix it:\n\n1. **Goals**\n2. **Expected results**\n3. **Actual results**\n4. **Steps to reproduce**\n5. **Code sample that highlights the issue** (full Xcode projects that we can compile ourselves are ideal)\n6. **Version of Realm/Xcode/OSX**\n\nIf you'd like to send us sensitive sample code to help troubleshoot your issue, you can email <help@realm.io> directly.\n\n## Contributing Enhancements\n\nWe love contributions to Realm Browser! If you'd like to contribute code, documentation, or any other improvements, please [file a Pull Request](https://github.com/realm/realm-browser-osx/pulls) on our GitHub repository. Make sure to accept our [CLA](#CLA) and to follow our [style guide](https://github.com/realm/realm-cocoa/wiki/Objective-C-Style-Guide).\n\n### CLA\n\nRealm welcomes all contributions! The only requirement we have is that, like many other projects, we need to have a [Contributor License Agreement](https://en.wikipedia.org/wiki/Contributor_License_Agreement) (CLA) in place before we can accept any external code. Our own CLA is a modified version of the Apache Software Foundation’s CLA.\n\n[Please submit your CLA electronically using our Google form](https://docs.google.com/forms/d/1bVp-Wp5nmNFz9Nx-ngTmYBVWVdwTyKj4T0WtfVm0Ozs/viewform?fbzx=4154977190905366979) so we can accept your submissions. The GitHub username you file there will need to match that of your Pull Requests. If you have any questions or cannot file the CLA electronically, you can email <help@realm.io>.\n"
  },
  {
    "path": "Gemfile",
    "content": "source 'https://rubygems.org'\n\ngem 'cocoapods'\ngem 'fastlane'\n"
  },
  {
    "path": "Jenkinsfile",
    "content": "#!groovy\n\nnode('osx_vegas') {\n  dir('realm-browser') {\n    wrap([$class: 'AnsiColorBuildWrapper']) {\n      stage('SCM') {\n        checkout([\n          $class: 'GitSCM',\n          branches: scm.branches,\n          gitTool: 'native git',\n          extensions: scm.extensions + [[$class: 'CleanCheckout']],\n          userRemoteConfigs: scm.userRemoteConfigs\n        ])\n      }\n\n      sh \"bundle install\"\n\n      stage('Test') {\n        // FIXME: enable tests\n        // sh \"bundle exec fastlane test\"\n      }\n\n      stage('Build') {\n        withEnv([\n          'DEVELOPER_DIR=/Applications/Xcode-8.2.app/Contents/Developer/'\n        ]) {\n          sh \"bundle exec fastlane build\"\n        }\n      }\n\n      stage('Archive') {\n        def currentVersion = getVersion()\n        def archiveName = \"realm-browser-${currentVersion}-build-artifacts.zip\"\n\n        dir(\"build\") {\n          sh \"zip --symlinks -r ${archiveName} *\"\n          archive \"${archiveName}\"\n        }\n      }\n    }\n  }\n}\n\ndef getVersion() {\n  sh '''\n    awk  '/<key>CFBundleShortVersionString<\\\\/key>/ { getline; gsub(\"<[^>]*>\", \"\"); gsub(/\\\\t/,\"\"); print $0 }' RealmBrowser/Supporting\\\\ Files/RealmBrowser-Info.plist > currentversion\n  '''\n  def versionNumber = readFile('currentversion').readLines()[0]\n\n  sh \"git rev-parse HEAD | cut -b1-8 > sha.txt\"\n  def sha = readFile('sha.txt').readLines().last().trim()\n\n  return \"${versionNumber}-${sha}\"\n}\n"
  },
  {
    "path": "Podfile",
    "content": "source 'https://github.com/CocoaPods/Specs.git'\n\nplatform :osx, '10.9'\nuse_frameworks!\n\ntarget 'RealmBrowser' do\n    pod 'AppSandboxFileAccess'\n    pod 'Realm', '~> 3.0.2'\n    pod 'RealmConverter', '~> 0.5.0'\n    pod 'HockeySDK-Mac'\n\n    target 'RealmBrowserTests' do\n      # It looks like that inheritance via search paths is still broken with frameworks, see https://github.com/CocoaPods/CocoaPods/issues/4944\n      # inherit! :search_paths\n    end\nend\n\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    target.build_configurations.each do |config|\n      config.build_settings['SWIFT_VERSION'] = '3.0'\n    end\n  end\nend\n"
  },
  {
    "path": "README.md",
    "content": "# NOTE - This tool is now deprecated!\nOur future development efforts will go into the new cross platform Realm Studio, now available for Mac, Linux and Windows users!\nYou can download it from the [Realm website](https://realm.io/docs/realm-object-server/latest/#realm-studio).\nShould you have any feedback or issues, please create issues in the [Realm Object Server](https://github.com/realm/realm-object-server) repo.\n\n\n# Realm Browser\nRealm Browser is a small utility for Mac OS X that lets you open .realm files to view and modify their contents.\n\n![Realm Browser](screenshot.jpg)\n\n[![Build Status](https://travis-ci.org/realm/realm-browser-osx.svg?branch=master)](https://travis-ci.org/realm/realm-browser-osx)\n\n## Installing\n\n### Mac App Store (Recommended)\nDownload the app in the [Mac App Store](https://itunes.apple.com/us/app/realm-browser/id1007457278?mt=12).\n\n### Manual Build\nDownload the project, run `pod install` and build the `Realm Browser` scheme using Xcode 8.\n\n### GitHub Releases\nDownload the built app in [releases](https://github.com/realm/realm-browser-osx/releases/).\n\n### Homebrew Cask\nIf you have [homebrew](http://brew.sh) installed, simply run `brew cask install realm-browser`. You may need to run `brew cask update` if homebrew says `realm-browser` is not available.\n\n## Design Goals\nThe main design goals of Realm Browser are:\n* Allow quick and easy access to the contents of .realm files.\n* Be able to modify the contents of .realm files without needing to use code.\n* Make it easier to automatically generate Realm Object source files.\n\n## Contributing\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for more details!\n\nThis project adheres to the [Contributor Covenant Code of Conduct](https://realm.io/conduct).\nBy participating, you are expected to uphold this code. Please report\nunacceptable behavior to [info@realm.io](mailto:info@realm.io).\n\n## License\nThe source code to Realm Browser is licensed under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n"
  },
  {
    "path": "RealmBrowser/Application/RLMApplicationDelegate+CrashReporting.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMApplicationDelegate.h\"\n\n@interface RLMApplicationDelegate (CrashReporting)\n\n- (void)setupCrashReporting;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Application/RLMApplicationDelegate+CrashReporting.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import HockeySDK;\n\n#import \"RLMApplicationDelegate+CrashReporting.h\"\n\nstatic NSString * const RLMHockeyAppIdentifier = @\"ca846ff98222427fa286a4bc76bc7533\";\n\n@implementation RLMApplicationDelegate (CrashReporting)\n\n- (void)setupCrashReporting {\n    BITHockeyManager *manager = [BITHockeyManager sharedHockeyManager];\n\n    [manager configureWithIdentifier:RLMHockeyAppIdentifier];\n    [manager startManager];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Application/RLMApplicationDelegate.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n\n@interface RLMApplicationDelegate : NSObject <NSApplicationDelegate>\n\n- (IBAction)openSyncURL:(id)sender;\n- (IBAction)connectToSyncServer:(id)sender;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Application/RLMApplicationDelegate.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Realm;\n@import Realm.Private;\n@import RealmConverter;\n@import AppSandboxFileAccess;\n\n#import \"RLMApplicationDelegate.h\"\n#import \"RLMApplicationDelegate+CrashReporting.h\"\n\n#import \"RLMBrowserConstants.h\"\n#import \"RLMDocumentController.h\"\n\n#import \"RLMTestDataGenerator.h\"\n#import \"RLMUtils.h\"\n#import \"TestClasses.h\"\n\n#import \"RLMWelcomeWindowController.h\"\n#import \"RLMOpenSyncURLWindowController.h\"\n#import \"RLMConnectToServerWindowController.h\"\n#import \"RLMSyncServerBrowserWindowController.h\"\n#import \"RLMSyncUtils.h\"\n\n@interface RLMApplicationDelegate ()\n\n@property (nonatomic, weak) IBOutlet NSMenu *fileMenu;\n@property (nonatomic, weak) IBOutlet NSMenuItem *openMenuItem;\n@property (nonatomic, weak) IBOutlet NSMenuItem *openEncryptedMenuItem;\n@property (nonatomic, weak) IBOutlet NSMenu *openAnyRealmMenu;\n\n@property (nonatomic, strong) NSDateFormatter *dateFormatter;\n\n@property (nonatomic, strong) NSMetadataQuery *realmQuery;\n@property (nonatomic, strong) NSMetadataQuery *appQuery;\n@property (nonatomic, strong) NSMetadataQuery *projQuery;\n@property (nonatomic, strong) NSArray *groupedFileItems;\n\n@property (nonatomic, strong) NSMutableArray *auxiliaryWindowControllers;\n\n@end\n\n@implementation RLMApplicationDelegate\n\n- (void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent {\n    NSString* urlString = [event paramDescriptorForKeyword:keyDirectObject].stringValue;\n\n    NSURL *realmURL = [NSURL URLWithString:urlString];\n\n    [self openSyncURL:realmURL credentials:nil authServerURL:nil];\n}\n\n- (void)applicationWillFinishLaunching:(NSNotification *)notification {\n    // Will set sharedController\n    [RLMDocumentController new];\n\n    [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL];\n}\n\n- (void)applicationDidFinishLaunching:(NSNotification *)notification {\n    [self setupCrashReporting];\n\n    [[NSUserDefaults standardUserDefaults] setObject:@(kTopTipDelay) forKey:@\"NSInitialToolTipDelay\"];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n\n    [self logOutSyncUsers];\n\n    [RLMSyncManager sharedManager].errorHandler = ^(NSError *error, RLMSyncSession *session) {\n        [NSApp presentError:error];\n    };\n\n    self.realmQuery = [[NSMetadataQuery alloc] init];\n    [self.realmQuery setSortDescriptors:@[[[NSSortDescriptor alloc] initWithKey:(id)kMDItemContentModificationDate ascending:NO]]];\n    NSPredicate *realmPredicate = [NSPredicate predicateWithFormat:@\"kMDItemFSName like[c] '*.realm'\"];\n    self.realmQuery.predicate = realmPredicate;\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(realmQueryNote:) name:nil object:self.realmQuery];\n    [self.realmQuery startQuery];\n    \n    self.appQuery = [[NSMetadataQuery alloc] init];\n    NSPredicate *appPredicate = [NSPredicate predicateWithFormat:@\"kMDItemFSName like[c] '*.app'\"];\n    self.appQuery.predicate = appPredicate;\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(otherQueryNote:) name:nil object:self.appQuery];\n\n    self.projQuery = [[NSMetadataQuery alloc] init];\n    NSPredicate *projPredicate = [NSPredicate predicateWithFormat:@\"kMDItemFSName like[c] '*.xcodeproj'\"];\n    self.projQuery.predicate = projPredicate;\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(otherQueryNote:) name:nil object:self.projQuery];\n\n    self.dateFormatter = [[NSDateFormatter alloc] init];\n    self.dateFormatter.dateStyle = NSDateFormatterMediumStyle;\n    self.dateFormatter.timeStyle = NSDateFormatterShortStyle;\n\n    if ([notification.userInfo[NSApplicationLaunchIsDefaultLaunchKey] boolValue] && ![[NSProcessInfo processInfo] environment][@\"TESTING\"]) {\n        [self showWelcomeWindow:nil];\n    }\n}\n\n- (void)applicationWillTerminate:(NSNotification *)notification {\n    [self logOutSyncUsers];\n}\n\n- (BOOL)application:(NSApplication *)application openFile:(NSString *)filename {\n    [self openFileAtURL:[NSURL fileURLWithPath:filename]];\n\n    return YES;\n}\n\n- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames\n{\n    if (filenames.count > kMaxNumberOfFilesAtOnce) {\n        NSString *message = [NSString stringWithFormat:@\"Are you sure you wish to open all %lu Realm files?\", (unsigned long)filenames.count];\n        \n        NSAlert *alert = [[NSAlert alloc] init];\n        [alert setMessageText:message];\n        [alert setInformativeText:@\"Opening too many files at once may result in Realm Browser becoming unstable.\"];\n        [alert addButtonWithTitle:@\"Yes\"];\n        [alert addButtonWithTitle:@\"Cancel\"];\n        [alert setAlertStyle:NSWarningAlertStyle];\n        \n        if ([alert runModal] != NSAlertFirstButtonReturn)\n            return;\n    }\n\n    for (NSString *filename in filenames)\n        [self openFileAtURL:[NSURL fileURLWithPath:filename]];\n}\n\n- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)application\n{\n    return NO;\n}\n\n- (BOOL)applicationShouldHandleReopen:(NSApplication *)application hasVisibleWindows:(BOOL)flag\n{\n    if (!flag) {\n        [self showWelcomeWindow:nil];\n    }\n\n    return NO;\n}\n\n- (NSError *)application:(NSApplication *)application willPresentError:(NSError *)error {\n    NSError *underlyingError = error.userInfo[NSUnderlyingErrorKey];\n    if (!underlyingError || error.userInfo[NSLocalizedRecoverySuggestionErrorKey]) {\n        return error;\n    }\n\n    // Add recovery suggestion from underlying error\n    NSMutableDictionary *userInfo = [error.userInfo mutableCopy];\n    userInfo[NSLocalizedRecoverySuggestionErrorKey] = underlyingError.userInfo[NSLocalizedDescriptionKey];\n\n    return [NSError errorWithDomain:error.domain code:error.code userInfo:userInfo];\n}\n\n#pragma mark - Welcome Window\n\n- (IBAction)showWelcomeWindow:(id)sender {\n    static BOOL toutDisplayedDuringAppRun = NO;\n    static NSString *toutSuppressionKey = @\"RealmStudio_suppress_tout\";\n    RLMWelcomeWindowController *welcomeWindowController = [[RLMWelcomeWindowController alloc] init];\n\n    [welcomeWindowController.window center];\n    [welcomeWindowController showWindow:nil completionHandler:^(NSModalResponse returnCode) {\n        [self removeAuxiliaryWindowController:welcomeWindowController];\n    }];\n\n    [self addAuxiliaryWindowController:welcomeWindowController];\n    if (!toutDisplayedDuringAppRun && ![[NSUserDefaults standardUserDefaults] boolForKey:toutSuppressionKey]) {\n        toutDisplayedDuringAppRun = YES;\n        NSAlert *upgradeAlert = [[NSAlert alloc] init];\n        [upgradeAlert addButtonWithTitle:@\"Get Realm Studio...\"];\n        [upgradeAlert addButtonWithTitle:@\"Not now\"];\n        [upgradeAlert setShowsSuppressionButton:YES];\n        [upgradeAlert setMessageText:@\"Realm Browser is deprecated\"];\n        [upgradeAlert setInformativeText:@\"Realm Browser has been replaced by Realm Studio. Bug fixes and enhancements will only be available via Realm Studio going forwards.\"];\n        NSInteger result = [upgradeAlert runModal];\n        if (result == NSAlertFirstButtonReturn) {\n            // Open the web site.\n            [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@\"https://realm.io/products/realm-studio/\"]];\n        }\n        if ([upgradeAlert suppressionButton].state == NSOnState) {\n            [[NSUserDefaults standardUserDefaults] setBool:YES forKey:toutSuppressionKey];\n        }\n    }\n}\n\n#pragma mark - Event handling\n\n- (void)realmQueryNote:(NSNotification *)notification {\n    if ([[notification name] isEqualToString:NSMetadataQueryDidFinishGatheringNotification]) {\n        [self updateFileItems];\n        [self.appQuery startQuery];\n        [self.projQuery startQuery];\n    }\n    else if ([[notification name] isEqualToString:NSMetadataQueryDidUpdateNotification]) {\n        [self updateFileItems];\n        [self.appQuery startQuery];\n    }\n}\n\n- (void)otherQueryNote:(NSNotification *)notification {\n    if ([[notification name] isEqualToString:NSMetadataQueryDidFinishGatheringNotification]) {\n        [self updateFileItems];\n    }\n    else if ([[notification name] isEqualToString:NSMetadataQueryDidUpdateNotification]) {\n        [self updateFileItems];\n    }\n}\n\n-(void)menuNeedsUpdate:(NSMenu *)menu\n{\n    if (menu == self.openAnyRealmMenu) {\n        [menu removeAllItems];\n        NSArray *allItems = [self.groupedFileItems valueForKeyPath:@\"Items.@unionOfArrays.self\"];\n        [self updateMenu:menu withItems:allItems indented:YES];\n    }\n}\n\n-(void)updateMenu:(NSMenu *)menu withItems:(NSArray *)items indented:(BOOL)indented\n{\n    NSImage *image = [NSImage imageNamed:@\"RealmFileIcon\"];\n    image.size = NSMakeSize(kMenuImageSize, kMenuImageSize);\n    \n    for (id item in items) {\n        // Category heading, create disabled menu item with corresponding name\n        if ([item isKindOfClass:[NSString class]]) {\n            NSMenuItem *categoryItem = [[NSMenuItem alloc] init];\n            categoryItem.title = (NSString *)item;\n            categoryItem.enabled = NO;\n            [menu addItem:categoryItem];\n        }\n        // Array of items, create cubmenu and set them up there by calling this method recursively\n        else if ([item isKindOfClass:[NSArray class]]) {\n            NSMenuItem *submenuItem = [[NSMenuItem alloc] init];\n            submenuItem.title = @\"More\";\n            submenuItem.indentationLevel = 1;\n            [menu addItem:submenuItem];\n            \n            NSMenu *submenu = [[NSMenu alloc] initWithTitle:@\"More\"];\n            NSArray *subitems = item;\n            [self updateMenu:submenu withItems:subitems indented:NO];\n            [menu setSubmenu:submenu forItem:submenuItem];\n        }\n        // Normal file item, just create a menu item for it and wire it up\n        else if ([item isMemberOfClass:[NSMetadataItem class]]) {\n            NSMetadataItem *metadataItem = (NSMetadataItem *)item;\n            \n            // Get the path to the realm and see if there is additional info for it, such as app name\n            NSString *path = [metadataItem valueForAttribute:NSMetadataItemPathKey];\n            NSString *title = [[path lastPathComponent] stringByAppendingString:[self extraInfoForRealmWithPath:path]];\n\n            // Create a menu item using the title and link it with opening the file\n            NSMenuItem *menuItem = [[NSMenuItem alloc] init];\n            menuItem.title = title;\n            menuItem.representedObject = [NSURL fileURLWithPath:path];\n            \n            menuItem.target = self;\n            menuItem.action = @selector(openFileWithMenuItem:);\n            menuItem.image = image;\n            menuItem.indentationLevel = indented ? 1 : 0;\n            \n            // Give the menu item a tooltip with modification date and full path\n            NSDate *date = [metadataItem valueForAttribute:NSMetadataItemFSContentChangeDateKey];\n            NSString *dateString = [self.dateFormatter stringFromDate:date];\n            menuItem.toolTip = [NSString stringWithFormat:@\"%@\\n\\nModified: %@\", path, dateString];\n            \n            [menu addItem:menuItem];\n        }\n    }\n}\n\n-(NSString *)extraInfoForRealmWithPath:(NSString *)realmPath\n{\n    NSArray *searchPaths;\n    NSString *searchEndPath;\n    \n    NSString *developerPrefix = [NSHomeDirectory() stringByAppendingPathComponent:kDeveloperFolder];\n    NSString *simulatorPrefix = [NSHomeDirectory() stringByAppendingPathComponent:kSimulatorFolder];\n    \n    if ([realmPath hasPrefix:developerPrefix]) {\n        // The realm file is in the simulator, so we are looking for *.xcodeproj files\n        searchPaths = [self.projQuery results];\n        searchEndPath = developerPrefix;\n    }\n    else if ([realmPath hasPrefix:simulatorPrefix]) {\n        // The realm file is in the simulator, so we are looking for *.app files\n        searchPaths = [self.appQuery results];\n        searchEndPath = simulatorPrefix;\n    }\n    else {\n        // We have no extra info for this containing folder\n        return @\"\";\n    }\n    \n    // Search at most four levels up for a corresponding app/project file\n    for (NSUInteger i = 0; i < 4; i++) {\n        // Go up one level in the file hierachy by deleting last path component\n        realmPath = [[realmPath stringByDeletingLastPathComponent] copy];\n        if ([realmPath isEqualToString:searchEndPath]) {\n            // Reached end of iteration, the respective folder we are searching within\n            return @\"\";\n        }\n        \n        for (NSString *pathItem in searchPaths) {\n            NSMetadataItem *metadataItem = (NSMetadataItem *)pathItem;\n            NSString *foundPath = [metadataItem valueForAttribute:NSMetadataItemPathKey];\n            \n            if ([[foundPath stringByDeletingLastPathComponent] isEqualToString:realmPath]) {\n                // Found a project/app file, returning it in formatted form\n                NSString *extraInfo = [[[foundPath pathComponents] lastObject] stringByDeletingPathExtension];\n                return [NSString stringWithFormat: @\" - %@\", extraInfo];\n            }\n        }\n    }\n    \n    // Tried four levels up and still found nothing, nor reached containing folder. Giving up\n    return @\"\";\n}\n\n-(void)updateFileItems\n{\n    NSString *homeDir = RLMRealHomeDirectory();\n    \n    NSString *kPrefix = @\"Prefix\";\n    NSString *kItems = @\"Items\";\n    \n    NSString *simPrefix = [homeDir stringByAppendingPathComponent:kSimulatorFolder];\n    NSDictionary *simDict = @{kPrefix : simPrefix, kItems : [NSMutableArray arrayWithObject:@\"iPhone Simulator\"]};\n    \n    NSString *devPrefix = [homeDir stringByAppendingPathComponent:kDeveloperFolder];\n    NSDictionary *devDict = @{kPrefix : devPrefix, kItems : [NSMutableArray arrayWithObject:@\"Developer\"]};\n    \n    NSString *desktopPrefix = [homeDir stringByAppendingPathComponent:kDesktopFolder];\n    NSDictionary *desktopDict = @{kPrefix : desktopPrefix, kItems : [NSMutableArray arrayWithObject:@\"Desktop\"]};\n    \n    NSString *downloadPrefix = [homeDir stringByAppendingPathComponent:kDownloadFolder];\n    NSDictionary *downloadDict = @{kPrefix : downloadPrefix, kItems : [NSMutableArray arrayWithObject:@\"Download\"]};\n    \n    NSString *documentsPrefix = [homeDir stringByAppendingPathComponent:kDocumentsFolder];\n    NSDictionary *documentsdDict = @{kPrefix : documentsPrefix, kItems : [NSMutableArray arrayWithObject:@\"Documents\"]};\n    \n    NSString *allPrefix = @\"/\";\n    NSDictionary *otherDict = @{kPrefix : allPrefix, kItems : [NSMutableArray arrayWithObject:@\"Other\"]};\n    \n    // Create array of dictionaries, each corresponding to search folders\n    NSArray *tempGroupedFileItems = @[simDict, devDict, desktopDict, documentsdDict, downloadDict, otherDict];\n    \n    // Iterate through all search results\n    for (NSMetadataItem *fileItem in self.realmQuery.results) {\n        // Iterate through the different prefixes and add item to corresponding array within dictionary\n        for (NSDictionary *dict in tempGroupedFileItems) {\n            if ([[fileItem valueForAttribute:NSMetadataItemPathKey] hasPrefix:dict[kPrefix]]) {\n                NSMutableArray *items = dict[kItems];\n                // The first few items are just added\n                if (items.count - 1 < kMaxFilesPerCategory) {\n                    [items addObject:fileItem];\n                }\n                // When we reach the maximum number of files to show in the overview we create an array...\n                else if (items.count - 1 == kMaxFilesPerCategory) {\n                    NSMutableArray *moreFileItems = [NSMutableArray arrayWithObject:fileItem];\n                    [items addObject:moreFileItems];\n                }\n                // ... and henceforth we put fileItems here instead - the menu method will create a submenu.\n                else {\n                    NSMutableArray *moreFileItems = [items lastObject];\n                    [moreFileItems addObject:fileItem];\n                }\n                // We have already found a matching prefix, we can stop considering this item\n                break;\n            }\n        }\n    }\n    \n    // Do not include empty groups\n    self.groupedFileItems = [tempGroupedFileItems filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@\"%K.@count > 1\", kItems]];\n}\n\n- (IBAction)generatedDemoDatabase:(id)sender\n{\n    // Find the document directory using it as default location for realm file.\n    NSFileManager *fileManager = [NSFileManager defaultManager];\n    NSArray *directories = [fileManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask];\n    NSURL *url = [directories firstObject];\n    \n    // Prompt the user for location af new realm file.\n    [self showSavePanelStringFromDirectory:url completionHandler:^(BOOL userSelectedFile, NSURL *selectedFile) {\n        \n        NSURL *directoryURL = [selectedFile URLByDeletingLastPathComponent];\n        \n        AppSandboxFileAccess *fileAccess = [AppSandboxFileAccess fileAccess];\n        [fileAccess requestAccessPermissionsForFileURL:directoryURL persistPermission:YES withBlock:^(NSURL *securelyScopedURL, NSData *bookmarkData) {\n            [securelyScopedURL startAccessingSecurityScopedResource];\n            \n            // If the user has selected a file url for storing the demo database, we first check if the\n            // file already exists (and is actually a file) we delete the old file before creating the\n            // new demo file.\n            if (userSelectedFile) {\n                NSString *path = selectedFile.path;\n                BOOL isDirectory = NO;\n                \n                if ([fileManager fileExistsAtPath:path isDirectory:&isDirectory]) {\n                    if (!isDirectory) {\n                        NSError *error;\n                        [fileManager removeItemAtURL:selectedFile error:&error];\n                    }\n                }\n                \n                NSArray *classNames = @[[RealmTestClass0 className], [RealmTestClass1 className], [RealmTestClass2 className]];\n                BOOL success = [RLMTestDataGenerator createRealmAtUrl:selectedFile withClassesNamed:classNames objectCount:1000];\n                \n                if (success) {\n                    NSAlert *alert = [[NSAlert alloc] init];\n                    \n                    alert.alertStyle = NSInformationalAlertStyle;\n                    alert.showsHelp = NO;\n                    alert.informativeText = @\"A demo database has been generated. Would you like to open it?\";\n                    alert.messageText = @\"Open demo database?\";\n                    [alert addButtonWithTitle:@\"Open\"];\n                    [alert addButtonWithTitle:@\"Cancel\"];\n                    \n                    NSUInteger response = [alert runModal];\n                    if (response == NSAlertFirstButtonReturn) {\n                        [self openFileAtURL:selectedFile];\n                    }\n                }\n            }\n            \n            //As realm files perform some file-system level cleanup during their dealloc phase,\n            //make sure the sandbox access is removed in the next run loop to give it some time to finish.\n            dispatch_async(dispatch_get_main_queue(), ^{\n                [securelyScopedURL stopAccessingSecurityScopedResource];\n            });\n        }];\n    }];\n}\n\n#pragma mark - Import Methods -\n- (IBAction)importFileFromXLSX:(id)sender\n{\n    // Get the file to import\n    NSOpenPanel *openPanel = [NSOpenPanel openPanel];\n    openPanel.canChooseDirectories = NO;\n    openPanel.canChooseFiles = YES;\n    openPanel.canCreateDirectories = YES;\n    openPanel.allowsMultipleSelection = NO;\n    openPanel.message = @\"Please choose the XLSX file you wish to import.\";\n    openPanel.allowedFileTypes = @[@\"xlsx\"];\n\n    NSInteger result = [openPanel runModal];\n    if (result != NSFileHandlingPanelOKButton) {\n        return;\n    }\n    \n    NSURL *targetFileURL = openPanel.URL;\n    \n    // Get the destination folder to save the Realm file\n    NSOpenPanel *savePanel = [NSOpenPanel openPanel];\n    savePanel.canChooseDirectories = YES;\n    savePanel.canChooseFiles = NO;\n    savePanel.canCreateDirectories = YES;\n    savePanel.allowsMultipleSelection = NO;\n    savePanel.message = @\"Please choose the destination folder for the new Realm file.\";\n    \n    result = [savePanel runModal];\n    if (result != NSFileHandlingPanelOKButton) {\n        return;\n    }\n    \n    NSURL *targetDirectoryURL = savePanel.URL;\n    NSString *realmFilePath = [targetDirectoryURL.path stringByAppendingPathComponent:@\"default.realm\"];\n    \n    if ([[NSFileManager defaultManager] fileExistsAtPath:realmFilePath]) {\n        NSAlert *alert = [NSAlert alertWithMessageText:@\"A Realm file named \\\"default.realm\\\" already exists in that location. Do you wish to proceed?\"\n                                         defaultButton:@\"Cancel\"\n                                       alternateButton:@\"OK\"\n                                           otherButton:nil\n                             informativeTextWithFormat:@\"The existing file will be deleted and replaced with a new one. This operation cannot be undone.\"];\n        NSInteger result = [alert runModal];\n        if (result > 0) {\n            return;\n        }\n    \n        [[NSFileManager defaultManager] removeItemAtPath:realmFilePath error:nil];\n    }\n    \n    AppSandboxFileAccess *fileAccess = [AppSandboxFileAccess fileAccess];\n    [fileAccess requestAccessPermissionsForFileURL:targetDirectoryURL persistPermission:YES withBlock:^(NSURL *securelyScopedURL, NSData *bookmarkData) {\n        [securelyScopedURL startAccessingSecurityScopedResource];\n    \n        @autoreleasepool {\n            RLMImportSchemaGenerator *schemaGenerator = [[RLMImportSchemaGenerator alloc] initWithFile:targetFileURL.path encoding:EncodingUtf8];\n            RLMImportSchema *schema = [schemaGenerator generatedSchemaWithError:nil];\n            \n            if (schema == nil) {\n                NSAlert *alert = [NSAlert alertWithMessageText:@\"Unable to Generate Schema\" defaultButton:@\"OK\" alternateButton:nil otherButton:nil informativeTextWithFormat:@\"Please check the file is in the correct format and try again.\"];\n                [alert runModal];\n                return;\n            }\n            \n            RLMXLSXDataImporter *importer = [[RLMXLSXDataImporter alloc] initWithFile:targetFileURL.path encoding:EncodingUtf8];\n\n            NSError *error;\n            if (![importer importToPath:targetDirectoryURL.path withSchema:schema error:&error]) {\n                [NSApp presentError:error];\n            }\n        }\n        \n        [securelyScopedURL stopAccessingSecurityScopedResource];\n    }];\n}\n\n- (IBAction)importFileFromCSV:(id)sender\n{\n    NSOpenPanel *openPanel = [NSOpenPanel openPanel];\n    openPanel.canChooseDirectories = NO;\n    openPanel.canChooseFiles = YES;\n    openPanel.canCreateDirectories = YES;\n    openPanel.allowsMultipleSelection = YES;\n    openPanel.message   = @\"Please choose the CSV files you wish to import.\";\n    openPanel.allowedFileTypes = @[@\"csv\"];\n    \n    NSInteger result = [openPanel runModal];\n    if (result != NSFileHandlingPanelOKButton) {\n        return;\n    }\n    \n    NSArray *fileURLs = openPanel.URLs;\n    NSMutableArray *filePaths = [NSMutableArray array];\n    for (NSURL *url in fileURLs) {\n        [filePaths addObject:url.path];\n    }\n    \n    NSOpenPanel *savePanel = [NSOpenPanel openPanel];\n    savePanel.canChooseDirectories = YES;\n    savePanel.canChooseFiles = NO;\n    savePanel.canCreateDirectories = YES;\n    savePanel.allowsMultipleSelection = NO;\n    savePanel.message = @\"Please choose the destination folder for the new Realm file.\";\n    \n    result = [savePanel runModal];\n    if (result != NSFileHandlingPanelOKButton) {\n        return;\n    }\n    \n    NSURL *targetDirectoryURL = savePanel.URL;\n    NSString *realmFilePath = [targetDirectoryURL.path stringByAppendingPathComponent:@\"default.realm\"];\n    \n    if ([[NSFileManager defaultManager] fileExistsAtPath:realmFilePath]) {\n        NSAlert *alert = [NSAlert alertWithMessageText:@\"A Realm file named \\\"default.realm\\\" already exists in that location. Do you wish to proceed?\"\n                                         defaultButton:@\"Cancel\"\n                                       alternateButton:@\"OK\"\n                                           otherButton:nil\n                             informativeTextWithFormat:@\"The existing file will be deleted and replaced with a new one. This operation cannot be undone.\"];\n        \n        NSInteger result = [alert runModal];\n        if (result > 0) {\n            return;\n        }\n        \n        [[NSFileManager defaultManager] removeItemAtPath:realmFilePath error:nil];\n    }\n    \n    AppSandboxFileAccess *fileAccess = [AppSandboxFileAccess fileAccess];\n    [fileAccess requestAccessPermissionsForFileURL:targetDirectoryURL persistPermission:YES withBlock:^(NSURL *securelyScopedURL, NSData *bookmarkData) {\n        [securelyScopedURL startAccessingSecurityScopedResource];\n    \n        @autoreleasepool {\n            RLMImportSchemaGenerator *schemaGenerator = [[RLMImportSchemaGenerator alloc] initWithFiles:filePaths encoding:EncodingUtf8];\n            RLMImportSchema *schema = [schemaGenerator generatedSchemaWithError:nil];\n            \n            if (schema == nil) {\n                NSAlert *alert = [NSAlert alertWithMessageText:@\"Unable to Generate Schema\" defaultButton:@\"OK\" alternateButton:nil otherButton:nil informativeTextWithFormat:@\"Please check the files are in the correct format and try again.\"];\n                [alert runModal];\n                return;\n            }\n            \n            RLMCSVDataImporter *importer = [[RLMCSVDataImporter alloc] initWithFiles:filePaths encoding:EncodingUtf8];\n            [importer importToPath:targetDirectoryURL.path withSchema:schema error:nil];\n        }\n        \n        [securelyScopedURL stopAccessingSecurityScopedResource];\n    }];\n}\n\n#pragma mark - Private methods\n\n- (void)openFileWithMenuItem:(NSMenuItem *)menuItem\n{\n    [self openFileAtURL:menuItem.representedObject];\n}\n\n- (void)openFileAtURL:(NSURL *)url\n{\n    [[NSDocumentController sharedDocumentController] openDocumentWithContentsOfURL:url display:YES completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error) {\n        if (error != nil) {\n            [NSApp presentError:error];\n        }\n    }];\n}\n\n- (void)openSyncURL:(NSURL *)syncURL credentials:(RLMSyncCredentials *)credentials authServerURL:(NSURL *)authServerURL {\n    [(RLMDocumentController *)[NSDocumentController sharedDocumentController] openDocumentWithContentsOfSyncURL:syncURL credentials:credentials authServerURL:authServerURL display:YES completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error) {\n        if (error != nil) {\n            [NSApp presentError:error];\n        }\n    }];\n}\n\n- (void)showSavePanelStringFromDirectory:(NSURL *)directoryUrl completionHandler:(void(^)(BOOL userSelectesFile, NSURL *selectedFile))completion\n{\n    NSSavePanel *savePanel = [NSSavePanel savePanel];\n    \n    // Restrict the file type to whatever you like\n    savePanel.allowedFileTypes = @[kRealmFileExtension];\n    \n    // Set the starting directory\n    savePanel.directoryURL = directoryUrl;\n    \n    // And show another dialog headline than \"Save\"\n    savePanel.title = @\"Generate\";\n    savePanel.prompt = @\"Generate\";\n    \n    // Perform other setup\n    // Use a completion handler -- this is a block which takes one argument\n    // which corresponds to the button that was clicked\n    [savePanel beginWithCompletionHandler:^(NSInteger result){\n        if (result == NSFileHandlingPanelOKButton) {\n            \n            // Close panel before handling errors\n            [savePanel orderOut:self];\n            \n            // Notify caller about the file selected\n            completion(YES, savePanel.URL);\n        }\n        else {\n            completion(NO, nil);\n        }\n    }];\n}\n\n#pragma mark - Auxiliary Windows Management\n\n- (void)addAuxiliaryWindowController:(NSWindowController *)windowController {\n    if (self.auxiliaryWindowControllers == nil) {\n        self.auxiliaryWindowControllers = [NSMutableArray new];\n    }\n\n    [self.auxiliaryWindowControllers addObject:windowController];\n}\n\n- (void)removeAuxiliaryWindowController:(NSWindowController *)windowController {\n    [self.auxiliaryWindowControllers removeObject:windowController];\n}\n\n- (__kindof NSWindowController *)auxiliaryWindowControllerOfClass:(Class)windowControllerClass {\n    for (NSWindowController *windowController in self.auxiliaryWindowControllers) {\n        if ([windowController isKindOfClass:windowControllerClass]) {\n\n            return windowController;\n        }\n    }\n\n    return nil;\n}\n\n#pragma mark - Sync\n\n- (IBAction)openSyncURL:(id)sender {\n    RLMOpenSyncURLWindowController *openSyncURLWindowController = [self auxiliaryWindowControllerOfClass:[RLMOpenSyncURLWindowController class]];\n\n    if (openSyncURLWindowController != nil) {\n        [openSyncURLWindowController.window makeKeyAndOrderFront:sender];\n        return;\n    }\n\n    openSyncURLWindowController = [[RLMOpenSyncURLWindowController alloc] init];\n\n    [openSyncURLWindowController showWindow:sender completionHandler:^(NSModalResponse returnCode) {\n        if (returnCode == NSModalResponseOK) {\n            [self openSyncURL:openSyncURLWindowController.url credentials:openSyncURLWindowController.credentials authServerURL:nil];\n        }\n\n        [self removeAuxiliaryWindowController:openSyncURLWindowController];\n    }];\n\n    [self addAuxiliaryWindowController:openSyncURLWindowController];\n}\n\n- (IBAction)connectToSyncServer:(id)sender {\n    RLMConnectToServerWindowController *connectToServerWindowController = [self auxiliaryWindowControllerOfClass:[RLMConnectToServerWindowController class]];\n\n    if (connectToServerWindowController != nil) {\n        [connectToServerWindowController.window makeKeyAndOrderFront:sender];\n        return;\n    }\n\n    connectToServerWindowController = [[RLMConnectToServerWindowController alloc] init];\n\n    [connectToServerWindowController showWindow:sender completionHandler:^(NSModalResponse returnCode) {\n        if (returnCode == NSModalResponseOK) {\n            NSURL *serverURL = connectToServerWindowController.serverURL;\n            RLMSyncCredentials *credentials = connectToServerWindowController.credentials;\n\n            [self connectToServerAtURL:serverURL withAdminCredentials:credentials];\n        }\n\n        [self removeAuxiliaryWindowController:connectToServerWindowController];\n    }];\n\n    [self addAuxiliaryWindowController:connectToServerWindowController];\n}\n\n- (void)connectToServerAtURL:(NSURL *)serverURL withAdminCredentials:(RLMSyncCredentials *)credentials {\n    NSURL *authServerURL = authServerURLForSyncURL(serverURL);\n\n    [RLMSyncUser logInWithCredentials:credentials authServerURL:authServerURL onCompletion:^(RLMSyncUser *user, NSError *error) {\n        dispatch_async(dispatch_get_main_queue(), ^{\n            if (user == nil) {\n                [NSApp presentError:error];\n                [self connectToSyncServer:nil];\n            } else {\n                RLMSyncServerBrowserWindowController *browserWindowController = [[RLMSyncServerBrowserWindowController alloc] initWithServerURL:serverURL user:user];\n\n                browserWindowController.onSelectURL = ^(NSURL *url) {\n                    [self openSyncURL:url credentials:credentials authServerURL:authServerURL];\n                };\n\n                [browserWindowController showWindow:nil completionHandler:^(NSModalResponse returnCode) {\n                    [self removeAuxiliaryWindowController:browserWindowController];\n                }];\n\n                [self addAuxiliaryWindowController:browserWindowController];\n            }\n        });\n    }];\n}\n\n- (void)logOutSyncUsers {\n    // Log out all the logged in users to cleanup chached realms\n    [[RLMSyncUser allUsers] enumerateKeysAndObjectsUsingBlock:^(NSString *key, RLMSyncUser *user, BOOL *stop) {\n        [user logOut];\n    }];\n}\n\n#pragma mark - Other\n\n- (IBAction)visitRealmStudioSite:(NSMenuItem *)sender {\n    [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@\"https://realm.io/products/realm-studio/\"]];\n}\n\n@end\n\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMDocumentController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n@import Realm;\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface RLMDocumentController : NSDocumentController\n\n- (void)openDocumentWithContentsOfSyncURL:(NSURL *)url credentials:(RLMSyncCredentials *)credentials authServerURL:(NSURL * __nullable)authServerURL display:(BOOL)displayDocument completionHandler:(void (^)(NSDocument * __nullable document, BOOL documentWasAlreadyOpen, NSError * __nullable error))completionHandler;\n\n@end\n\nNS_ASSUME_NONNULL_END\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMDocumentController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Realm;\n\n#import \"RLMDocumentController.h\"\n#import \"RLMDocument.h\"\n#import \"RLMBrowserConstants.h\"\n\n@implementation RLMDocumentController\n\n- (void)openDocumentWithContentsOfSyncURL:(NSURL *)url credentials:(RLMSyncCredentials *)credentials authServerURL:(NSURL *)authServerURL display:(BOOL)displayDocument completionHandler:(void (^)(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error))completionHandler; {\n    RLMDocument *document = [self documentForURL:url];\n\n    if (document != nil) {\n        completionHandler(document, YES, nil);\n        return;\n    }\n\n    NSError *error;\n    document = [[RLMDocument alloc] initWithContentsOfSyncURL:url credentials:credentials authServerURL:authServerURL error:&error];\n\n    if (document != nil) {\n        [self addDocument:document];\n\n        if (displayDocument) {\n            [document makeWindowControllers];\n            [document showWindows];\n        }\n    }\n\n    // NSDocumentController calls completion handler asynchronously for new documents\n    dispatch_async(dispatch_get_main_queue(), ^{\n        completionHandler(document, NO, error);\n    });\n}\n\n- (NSString *)typeForContentsOfURL:(NSURL *)url error:(NSError * _Nullable __autoreleasing *)outError {\n    if ([url.scheme isEqualToString:kRealmURLScheme] || [url.scheme isEqualToString:kSecureRealmURLScheme]) {\n        return kRealmUTIIdentifier;\n    } else {\n        return [super typeForContentsOfURL:url error:outError];\n    }\n}\n\n- (void)openDocument:(id)sender {\n    @try {\n        [super openDocument:sender];\n    } @catch (NSException *exception) {\n        // NSOpenPanel in sandboxed environment doesn't handle changes in path and crashes if one of the parent directories has been renamed.\n        // This case usually happens when users try to open realm file from simulator's directory while Xcode launches an app and changes\n        // simulator root path.\n        // See https://rink.hockeyapp.net/manage/apps/405793/app_versions/27/crash_reasons/176155071.\n        NSAlert *alert = [NSAlert alertWithMessageText:@\"Failed to open realm file\" defaultButton:nil alternateButton:nil otherButton:nil informativeTextWithFormat:@\"File has been moved to a different location, please try to open it again.\"];\n        [alert runModal];\n    }\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMEncryptionKeyWindowController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMWindowController.h\"\n\n@interface RLMEncryptionKeyWindowController : RLMWindowController\n\n@property (readonly) NSData *encryptionKey;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMEncryptionKeyWindowController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMEncryptionKeyWindowController.h\"\n\n@interface RLMEncryptionKeyWindowController () <NSTextFieldDelegate>\n\n@property (nonatomic, weak) IBOutlet NSTextField *keyTextField;\n@property (nonatomic, weak) IBOutlet NSButton *okayButton;\n\n@property (nonatomic, strong) NSData *encryptionKey;\n\n@end\n\n@implementation RLMEncryptionKeyWindowController\n\n- (void)controlTextDidChange:(NSNotification *)notification {\n    NSString *stringValue = self.keyTextField.stringValue;\n\n    //Ensure only hex-compatible characters have been entered\n    NSCharacterSet *chars = [[NSCharacterSet characterSetWithCharactersInString:@\"0123456789ABCDEFabcdef\"] invertedSet];\n    BOOL isValid = (NSNotFound == [stringValue rangeOfCharacterFromSet:chars].location) && stringValue.length == 128;\n    self.okayButton.enabled = isValid;\n}\n\n- (IBAction)okayButtonClicked:(id)sender {\n    NSData *encryptionKey = [self dataFromHexadecimalString:self.keyTextField.stringValue];\n    self.encryptionKey = encryptionKey;\n\n    [self closeWithReturnCode:NSModalResponseOK];\n}\n\n// http://stackoverflow.com/a/13627835/599344\n- (NSData *)dataFromHexadecimalString:(NSString *)string\n{\n    string = [string lowercaseString];\n    NSMutableData *data= [NSMutableData new];\n    unsigned char whole_byte;\n    char byte_chars[3] = {'\\0','\\0','\\0'};\n    int i = 0;\n    NSInteger length = string.length;\n    while (i < length-1) {\n        char c = [string characterAtIndex:i++];\n        if (c < '0' || (c > '9' && c < 'a') || c > 'f')\n            continue;\n        byte_chars[0] = c;\n        byte_chars[1] = [string characterAtIndex:i++];\n        whole_byte = strtol(byte_chars, NULL, 16);\n        [data appendBytes:&whole_byte length:1];\n    }\n    return data;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMExportIndicatorWindowController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import <Cocoa/Cocoa.h>\n\n@interface RLMExportIndicatorWindowController : NSWindowController\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMExportIndicatorWindowController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMExportIndicatorWindowController.h\"\n\n@interface RLMExportIndicatorWindowController ()\n\n@property (nonatomic, weak) IBOutlet NSProgressIndicator *progressIndicator;\n\n@end\n\n@implementation RLMExportIndicatorWindowController\n\n- (instancetype)init\n{\n    if (self = [super initWithWindowNibName:@\"RLMExportIndicatorWindowController\"]) {\n        \n    }\n    \n    return self;\n}\n\n- (void)windowDidLoad\n{\n    [super windowDidLoad];\n    [self.progressIndicator startAnimation:self];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMInstanceTableViewController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\n#import \"RLMViewController.h\"\n#import \"RLMTableView.h\"\n\n@class RLMRealmBrowserWindowController;\n@class RLMArrayNode;\n\n@interface RLMInstanceTableViewController : RLMViewController <RLMTableViewDelegate, RLMTableViewDataSource>\n\n@property (nonatomic, readonly) RLMTableView *realmTableView;\n\n@property (nonatomic) BOOL realmIsLocked;\n@property (nonatomic) BOOL displaysArray;\n\n@property (nonatomic, copy) void(^didSelectedBlock)(RLMObject *rowObject);\n\n- (void)reloadData;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMInstanceTableViewController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMInstanceTableViewController.h\"\n@import Foundation;\n@import Realm.Dynamic;\n\n#import \"RLMRealmBrowserWindowController.h\"\n#import \"RLMObjectLinkSelectionViewController.h\"\n#import \"RLMArrayNavigationState.h\"\n#import \"RLMQueryNavigationState.h\"\n#import \"RLMArrayNode.h\"\n#import \"RLMResultsNode.h\"\n#import \"RLMRealmNode.h\"\n\n#import \"RLMBadgeTableCellView.h\"\n#import \"RLMBasicTableCellView.h\"\n#import \"RLMBoolTableCellView.h\"\n#import \"RLMOptionalBoolTableCellView.h\"\n#import \"RLMNumberTableCellView.h\"\n#import \"RLMImageTableCellView.h\"\n\n#import \"RLMTableColumn.h\"\n\n#import \"NSColor+ByteSizeFactory.h\"\n\n#import \"objc/objc-class.h\"\n\n#import \"RLMDescriptions.h\"\n\nNSString * const kRLMObjectType = @\"RLMObjectType\";\nstatic const NSInteger NOT_A_COLUMN = -1;\nstatic const NSInteger NOT_A_ROW = -1;\nstatic const NSInteger ARRAY_GUTTER_INDEX = -1;\n\ntypedef NS_ENUM(int32_t, RLMUpdateType) {\n    RLMUpdateTypeRealm,\n    RLMUpdateTypeTableView\n};\n\n@implementation RLMInstanceTableViewController {\n    BOOL awake;\n    BOOL linkCursorDisplaying;\n    NSDateFormatter *dateFormatter;\n    NSNumberFormatter *numberFormatter;\n    NSMutableDictionary *autofittedColumns;\n    RLMDescriptions *realmDescriptions;\n}\n\n#pragma mark - NSObject Overrides\n\n- (void)awakeFromNib\n{\n    [super awakeFromNib];\n\n    if (awake) {\n        return;\n    }\n    \n    [self.tableView setTarget:self];\n    [self.tableView setAction:@selector(userClicked:)];\n    [self.tableView setDoubleAction:@selector(userDoubleClicked:)];\n\n    dateFormatter = [[NSDateFormatter alloc] init];\n    dateFormatter.dateStyle = NSDateFormatterMediumStyle;\n    dateFormatter.timeStyle = NSDateFormatterShortStyle;\n    \n    numberFormatter = [[NSNumberFormatter alloc] init];\n    numberFormatter.numberStyle = NSNumberFormatterDecimalStyle;\n    \n    linkCursorDisplaying = NO;\n    \n    autofittedColumns = [NSMutableDictionary dictionary];\n    \n    realmDescriptions = [[RLMDescriptions alloc] init];\n    \n    [self.tableView registerForDraggedTypes:@[kRLMObjectType]];\n    [self.tableView setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES];\n\n    awake = YES;\n}\n\n- (void)reloadData {\n    [self.tableView reloadData];\n}\n\n#pragma mark - Public methods - Accessors\n\n- (RLMTableView *)realmTableView\n{\n    return (RLMTableView *)self.tableView;\n}\n\n#pragma mark - RLMViewController Overrides\n\n- (void)performUpdateUsingState:(RLMNavigationState *)newState oldState:(RLMNavigationState *)oldState\n{\n    [super performUpdateUsingState:newState oldState:oldState];\n    \n    [self.tableView setAutosaveTableColumns:NO];\n    \n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    \n    if ([newState isMemberOfClass:[RLMNavigationState class]]) {\n        self.displayedType = newState.selectedType;\n        [self.realmTableView setupColumnsWithType:newState.selectedType];\n        \n        if (newState.selectedInstanceIndex != NSNotFound) {\n            [self setSelectionIndex:newState.selectedInstanceIndex];\n        }\n    }\n    else if ([newState isMemberOfClass:[RLMArrayNavigationState class]]) {\n        RLMArrayNavigationState *arrayState = (RLMArrayNavigationState *)newState;\n        \n        RLMClassNode *referringType = (RLMClassNode *)arrayState.selectedType;\n        RLMObject *referingInstance = [referringType instanceAtIndex:arrayState.selectedInstanceIndex];\n        RLMArrayNode *arrayNode = [[RLMArrayNode alloc] initWithReferringProperty:arrayState.property\n                                                                         onObject:referingInstance\n                                                                            realm:realm];\n        self.displayedType = arrayNode;\n        [self.realmTableView setupColumnsWithType:arrayNode];\n        [self setSelectionIndex:arrayState.arrayIndex];\n    }\n    else if ([newState isMemberOfClass:[RLMQueryNavigationState class]]) {\n        RLMQueryNavigationState *queryState = (RLMQueryNavigationState *)newState;\n        \n        RLMResultsNode *resultsNode = [[RLMResultsNode alloc] initWithQuery:queryState.searchText\n                                                                     result:queryState.results\n                                                                  andParent:queryState.selectedType];\n        self.displayedType = resultsNode;\n        [self.realmTableView setupColumnsWithType:resultsNode];\n        [self setSelectionIndex:0];\n    }\n    \n    self.tableView.autosaveName = [NSString stringWithFormat:@\"%lu:%@\", realm.hash, self.displayedType.name];\n    [self.tableView setAutosaveTableColumns:YES];\n    \n    if (![autofittedColumns[self.tableView.autosaveName] isEqual:@YES]) {\n        [self.realmTableView makeColumnsFitContents];\n        autofittedColumns[self.tableView.autosaveName] = @YES;\n    }\n}\n\n#pragma mark - NSTableView Data Source\n\n- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView\n{\n    if (tableView != self.tableView) {\n        return 0;\n    }\n    \n    return self.displayedType.instanceCount;\n}\n\n- (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard\n{\n    if (self.realmIsLocked || !self.displaysArray) {\n        return NO;\n    }\n    \n    NSData *indexSetData = [NSKeyedArchiver archivedDataWithRootObject:rowIndexes];\n    [pboard declareTypes:@[kRLMObjectType] owner:self];\n    [pboard setData:indexSetData forType:kRLMObjectType];\n    \n    return YES;\n}\n\n- (NSDragOperation)tableView:(NSTableView *)aTableView validateDrop:(id<NSDraggingInfo>)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)operation\n{\n    if (operation == NSTableViewDropAbove) {\n        return NSDragOperationMove;\n    }\n    \n    return NSDragOperationNone;\n}\n\n-(void)tableView:(NSTableView *)tableView draggingSession:(NSDraggingSession *)session willBeginAtPoint:(NSPoint)screenPoint forRowIndexes:(NSIndexSet *)rowIndexes {\n}\n\n- (BOOL)tableView:(NSTableView *)aTableView acceptDrop:(id<NSDraggingInfo>)info row:(NSInteger)destination dropOperation:(NSTableViewDropOperation)operation\n{\n    if (self.realmIsLocked || !self.displaysArray) {\n        return NO;\n    }\n    \n    // Check that the dragged item is of correct type\n    NSArray *supportedTypes = @[kRLMObjectType];\n    NSPasteboard *draggingPasteboard = [info draggingPasteboard];\n    NSString *availableType = [draggingPasteboard availableTypeFromArray:supportedTypes];\n    \n    if ([availableType compare:kRLMObjectType] == NSOrderedSame) {\n        NSData *rowIndexData = [draggingPasteboard dataForType:kRLMObjectType];\n        NSIndexSet *rowIndexes = [NSKeyedUnarchiver unarchiveObjectWithData:rowIndexData];\n        \n        // Performs the move in the realm\n        [self moveRowsInRealmFrom:rowIndexes to:destination];\n        \n        return YES;\n    }\n    \n    return NO;\n}\n\n#pragma mark - RLMTableView Data Source\n\n-(NSString *)headerToolTipForColumn:(RLMClassProperty *)propertyColumn\n{\n    numberFormatter.maximumFractionDigits = 3;\n\n    if (propertyColumn.property.array) {\n        return nil;\n    }\n\n    // For certain types we want to add some statistics\n    RLMPropertyType type = propertyColumn.property.type;\n    NSString *propertyName = propertyColumn.property.name;\n    \n    if (![self.displayedType isKindOfClass:[RLMClassNode class]]) {\n        return nil;\n    }\n    \n    RLMResults *results = ((RLMClassNode *)self.displayedType).allObjects;\n    switch (type) {\n        case RLMPropertyTypeInt:\n        case RLMPropertyTypeFloat:\n        case RLMPropertyTypeDouble: {\n            numberFormatter.minimumFractionDigits = (type == RLMPropertyTypeInt) ? 0 : 3;\n            NSString *min = [numberFormatter stringFromNumber:[results minOfProperty:propertyName]];\n            NSString *avg = [numberFormatter stringFromNumber:[results averageOfProperty:propertyName]];\n            NSString *max = [numberFormatter stringFromNumber:[results maxOfProperty:propertyName]];\n            NSString *sum = [numberFormatter stringFromNumber:[results sumOfProperty:propertyName]];\n            \n            return [NSString stringWithFormat:@\"Minimum: %@\\nAverage: %@\\nMaximum: %@\\nSum: %@\", min, avg, max, sum];\n        }\n        case RLMPropertyTypeDate: {\n            NSString *min = [dateFormatter stringFromDate:[results minOfProperty:propertyName]];\n            NSString *max = [dateFormatter stringFromDate:[results maxOfProperty:propertyName]];\n            \n            return [NSString stringWithFormat:@\"Earliest: %@\\nLatest: %@\", min, max];\n        }\n        case RLMPropertyTypeBool: {\n            NSUInteger count = results.count;\n            if (count == 0) return nil;\n\n            // we have to query for both, as there might also be NULL values.\n            NSUInteger trueCount  = [results objectsWhere:@\"%K == YES\", propertyName].count;\n            NSUInteger falseCount = [results objectsWhere:@\"%K == NO\",  propertyName].count;\n            float percentTrue  = trueCount * 100.0 / count;\n            float percentFalse = falseCount * 100.0 / count;\n\n            return [NSString stringWithFormat:@\"True: %lu (%.1f%%)\\nFalse: %lu (%.1f%%)\",\n                    (unsigned long)trueCount, percentTrue, (unsigned long)falseCount, percentFalse];\n        }\n        default:\n            return nil;\n    }\n}\n\n#pragma mark - NSTableView Delegate\n\n-(CGFloat)tableView:(NSTableView *)tableView sizeToFitWidthOfColumn:(NSInteger)column\n{\n    RLMTableColumn *tableColumn = (RLMTableColumn *)self.realmTableView.tableColumns[column];\n    \n    return [tableColumn sizeThatFitsWithLimit:NO];\n}\n\n- (void)tableViewSelectionDidChange:(NSNotification *)notification\n{\n    if (self.tableView == notification.object) {\n        NSInteger selectedIndex = self.tableView.selectedRow;\n        [self.parentWindowController.currentState updateSelectionToIndex:selectedIndex];\n        \n        if (self.didSelectedBlock != nil) {\n            RLMObject *selectedInstance = [self.displayedType instanceAtIndex:selectedIndex];\n            self.didSelectedBlock(selectedInstance);\n        }\n    }\n}\n\n-(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex\n{\n    if (tableView != self.tableView) {\n        return nil;\n    }\n    \n    NSUInteger column = [tableView.tableColumns indexOfObject:tableColumn];\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n    \n    // Array gutter\n    if (propertyIndex == ARRAY_GUTTER_INDEX) {\n        RLMBasicTableCellView *gutterCellView = [tableView makeViewWithIdentifier:@\"GutterCell\" owner:self];\n\n        if (gutterCellView == nil) {\n            gutterCellView = [RLMBasicTableCellView viewWithIdentifier:@\"GutterCell\"];\n        }\n\n        gutterCellView.textField.stringValue = [@(rowIndex) stringValue];\n        gutterCellView.textField.editable = NO;\n\n        return gutterCellView;\n    }\n    \n    RLMClassProperty *classProperty = self.displayedType.propertyColumns[propertyIndex];\n    RLMProperty *property = classProperty.property;\n    RLMObject *selectedInstance = [self.displayedType instanceAtIndex:rowIndex];\n    id propertyValue = selectedInstance[classProperty.name];\n    if (propertyValue == NSNull.null) {\n        propertyValue = nil;\n    }\n    NSString *reuseIdentifier = [NSString stringWithFormat:@\"Property.%@.Optional.%d\",\n                                 [RLMDescriptions typeNameOfProperty:property],\n                                 property.optional];\n\n    if (property.array) {\n        RLMBadgeTableCellView *badgeCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];\n        if (!badgeCellView) {\n            badgeCellView = [RLMBadgeTableCellView viewWithIdentifier:reuseIdentifier];\n            badgeCellView.optional = YES;\n        }\n        NSString *string = [realmDescriptions printablePropertyValue:propertyValue ofType:property];\n        NSDictionary *attr = @{NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle)};\n        badgeCellView.textField.attributedStringValue = [[NSAttributedString alloc] initWithString:string attributes:attr];\n\n        badgeCellView.textField.editable = NO;\n\n        badgeCellView.badge.hidden = NO;\n        badgeCellView.badge.title = [NSString stringWithFormat:@\"%lu\", [(RLMArray *)propertyValue count]];\n        [badgeCellView.badge.cell setHighlightsBy:0];\n\n        badgeCellView.toolTip = [realmDescriptions tooltipForPropertyValue:propertyValue ofType:classProperty.property];\n        return badgeCellView;\n    }\n\n    NSTableCellView *cellView;\n    switch (classProperty.type) {\n        case RLMPropertyTypeBool: {\n            if (property.optional) {\n                RLMOptionalBoolTableCellView *boolCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];\n                if (!boolCellView) {\n                    boolCellView = [RLMOptionalBoolTableCellView viewWithIdentifier:reuseIdentifier];\n                    boolCellView.popupControl.target = self;\n                    boolCellView.popupControl.action = @selector(optionalBoolPopupChanged:);\n                }\n                \n                // 0 = nil, 1 = False, 2 = True\n                if (propertyValue == nil) {\n                    [boolCellView.popupControl selectItemAtIndex:0];\n                }\n                else {\n                    if ([propertyValue boolValue]) {\n                        [boolCellView.popupControl selectItemAtIndex:2];\n                    }\n                    else {\n                        [boolCellView.popupControl selectItemAtIndex:1];\n                    }\n                }\n\n                cellView = boolCellView;\n            }\n            else {\n                RLMBoolTableCellView *boolCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];\n                if (!boolCellView) {\n                    boolCellView = [RLMBoolTableCellView viewWithIdentifier:reuseIdentifier];\n                    boolCellView.checkBox.target = self;\n                    boolCellView.checkBox.action = @selector(editedCheckBox:);\n                }\n                boolCellView.checkBox.state = [(NSNumber *)propertyValue boolValue] ? NSOnState : NSOffState;\n                [boolCellView.checkBox setEnabled:!self.realmIsLocked];\n                \n                cellView = boolCellView;\n            }\n            \n            break;\n        }\n            // Intentional fallthrough\n        case RLMPropertyTypeInt:\n        case RLMPropertyTypeFloat:\n        case RLMPropertyTypeDouble: {\n            RLMNumberTableCellView *numberCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];\n            if (!numberCellView) {\n                numberCellView = [RLMNumberTableCellView viewWithIdentifier:reuseIdentifier];\n                numberCellView.textField.target = self;\n                numberCellView.textField.action = @selector(editedTextField:);\n            }\n\n            numberCellView.textField.objectValue = propertyValue;\n            numberCellView.textField.editable = !self.realmIsLocked && !classProperty.isPrimaryKey;\n\n            cellView = numberCellView;\n            \n            break;\n        }\n\n        case RLMPropertyTypeObject: {\n            RLMLinkTableCellView *linkCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];\n            if (!linkCellView) {\n                linkCellView = [RLMLinkTableCellView viewWithIdentifier:reuseIdentifier];\n                linkCellView.textField.target = self;\n                linkCellView.textField.action = @selector(editedTextField:);\n            }\n            \n            NSString *string = [realmDescriptions printablePropertyValue:propertyValue ofType:property];\n            NSDictionary *attr = @{NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle)};\n            linkCellView.textField.attributedStringValue = [[NSAttributedString alloc] initWithString:string attributes:attr];\n            \n            linkCellView.textField.editable = NO;\n\n            cellView = linkCellView;\n\n            break;\n        }\n        // Intentional fallthrough\n        case RLMPropertyTypeLinkingObjects:\n        case RLMPropertyTypeData:\n        case RLMPropertyTypeAny:\n        case RLMPropertyTypeDate:\n        case RLMPropertyTypeString: {\n            RLMBasicTableCellView *basicCellView = [tableView makeViewWithIdentifier:reuseIdentifier owner:self];\n            if (!basicCellView) {\n                basicCellView = [RLMBasicTableCellView viewWithIdentifier:reuseIdentifier];\n                basicCellView.textField.target = self;\n                basicCellView.textField.action = @selector(editedTextField:);\n            }\n\n            basicCellView.textField.stringValue = [realmDescriptions printablePropertyValue:propertyValue ofType:property];\n            basicCellView.textField.editable = !self.realmIsLocked\n                                            && property.type == RLMPropertyTypeString\n                                            && !classProperty.isPrimaryKey;\n\n            cellView = basicCellView;\n            \n            break;\n        }\n    }\n\n    if ([cellView respondsToSelector:@selector(setOptional:)]) {\n        [(id)cellView setOptional:property.optional];\n    }\n\n    cellView.toolTip = [realmDescriptions tooltipForPropertyValue:propertyValue ofType:classProperty.property];\n    return cellView;\n}\n\n#pragma mark - RLMTableView Delegate\n\n// Asking the delegate about the state\n- (BOOL)displaysArray\n{\n    return ([self.displayedType isMemberOfClass:[RLMArrayNode class]]);\n}\n\n- (BOOL)isColumnObjectType:(NSInteger)column;\n{\n    NSAssert(column != NOT_A_COLUMN, @\"This method can only be used with an actual column index\");\n    RLMProperty *prop = [self propertyForColumn:column];\n    return prop.type == RLMPropertyTypeObject && !prop.array;\n}\n\n// Asking the delegate about the contents\n- (BOOL)containsObjectInRows:(NSIndexSet *)rowIndexes column:(NSInteger)column;\n{\n    if (![self isColumnObjectType:column]) {\n        return NO;\n    }\n\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n    return [self cellsAreNonEmptyInRows:rowIndexes propertyColumn:propertyIndex];\n}\n\n- (BOOL)containsArrayInRows:(NSIndexSet *)rowIndexes column:(NSInteger)column;\n{\n    NSAssert(column != NOT_A_COLUMN, @\"This method can only be used with an actual column index\");\n\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n    \n    if (![self propertyForColumn:column].array) {\n        return NO;\n    }\n    \n    return [self cellsAreNonEmptyInRows:rowIndexes propertyColumn:propertyIndex];\n}\n\n// RLMObject operations (when showing class table)\n- (void)deleteObjects:(NSIndexSet *)rowIndexes\n{\n    [self deleteObjectsInRealmAtIndexes:rowIndexes];\n    [self.parentWindowController reloadAllWindows];\n}\n\n- (void)copyValueFromRow:(NSInteger)row column:(NSInteger)column {\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n    RLMClassProperty *classProperty = self.displayedType.propertyColumns[propertyIndex];\n    RLMObject *selectedInstance = [self.displayedType instanceAtIndex:row];\n    id propertyValue = selectedInstance[classProperty.name];\n    NSString *string = [realmDescriptions printablePropertyValue:propertyValue ofType:classProperty.property];\n\n    NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];\n    [pasteboard clearContents];\n    [pasteboard writeObjects:@[ string ]];\n}\n\n- (void)addNewObjects:(NSIndexSet *)rowIndexes\n{\n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    NSUInteger objectCount = MAX(rowIndexes.count, 1);\n\n    RLMObject *newObject;\n    \n    [realm beginWriteTransaction];\n    for (NSUInteger i = 0; i < objectCount; i++) {\n        newObject = [self.class createObjectInRealm:realm withSchema:self.displayedType.schema];\n    }\n    [realm commitWriteTransaction];\n    \n    [self.parentWindowController reloadAllWindows];\n    \n    if (newObject && [self.displayedType isKindOfClass:RLMClassNode.class]) {\n        RLMClassNode *classNode = (RLMClassNode *)self.displayedType;\n        NSUInteger row = [classNode indexOfInstance:newObject];\n        [self.realmTableView scrollToRow:row];\n    }\n}\n\n// RLMArray operations\n- (void)removeRows:(NSIndexSet *)rowIndexes\n{\n    [self removeRowsInRealmAt:rowIndexes];\n}\n\n- (void)deleteRows:(NSIndexSet *)rowIndexes\n{\n    [self deleteObjectsInRealmAtIndexes:rowIndexes];\n}\n\n- (void)addNewRows:(NSIndexSet *)rowIndexes\n{\n    [self insertNewRowsInRealmAt:rowIndexes];\n}\n\n- (void)presentListPopoverIn:(CGRect)rect nodeType:(RLMTypeNode *)node transaction:(void (^)(RLMObject *))block\n{\n    RLMObjectLinkSelectionViewController *popoverContent = [RLMObjectLinkSelectionViewController loadInstance];\n    NSPopover *popover = [[NSPopover alloc] init];\n    popover.contentViewController = popoverContent;\n    popover.behavior = NSPopoverBehaviorTransient;\n\n    popoverContent.displayedType = node;\n\n    __weak typeof(self) weakSelf = self;\n    __weak typeof(popover) weakPopover = popover;\n\n    popoverContent.didSelectedBlock = ^(RLMObject *object) {\n        RLMRealm *realm = weakSelf.parentWindowController.document.presentedRealm.realm;\n        [realm beginWriteTransaction];\n\n        block(object);\n\n        [realm commitWriteTransaction];\n        [weakPopover close];\n    };\n\n    [popover showRelativeToRect:rect ofView:self.tableView preferredEdge:NSMaxYEdge];\n}\n\n- (void)insertLinks:(NSIndexSet *)rowIndexes column:(NSInteger)columnIndex\n{\n    NSArray *topLevelClasses = self.parentWindowController.document.presentedRealm.topLevelClasses;\n    NSString *containedClassName = [(RLMArrayNode *)self.displayedType objectClassName];\n\n    RLMTypeNode *node = nil;\n    for (RLMClassNode *classNode in topLevelClasses) {\n        if ([classNode.name isEqualToString:containedClassName]) {\n            node = classNode;\n        }\n    }\n    if (node == nil) return;\n\n    NSRect cellRect = [self.tableView frameOfCellAtColumn:columnIndex row:rowIndexes.firstIndex];\n\n    __weak typeof(self) weakSelf = self;\n    [self presentListPopoverIn:cellRect nodeType:node transaction: ^(RLMObject *object) {\n        [(RLMArrayNode *)weakSelf.displayedType insertInstance:object atIndex:rowIndexes.firstIndex];\n    }];\n}\n\n// Operations on links in cells\n\n- (void)setObjectLinkAtRows:(NSIndexSet *)rowIndexes column:(NSInteger)columnIndex {\n    NSArray *topLevelClasses = self.parentWindowController.document.presentedRealm.topLevelClasses;\n    \n    RLMObject *selectedInstance = [self.displayedType instanceAtIndex:rowIndexes.firstIndex];\n    NSInteger propertyIndex = [self propertyIndexForColumn:columnIndex];\n    \n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    RLMObjectSchema *objectSchema = [realm.schema schemaForClassName:self.displayedType.name];\n    RLMProperty *property = objectSchema.properties[propertyIndex];\n\n    RLMTypeNode *node = nil;\n    for (RLMClassNode *classNode in topLevelClasses) {\n        if ([classNode.name isEqualToString:property.objectClassName]) {\n            node = classNode;\n        }\n    }\n    if (node == nil) return;\n\n    NSRect cellRect = [self.tableView frameOfCellAtColumn:columnIndex row:rowIndexes.firstIndex];\n\n    __weak typeof(self) weakSelf = self;\n    [self presentListPopoverIn:cellRect nodeType:node transaction:^(RLMObject *object) {\n        if ([weakSelf propertyForColumn: columnIndex].array) {\n            [(RLMArray*)selectedInstance[property.name] addObject:object];\n        } else {\n            selectedInstance[property.name] = object;\n        }\n    }];\n}\n\n- (void)removeObjectLinksAtRows:(NSIndexSet *)rowIndexes column:(NSInteger)columnIndex\n{\n    [self removeContentsAtRows:rowIndexes column:columnIndex];\n}\n\n- (void)removeArrayLinksAtRows:(NSIndexSet *)rowIndexes column:(NSInteger)columnIndex\n{\n    [self removeContentsAtRows:rowIndexes column:columnIndex];\n}\n\n// Opening an array in a new window\n- (void)openArrayInNewWindowAtRow:(NSInteger)row column:(NSInteger)column\n{\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n    RLMClassProperty *propertyNode = self.displayedType.propertyColumns[propertyIndex];\n    RLMArrayNavigationState *state = [[RLMArrayNavigationState alloc] initWithSelectedType:self.displayedType\n                                                                                 typeIndex:row\n                                                                                  property:propertyNode.property\n                                                                                arrayIndex:0];\n    \n    [self.parentWindowController newWindowWithNavigationState:state];\n}\n\n#pragma mark - Private Methods - RLMTableView Delegate Helpers\n\n+ (RLMObject *)createObjectInRealm:(RLMRealm *)realm withSchema:(RLMObjectSchema *)schema\n{\n    NSMutableDictionary *objectBlueprint = [self defaultValuesForSchema:schema];\n    RLMProperty *primaryKey = schema.primaryKeyProperty;\n    \n    if (primaryKey) {\n        id uniqueValue = [self uniqueValueForProperty:primaryKey className:schema.className inRealm:realm];\n        if (!uniqueValue) {\n            return nil;\n        }\n        \n        objectBlueprint[primaryKey.name] = uniqueValue;\n    }\n    \n    return [realm createObject:schema.className withValue:objectBlueprint];\n}\n\n+ (id)uniqueValueForProperty:(RLMProperty *)primaryKey className:(NSString *)className inRealm:(RLMRealm *)realm\n{\n    NSUInteger remainingAttempts = 100;\n    NSUInteger maxBitsUsed = 8;\n    \n    while (remainingAttempts > 0) {\n        id uniqueValue;\n        \n        if (primaryKey.type == RLMPropertyTypeInt) {\n            u_int32_t maxInt = MIN(1 << maxBitsUsed++, UINT32_MAX);\n            uniqueValue = @(arc4random_uniform(maxInt));\n        } else if (primaryKey.type == RLMPropertyTypeString) {\n            uniqueValue = [[NSUUID UUID] UUIDString];\n        }\n        \n        if ([[realm objects:className where:@\"%K == %@\", primaryKey.name, uniqueValue] count] == 0) {\n            return uniqueValue;\n        }\n\n        remainingAttempts--;\n    }\n    \n    return nil;\n}\n\n+ (NSMutableDictionary *)defaultValuesForSchema:(RLMObjectSchema *)schema\n{\n    NSMutableDictionary *defaultValues = [NSMutableDictionary dictionary];\n    for (RLMProperty *property in schema.properties) {\n        defaultValues[property.name] = property.array ? @[] : [self defaultValueForPropertyType:property.type];\n    }\n\n    return defaultValues;\n}\n\n+ (id)defaultValueForPropertyType:(RLMPropertyType)propertyType\n{\n    switch (propertyType) {\n        case RLMPropertyTypeInt:\n            return @0;\n        \n        case RLMPropertyTypeFloat:\n            return @0.0f;\n\n        case RLMPropertyTypeDouble:\n            return @0.0;\n            \n        case RLMPropertyTypeString:\n            return @\"\";\n            \n        case RLMPropertyTypeBool:\n            return @NO;\n            \n        case RLMPropertyTypeDate:\n            return [NSDate date];\n            \n        case RLMPropertyTypeData:\n            return [@\"<Data>\" dataUsingEncoding:NSUTF8StringEncoding];\n            \n        case RLMPropertyTypeAny:\n            return @\"<Any>\";\n            \n        case RLMPropertyTypeObject:\n            return [NSNull null];\n            \n        case RLMPropertyTypeLinkingObjects:\n            return [NSNull null];\n    }\n}\n\n- (RLMProperty *)propertyForColumn:(NSInteger)column\n{\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n\n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    RLMObjectSchema *objectSchema = [realm.schema schemaForClassName:self.displayedType.name];\n    return objectSchema.properties[propertyIndex];\n}\n\n- (BOOL)cellsAreNonEmptyInRows:(NSIndexSet *)rowIndexes propertyColumn:(NSInteger)propertyColumn\n{\n    RLMClassProperty *classProperty = self.displayedType.propertyColumns[propertyColumn];\n    \n    __block BOOL returnValue = NO;\n    \n    [rowIndexes enumerateIndexesUsingBlock:^(NSUInteger rowIndex, BOOL *stop) {\n        RLMObject *selectedInstance = [self.displayedType instanceAtIndex:rowIndex];\n        id propertyValue = selectedInstance[classProperty.name];\n        if (propertyValue) {\n            returnValue = YES;\n            *stop = YES;\n        }\n    }];\n    \n    return returnValue;\n}\n\n- (void)removeContentsAtRows:(NSIndexSet *)rowIndexes column:(NSInteger)column\n{\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n    \n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    RLMClassProperty *classProperty = self.displayedType.propertyColumns[propertyIndex];\n    \n    id newValue = classProperty.property.array ? @[] : [NSNull null];\n\n    [realm beginWriteTransaction];\n    [rowIndexes enumerateIndexesUsingBlock:^(NSUInteger rowIndex, BOOL *stop) {\n        RLMObject *selectedInstance = [self.displayedType instanceAtIndex:rowIndex];\n        selectedInstance[classProperty.name] = newValue;\n    }];\n    [realm commitWriteTransaction];\n    \n    [self.parentWindowController reloadAllWindows];\n}\n\n#pragma mark - Rearranging objects in arrays - Private methods\n\n- (void)removeRowsInRealmAt:(NSIndexSet *)rowIndexes\n{\n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    \n    [realm beginWriteTransaction];\n    [rowIndexes enumerateIndexesWithOptions:NSEnumerationReverse usingBlock:^(NSUInteger index, BOOL *stop) {\n        [(RLMArrayNode *)self.displayedType removeInstanceAtIndex:index];\n    }];\n    [realm commitWriteTransaction];\n}\n\n- (void)insertNewRowsInRealmAt:(NSIndexSet *)rowIndexes\n{\n    if (rowIndexes.count == 0) {\n        rowIndexes = [NSIndexSet indexSetWithIndex:0];\n    }\n    \n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    \n    [realm beginWriteTransaction];\n\n    RLMArrayNode *arrayNode = (RLMArrayNode *)self.displayedType;\n    if (arrayNode.isObject) {\n        [rowIndexes enumerateIndexesWithOptions:NSEnumerationReverse usingBlock:^(NSUInteger i, BOOL *stop) {\n            RLMObject *object = [self.class createObjectInRealm:realm withSchema:self.displayedType.schema];\n            [arrayNode insertInstance:object atIndex:i];\n        }];\n    }\n    else {\n        [rowIndexes enumerateIndexesWithOptions:NSEnumerationReverse usingBlock:^(NSUInteger i, BOOL *stop) {\n            [arrayNode insertInstance:[self.class defaultValueForPropertyType:arrayNode.referringProperty.type] atIndex:i];\n        }];\n    }\n    \n    [realm commitWriteTransaction];\n}\n\n- (void)moveRowsInRealmFrom:(NSIndexSet *)sourceIndexes to:(NSUInteger)destination\n{\n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    \n    NSMutableArray *sources = [self arrayWithIndexSet:sourceIndexes];\n    \n    [realm beginWriteTransaction];\n    \n    // Iterate through the array, representing source row indices\n    for (NSUInteger i = 0; i < sources.count; i++) {\n        NSUInteger source = [sources[i] unsignedIntegerValue];\n        \n        [(RLMArrayNode *)self.displayedType moveInstanceFromIndex:source toIndex:destination];\n        \n        [self updateSourceIndices:sources afterIndex:i withSource:source destination:&destination];\n    }\n    \n    [realm commitWriteTransaction];\n}\n\n\n- (void)deleteObjectsInRealmAtIndexes:(NSIndexSet *)rowIndexes\n{\n    if (!self.displayedType.isObject) {\n        [self removeRowsInRealmAt:rowIndexes];\n        return;\n    }\n\n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    \n    NSMutableArray *objectsToDelete = [NSMutableArray array];\n    [rowIndexes enumerateIndexesUsingBlock:^(NSUInteger index, BOOL *stop) {\n        [objectsToDelete addObject:[self.displayedType instanceAtIndex:index]];\n    }];\n    \n    [realm beginWriteTransaction];\n    [realm deleteObjects:objectsToDelete];\n    [realm commitWriteTransaction];\n}\n\n-(NSMutableArray *)arrayWithIndexSet:(NSIndexSet *)indexSet\n{\n    NSMutableArray *sources = [NSMutableArray array];\n    [indexSet enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) {\n        [sources addObject:@(idx)];\n    }];\n    \n    return sources;\n}\n\n-(void)updateSourceIndices:(NSMutableArray *)sources\n                afterIndex:(NSUInteger)i\n                withSource:(NSUInteger)source\n               destination:(NSUInteger *)destination\n{\n    for (NSUInteger j = i + 1; j < sources.count; j++) {\n        NSUInteger sourceIndexToModify = [sources[j] unsignedIntegerValue];\n        // Everything right of the destination is shifted right\n        if (sourceIndexToModify > *destination) {\n            sourceIndexToModify++;\n        }\n        // Everything right of the current source is shifted left\n        if (sourceIndexToModify > source) {\n            sourceIndexToModify--;\n        }\n        sources[j] = @(sourceIndexToModify);\n    }\n    \n    // If the move was from higher index to lower, shift destination right\n    if (source > *destination) {\n        (*destination)++;\n    }\n}\n\n#pragma mark - Mouse Handling\n\n- (void)mouseDidEnterCellAtLocation:(RLMTableLocation)location\n{\n    NSInteger propertyIndex = [self propertyIndexForColumn:location.column];\n    \n    if (propertyIndex >= self.displayedType.propertyColumns.count || location.row >= self.displayedType.instanceCount) {\n        [self disableLinkCursor];\n        return;\n    }\n        \n    RLMClassProperty *propertyNode = self.displayedType.propertyColumns[propertyIndex];\n        \n    RLMObject *selectedInstance = [self.displayedType instanceAtIndex:location.row];\n    id propertyValue = selectedInstance[propertyNode.name];\n\n    if (!propertyValue) {\n        [self disableLinkCursor];\n        return;\n    }\n\n    if (propertyNode.type == RLMPropertyTypeObject || propertyNode.property.array) {\n        [self enableLinkCursor];\n    }\n}\n\n- (void)mouseDidExitCellAtLocation:(RLMTableLocation)location\n{\n    [self disableLinkCursor];\n}\n\n- (void)mouseDidExitView:(RLMTableView *)view\n{\n    [self disableLinkCursor];\n}\n\n#pragma mark - Public Methods - NSTableView Event Handling\n\n- (IBAction)editedTextField:(NSTextField *)sender {\n    NSInteger row = [self.tableView rowForView:sender];\n    NSInteger column = [self.tableView columnForView:sender];\n\n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    if (row < 0 || column < 0 || realm.inWriteTransaction) {\n        // Table view was reloaded during editing\n        return;\n    }\n\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n\n    RLMTypeNode *displayedType = self.displayedType;\n    RLMClassProperty *propertyNode = displayedType.propertyColumns[propertyIndex];\n    RLMObject *selectedInstance = [displayedType instanceAtIndex:row];\n    BOOL optionalValue = propertyNode.property.optional;\n    \n    id result = nil;\n    \n    switch (propertyNode.type) {\n        case RLMPropertyTypeInt:\n            numberFormatter.allowsFloats = NO;\n            result = [numberFormatter numberFromString:sender.stringValue];\n            break;\n            \n        case RLMPropertyTypeFloat:\n        case RLMPropertyTypeDouble:\n            numberFormatter.allowsFloats = YES;\n            numberFormatter.numberStyle = NSNumberFormatterDecimalStyle;\n            result = [numberFormatter numberFromString:sender.stringValue];\n            break;\n            \n        case RLMPropertyTypeString:\n            result = sender.stringValue;\n            break;\n\n        case RLMPropertyTypeDate:\n            result = [dateFormatter dateFromString:sender.stringValue];\n            break;\n        \n        case RLMPropertyTypeLinkingObjects:\n        case RLMPropertyTypeAny:\n        case RLMPropertyTypeBool:\n        case RLMPropertyTypeData:\n        case RLMPropertyTypeObject:\n            break;\n    }\n    \n    if (result || optionalValue) {\n        NSError *error;\n\n        [realm beginWriteTransaction];\n        selectedInstance[propertyNode.name] = result;\n\n        if (![realm commitWriteTransaction:&error]) {\n            [NSApp presentError:error];\n        }\n    }\n    \n    [self.parentWindowController reloadAllWindows];\n}\n\n- (IBAction)editedCheckBox:(NSButton *)sender\n{\n    NSInteger row = [self.tableView rowForView:sender];\n    NSInteger column = [self.tableView columnForView:sender];\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n\n    RLMTypeNode *displayedType = self.displayedType;\n    RLMClassProperty *propertyNode = displayedType.propertyColumns[propertyIndex];\n    RLMObject *selectedInstance = [displayedType instanceAtIndex:row];\n\n    NSNumber *result = @((BOOL)(sender.state == NSOnState));\n\n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    [realm beginWriteTransaction];\n    selectedInstance[propertyNode.name] = result;\n    [realm commitWriteTransaction];\n    \n    [self.parentWindowController reloadAllWindows];\n}\n\n- (void)optionalBoolPopupChanged:(NSPopUpButton *)sender\n{\n    NSInteger row = [self.tableView rowForView:sender];\n    NSInteger column = [self.tableView columnForView:sender];\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n    \n    RLMTypeNode *displayedType = self.displayedType;\n    RLMClassProperty *propertyNode = displayedType.propertyColumns[propertyIndex];\n    RLMObject *selectedInstance = [displayedType instanceAtIndex:row];\n    \n    NSNumber *result = nil;\n    if (sender.indexOfSelectedItem > 0) {\n        result = @((BOOL)(sender.indexOfSelectedItem == 2));\n    }\n    \n    RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n    [realm beginWriteTransaction];\n    selectedInstance[propertyNode.name] = result;\n    [realm commitWriteTransaction];\n    \n    [self.parentWindowController reloadAllWindows];\n}\n\n- (void)rightClickedLocation:(RLMTableLocation)location\n{\n    NSUInteger row = location.row;\n\n    if (row >= self.displayedType.instanceCount || RLMTableLocationRowIsUndefined(location)) {\n        [self clearSelection];\n        return;\n    }\n    \n    if ([self.tableView.selectedRowIndexes containsIndex:row]) {\n        return;\n    }\n    \n    [self setSelectionIndex:row];\n}\n\n- (void)userClicked:(NSTableView *)sender\n{\n    if (self.tableView.selectedRowIndexes.count > 1) {\n        return;\n    }\n    \n    NSInteger row = self.tableView.clickedRow;\n    NSInteger column = self.tableView.clickedColumn;\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n    \n    if (row == NOT_A_ROW || propertyIndex < 0) {\n        return;\n    }\n    \n    RLMClassProperty *propertyNode = self.displayedType.propertyColumns[propertyIndex];\n    \n    if (propertyNode.type == RLMPropertyTypeObject || propertyNode.property.array) {\n        RLMObject *selectedInstance = [self.displayedType instanceAtIndex:row];\n        id propertyValue = selectedInstance[propertyNode.name];\n        \n        if ([propertyValue isKindOfClass:[RLMObject class]]) {\n            RLMObject *linkedObject = (RLMObject *)propertyValue;\n            RLMObjectSchema *linkedObjectSchema = linkedObject.objectSchema;\n            \n            for (RLMClassNode *classNode in self.parentWindowController.document.presentedRealm.topLevelClasses) {\n                if ([classNode.name isEqualToString:linkedObjectSchema.className]) {\n                    RLMResults *allInstances = [linkedObject.realm allObjects:linkedObjectSchema.className];\n                    NSUInteger objectIndex = [allInstances indexOfObject:linkedObject];\n                    \n                    RLMNavigationState *state = [[RLMNavigationState alloc] initWithSelectedType:classNode index:objectIndex];\n                    [self.parentWindowController addNavigationState:state fromViewController:self];\n                    \n                    break;\n                }\n            }\n        }\n        else if ([propertyValue isKindOfClass:[RLMArray class]]) {\n            RLMArrayNavigationState *state = [[RLMArrayNavigationState alloc] initWithSelectedType:self.displayedType\n                                                                                         typeIndex:row\n                                                                                          property:propertyNode.property\n                                                                                        arrayIndex:0];\n            [self.parentWindowController addNavigationState:state fromViewController:self];\n        }\n    }\n    else {\n        [self setSelectionIndex:row];\n    }\n}\n\n- (void)userDoubleClicked:(NSTableView *)sender {\n    NSInteger row = self.tableView.clickedRow;\n    NSInteger column = self.tableView.clickedColumn;\n    NSInteger propertyIndex = [self propertyIndexForColumn:column];\n    \n    if (row == NOT_A_ROW || propertyIndex < 0 || self.realmIsLocked) {\n        return;\n    }\n    \n    RLMTypeNode *displayedType = self.displayedType;\n    RLMClassProperty *propertyNode = displayedType.propertyColumns[propertyIndex];\n    RLMObject *selectedObject = [displayedType instanceAtIndex:row];\n    id propertyValue = selectedObject[propertyNode.name];\n    \n    switch (propertyNode.type) {\n        case RLMPropertyTypeDate: {\n            // Create a menu with a single menu item, and later populate it with the propertyValue\n            NSMenu *menu = [[NSMenu alloc] initWithTitle:@\"\"];\n            NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:@\"\" action:NULL keyEquivalent:@\"\"];\n            \n            NSSize intercellSpacing = [self.tableView intercellSpacing];\n            NSRect frame = [self.tableView frameOfCellAtColumn:column row:row];\n            frame.origin.x -= 0.5*intercellSpacing.width;\n            frame.origin.y -= 0.5*intercellSpacing.height;\n            frame.size.width += intercellSpacing.width;\n            frame.size.height += intercellSpacing.height;\n            \n            frame.size.height = MAX(23.0, frame.size.height);\n            \n            // Set up a date picker with no border or background\n            NSDatePicker *datepicker = [[NSDatePicker alloc] initWithFrame:frame];\n            datepicker.bordered = NO;\n            datepicker.drawsBackground = NO;\n            datepicker.datePickerStyle = NSTextFieldAndStepperDatePickerStyle;\n            datepicker.datePickerElements = NSHourMinuteSecondDatePickerElementFlag\n              | NSYearMonthDayDatePickerElementFlag | NSTimeZoneDatePickerElementFlag;\n            datepicker.dateValue = propertyValue;\n            \n            item.view = datepicker;\n            [menu addItem:item];\n            \n            if ([menu popUpMenuPositioningItem:nil atLocation:frame.origin inView:self.tableView]) {\n                RLMRealm *realm = self.parentWindowController.document.presentedRealm.realm;\n                [realm beginWriteTransaction];\n                selectedObject[propertyNode.name] = datepicker.dateValue;\n                [realm commitWriteTransaction];\n                [self.tableView reloadData];\n            }\n            break;\n        }\n            \n        case RLMPropertyTypeInt:\n        case RLMPropertyTypeFloat:\n        case RLMPropertyTypeDouble:\n        case RLMPropertyTypeString: {\n            // Start editing the textfield\n            NSTableCellView *cellView = [self.tableView viewAtColumn:column row:row makeIfNecessary:NO];\n            [[cellView.textField window] makeFirstResponder:cellView.textField];\n            break;\n        }\n        case RLMPropertyTypeAny:\n        case RLMPropertyTypeBool:\n        case RLMPropertyTypeData:\n        case RLMPropertyTypeObject:\n        case RLMPropertyTypeLinkingObjects:\n            // Do nothing\n            break;\n    }\n}\n\n#pragma mark - Public Methods - Table View Construction\n\n- (void)enableLinkCursor\n{\n    if (linkCursorDisplaying) {\n        return;\n    }\n    NSCursor *currentCursor = [NSCursor currentCursor];\n    [currentCursor push];\n    \n    NSCursor *newCursor = [NSCursor pointingHandCursor];\n    [newCursor set];\n    \n    linkCursorDisplaying = YES;\n}\n\n- (void)disableLinkCursor\n{\n    if (!linkCursorDisplaying) {\n        return;\n    }\n    \n    [NSCursor pop];\n    linkCursorDisplaying = NO;\n}\n\n#pragma mark - Private Methods - Convenience\n\n-(NSInteger)propertyIndexForColumn:(NSInteger)column\n{\n    return self.displaysArray ? column - 1 : column;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMObjectLinkSelectionViewController.h",
    "content": "//\n//  RLMObjectLinkSelectionViewController.h\n//  RealmBrowser\n//\n//  Created by sbuglakov on 24/08/15.\n//  Copyright (c) 2015 Realm inc. All rights reserved.\n//\n\n#import <Cocoa/Cocoa.h>\n\n@class RLMTypeNode;\n@class RLMObject;\n\n@interface RLMObjectLinkSelectionViewController : NSViewController\n\n@property (nonatomic, copy) void(^didSelectedBlock)(RLMObject *rowObject);\n@property (nonatomic, strong) RLMTypeNode *displayedType;\n\n+ (instancetype)loadInstance;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMObjectLinkSelectionViewController.m",
    "content": "//\n//  RLMObjectLinkSelectionViewController.m\n//  RealmBrowser\n//\n//  Created by sbuglakov on 24/08/15.\n//  Copyright (c) 2015 Realm inc. All rights reserved.\n//\n\n#import \"RLMObjectLinkSelectionViewController.h\"\n#import \"RLMInstanceTableViewController.h\"\n\n@interface RLMObjectLinkSelectionViewController ()\n@property (nonatomic, strong) IBOutlet RLMInstanceTableViewController *tableController;\n@end\n\n@implementation RLMObjectLinkSelectionViewController\n\n+ (instancetype)loadInstance {\n    return [[RLMObjectLinkSelectionViewController alloc] initWithNibName:@\"RLMObjectLinkSelectionViewController\" bundle:[NSBundle mainBundle]];\n}\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    \n    if (self.displayedType != nil) {\n        self.displayedType = self.displayedType;\n    }\n    if (self.didSelectedBlock != nil) {\n        self.didSelectedBlock = self.didSelectedBlock;\n    }\n}\n\n- (void)setDisplayedType:(RLMTypeNode *)newNode {\n    _displayedType = newNode;\n    if (self.isViewLoaded) {\n        RLMNavigationState *state = [[RLMNavigationState alloc] initWithSelectedType:_displayedType index:NSNotFound];\n        [self.tableController performUpdateUsingState:state oldState:nil];\n    }\n}\n\n- (void)setDidSelectedBlock:(void (^)(RLMObject *))didSelectedBlock {\n    _didSelectedBlock = didSelectedBlock;\n    if (self.isViewLoaded) {\n        self.tableController.didSelectedBlock = didSelectedBlock;\n    }\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMRealmBrowserWindowController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\n#import \"RLMDocument.h\"\n#import \"RLMTypeOutlineViewController.h\"\n#import \"RLMInstanceTableViewController.h\"\n\nextern const NSUInteger kMaxNumberOfArrayEntriesInToolTip;\n\n@interface RLMRealmBrowserWindowController : NSWindowController\n\n@property (nonatomic, readonly) RLMNavigationState *currentState;\n\n@property (atomic, assign) RLMDocument *document;\n\n@property (nonatomic, strong) IBOutlet RLMTypeOutlineViewController *outlineViewController;\n@property (nonatomic, strong) IBOutlet RLMInstanceTableViewController *tableViewController;\n\n- (void)addNavigationState:(RLMNavigationState *)state fromViewController:(RLMViewController *)controller;\n\n- (void)newWindowWithNavigationState:(RLMNavigationState *)state;\n\n- (void)reloadAllWindows;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMRealmBrowserWindowController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Realm;\n@import Realm.Private;\n@import Realm.Dynamic;\n@import RealmConverter;\n\n#import \"RLMRealmBrowserWindowController.h\"\n#import \"RLMNavigationStack.h\"\n#import \"RLMModelExporter.h\"\n#import \"RLMExportIndicatorWindowController.h\"\n#import \"RLMEncryptionKeyWindowController.h\"\n#import \"RLMLoginWindowController.h\"\n#import \"RLMConnectionIndicatorWindowController.h\"\n#import \"RLMBrowserConstants.h\"\n\nNSString * const kRealmLockedImage = @\"RealmLocked\";\nNSString * const kRealmUnlockedImage = @\"RealmUnlocked\";\nNSString * const kRealmLockedTooltip = @\"Unlock to enable editing\";\nNSString * const kRealmUnlockedTooltip = @\"Lock to prevent editing\";\nNSString * const kRealmKeyIsLockedForRealm = @\"LockedRealm:%@\";\n\nNSString * const kRealmKeyWindowFrameForRealm = @\"WindowFrameForRealm:%@\";\nNSString * const kRealmKeyOutlineWidthForRealm = @\"OutlineWidthForRealm:%@\";\n\nstatic void const *kWaitForDocumentSchemaLoadObservationContext;\n\n@interface RLMRealmBrowserWindowController()<NSWindowDelegate>\n\n@property (atomic, weak) IBOutlet NSSplitView *splitView;\n@property (nonatomic, strong) IBOutlet NSSegmentedControl *navigationButtons;\n@property (atomic, weak) IBOutlet NSToolbarItem *lockRealmButton;\n@property (nonatomic, strong) IBOutlet NSSearchField *searchField;\n\n@property (nonatomic, strong) RLMExportIndicatorWindowController *exportWindowController;\n@property (nonatomic, strong) RLMEncryptionKeyWindowController *encryptionController;\n@property (nonatomic, strong) RLMLoginWindowController *loginWindowController;\n@property (nonatomic, strong) RLMConnectionIndicatorWindowController *connectionIndicatorWindowController;\n\n@property (nonatomic, strong) RLMNotificationToken *documentNotificationToken;\n\n@end\n\n@implementation RLMRealmBrowserWindowController {\n    RLMNavigationStack *navigationStack;\n}\n\n@dynamic document;\n\n- (void)setDocument:(RLMDocument *)document {\n    if (document == self.document) {\n        return;\n    }\n\n    [self stopObservingDocument];\n\n    [super setDocument:document];\n\n    if (self.windowLoaded && self.window.isVisible) {\n        [self handleDocumentState];\n    }\n}\n\n#pragma mark - NSWindowController Overrides\n\n- (void)windowDidLoad\n{\n    navigationStack = [[RLMNavigationStack alloc] init];\n\n    NSString *realmPath = self.document.fileURL.path;\n    [self setWindowFrameAutosaveName:[NSString stringWithFormat:kRealmKeyWindowFrameForRealm, realmPath]];\n    [self.splitView setAutosaveName:[NSString stringWithFormat:kRealmKeyOutlineWidthForRealm, realmPath]];\n\n    // Modify responder chain to handle shortcuts for table view (workaround for https://github.com/realm/realm-browser-osx/issues/241)\n    self.outlineViewController.tableView.enclosingScrollView.nextResponder = self.tableViewController.tableView;\n}\n\n- (IBAction)showWindow:(id)sender\n{\n    [super showWindow:sender];\n    [self handleDocumentState];\n}\n\n#pragma mark - Document observation\n\n- (void)handleDocumentState {\n    switch (self.document.state) {\n        case RLMDocumentStateRequiresFormatUpgrade:\n            [self handleFormatUpgrade];\n            break;\n\n        case RLMDocumentStateNeedsEncryptionKey:\n            [self handleEncryption];\n            break;\n\n        case RLMDocumentStateLoading:\n            [self waitForDocumentLoaded];\n            break;\n\n        case RLMDocumentStateNeedsValidCredentials:\n            [self handleSyncCredentials];\n            break;\n\n        case RLMDocumentStateLoaded:\n            [self realmDidLoad];\n            break;\n\n        case RLMDocumentStateUnrecoverableError:\n            [self handleUnrecoverableError];\n            break;\n    }\n}\n\n- (void)startObservingDocument {\n    __weak typeof(self) weakSelf = self;\n\n    [self.documentNotificationToken invalidate];\n\n    self.documentNotificationToken = [self.document.presentedRealm.realm addNotificationBlock:^(RLMNotification notification, RLMRealm *realm) {\n        // Send notifications to all document's window controllers\n        [weakSelf.document.windowControllers makeObjectsPerformSelector:@selector(handleDocumentChange)];\n    }];\n}\n\n- (void)handleDocumentChange {\n    [self reloadAfterEdit];\n}\n\n- (void)stopObservingDocument {\n    [self.documentNotificationToken invalidate];\n}\n\n- (void)realmDidLoad {\n    [self.outlineViewController realmDidLoad];\n    [self.tableViewController realmDidLoad];\n    \n    [self updateNavigationButtons];\n\n    id firstItem = self.document.presentedRealm.topLevelClasses.firstObject;\n    if (firstItem != nil && navigationStack.currentState == nil) {\n        RLMNavigationState *initState = [[RLMNavigationState alloc] initWithSelectedType:firstItem index:NSNotFound];\n        [self addNavigationState:initState fromViewController:nil];\n    }\n\n    [self startObservingDocument];\n}\n\n- (void)handleFormatUpgrade {\n    NSAlert *alert = [[NSAlert alloc] init];\n    alert.messageText = [NSString stringWithFormat:@\"\\\"%@\\\" is at an older file format version and must be upgraded before it can be opened. Would you like to proceed?\", self.document.fileURL.lastPathComponent];\n    alert.informativeText = @\"If the file is upgraded, it will no longer be compatible with older versions of Realm. File format upgrades are permanent and cannot be undone.\";\n\n    [alert addButtonWithTitle:@\"Cancel\"];\n    [alert addButtonWithTitle:@\"Proceed with Upgrade\"];\n\n    [alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {\n        if (returnCode == NSAlertSecondButtonReturn) {\n            [self.document loadByPerformingFormatUpgradeWithError:nil];\n\n            dispatch_async(dispatch_get_main_queue(), ^{\n                [self handleDocumentState];\n            });\n        } else {\n            [self.document close];\n        }\n    }];\n}\n\n- (void)handleEncryption {\n    self.encryptionController = [[RLMEncryptionKeyWindowController alloc] init];\n\n    [self.encryptionController showSheetForWindow:self.window completionHandler:^(NSModalResponse returnCode) {\n        if (returnCode == NSModalResponseOK) {\n            [self.document loadWithEncryptionKey:self.encryptionController.encryptionKey error:nil];\n\n            dispatch_async(dispatch_get_main_queue(), ^{\n                [self handleDocumentState];\n            });\n        } else {\n            [self.document close];\n        }\n\n        self.encryptionController = nil;\n    }];\n}\n\n- (void)waitForDocumentLoaded {\n    [self showLoadingIndicator];\n    [self.document addObserver:self forKeyPath:@\"state\" options:NSKeyValueObservingOptionNew context:&kWaitForDocumentSchemaLoadObservationContext];\n}\n\n- (void)cancelDocumentLoading {\n    [self.document removeObserver:self forKeyPath:@\"state\"];\n}\n\n- (void)documentLoaded {\n    [self.document removeObserver:self forKeyPath:@\"state\"];\n    [self hideLoadingIndicator];\n    [self handleDocumentState];\n}\n\n- (void)handleSyncCredentials {\n    self.loginWindowController = [[RLMLoginWindowController alloc] init];\n    self.loginWindowController.credentials = self.document.credentials;\n\n    [self.loginWindowController showSheetForWindow:self.window completionHandler:^(NSModalResponse returnCode) {\n        if (returnCode == NSModalResponseOK) {\n            [self showLoadingIndicator];\n\n            [self.document loadWithCredentials:self.loginWindowController.credentials completionHandler:^(NSError *error) {\n                [self hideLoadingIndicator];\n\n                // TODO: handle error code properly\n                if (error != nil) {\n                    [[NSAlert alertWithError:error] beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {\n                        [self handleSyncCredentials];\n                    }];\n                } else {\n                    [self handleDocumentState];\n                }\n            }];\n        } else {\n            [self.document close];\n        }\n\n        self.loginWindowController = nil;\n    }];\n}\n\n- (void)showLoadingIndicator {\n    if (self.connectionIndicatorWindowController.isWindowVisible) {\n        return;\n    }\n\n    self.connectionIndicatorWindowController = [[RLMConnectionIndicatorWindowController alloc] init];\n\n    [self.connectionIndicatorWindowController showSheetForWindow:self.window completionHandler:^(NSModalResponse returnCode) {\n        if (returnCode == NSModalResponseCancel) {\n            [self cancelDocumentLoading];\n            [self.document close];\n        }\n\n        self.connectionIndicatorWindowController = nil;\n    }];\n}\n\n- (void)hideLoadingIndicator {\n    [self.connectionIndicatorWindowController closeWithReturnCode:NSModalResponseOK];\n}\n\n- (void)handleUnrecoverableError {\n    NSAlert *alert;\n\n    if (self.document.error != nil) {\n        alert = [NSAlert alertWithError:self.document.error];\n    } else {\n        alert = [[NSAlert alloc] init];\n\n        alert.messageText = @\"Realm couldn't be opened\";\n        alert.alertStyle = NSCriticalAlertStyle;\n    }\n\n    [alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {\n        [self.document close];\n    }];\n}\n\n#pragma mark - KVO\n\n- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {\n    if (context == &kWaitForDocumentSchemaLoadObservationContext) {\n        if (self.document.state != RLMDocumentStateLoading) {\n            [self documentLoaded];\n        }\n    } else {\n        [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];\n    }\n}\n\n#pragma mark - Public methods - Accessors\n\n- (RLMNavigationState *)currentState\n{\n    return navigationStack.currentState;\n}\n\n#pragma mark - Public methods - Menu items\n\n- (void)saveModelsForLanguage:(RLMModelExporterLanguage)language\n{\n    NSArray *objectSchemas = self.document.presentedRealm.realm.schema.objectSchema;\n    [RLMModelExporter saveModelsForSchemas:objectSchemas inLanguage:language window:self.window];\n}\n\n- (IBAction)saveJavaModels:(id)sender\n{\n    [self saveModelsForLanguage:RLMModelExporterLanguageJava];\n}\n\n- (IBAction)saveObjcModels:(id)sender\n{\n    [self saveModelsForLanguage:RLMModelExporterLanguageObjectiveC];\n}\n\n- (IBAction)saveSwiftModels:(id)sender\n{\n    [self saveModelsForLanguage:RLMModelExporterLanguageSwift];\n}\n\n- (IBAction)saveJavaScriptModels:(id)sender\n{\n    [self saveModelsForLanguage:RLMModelExporterLanguageJavaScript];\n}\n\n- (IBAction)saveCSharpModels:(id)sender\n{\n    [self saveModelsForLanguage:RLMModelExporterLanguageCSharp];\n}\n\n- (IBAction)exportToCompactedRealm:(id)sender\n{\n    NSString *fileName = self.document.fileURL.lastPathComponent ?: self.document.syncURL.lastPathComponent ?: @\"Compacted\";\n\n    if (![fileName.pathExtension isEqualToString:kRealmFileExtension]) {\n        fileName = [fileName.stringByDeletingPathExtension stringByAppendingPathExtension:kRealmFileExtension];\n    }\n\n    NSSavePanel *panel = [NSSavePanel savePanel];\n    panel.canCreateDirectories = YES;\n    panel.nameFieldStringValue = fileName;\n    panel.prompt = @\"Export\";\n\n    [panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result){\n        if (result != NSFileHandlingPanelOKButton) {\n            return;\n        }\n\n        [panel orderOut:nil];\n\n        [self exportAndCompactCopyOfRealmFileAtURL:panel.URL];\n    }];\n}\n\n- (IBAction)exportToCSV:(id)sender\n{\n    NSOpenPanel *panel = [NSOpenPanel openPanel];\n    panel.canCreateDirectories = YES;\n    panel.canChooseDirectories = YES;\n    panel.canChooseFiles = NO;\n    panel.message = @\"Choose the directory in which to save the CSV files generated from this Realm file.\";\n    panel.prompt = @\"Export\";\n\n    [panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) {\n        if (result != NSFileHandlingPanelOKButton) {\n            return;\n        }\n\n        [panel orderOut:nil];\n\n        RLMCSVDataExporter *exporter = [[RLMCSVDataExporter alloc] initWithRealm:self.document.presentedRealm.realm];\n\n        NSError *error = nil;\n        if (![exporter exportToFolderAtPath:panel.URL.path withError:&error]) {\n            [NSApp presentError:error];\n        } else {\n            [[NSWorkspace sharedWorkspace] openURL:panel.URL];\n        }\n    }];\n}\n\n- (void)exportAndCompactCopyOfRealmFileAtURL:(NSURL *)realmFileURL\n{\n    //Check that this won't end up overwriting the original file\n    if ([realmFileURL.path.lowercaseString isEqualToString:self.document.fileURL.path.lowercaseString]) {\n        NSAlert *alert = [[NSAlert alloc] init];\n        alert.messageText = @\"You cannot overwrite the original Realm file.\";\n        alert.informativeText = @\"Please choose a different location in which to save this Realm file.\";\n        [alert runModal];\n        return;\n    }\n    \n    //Ensure a file with the same name doesn't already exist\n    BOOL directory = NO;\n    if ([[NSFileManager defaultManager] fileExistsAtPath:realmFileURL.path isDirectory:&directory] && !directory) {\n        NSError *error = nil;\n        if (![[NSFileManager defaultManager] removeItemAtURL:realmFileURL error:&error]) {\n            [NSApp presentError:error];\n            return;\n        }\n    }\n\n    void (^closeExportWindowOnMainThreadAndShowError)(NSError *) = ^void(NSError *error) {\n        dispatch_sync(dispatch_get_main_queue(), ^{\n            [self.window endSheet:self.exportWindowController.window];\n\n            if (error != nil) {\n                [NSApp presentError:error];\n            } else {\n                [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:@[realmFileURL]];\n            }\n        });\n    };\n\n    //Display an 'exporting' progress indicator\n    self.exportWindowController = [[RLMExportIndicatorWindowController alloc] init];\n    [self.window beginSheet:self.exportWindowController.window completionHandler:nil];\n    \n    //Perform the export/compact operations on a background thread as they can potentially be time-consuming\n    dispatch_async(dispatch_get_global_queue(0, 0), ^{\n        NSError *error = nil;\n\n        RLMRealm *currentThreadRealm = [RLMRealm realmWithConfiguration:self.document.presentedRealm.realm.configuration error:&error];\n        if (currentThreadRealm == nil) {\n            closeExportWindowOnMainThreadAndShowError(error);\n            return;\n        }\n\n        if (![currentThreadRealm writeCopyToURL:realmFileURL encryptionKey:nil error:&error]) {\n            closeExportWindowOnMainThreadAndShowError(error);\n            return;\n        }\n\n        closeExportWindowOnMainThreadAndShowError(nil);\n    });\n}\n\n#pragma mark - Public methods - User Actions\n\n- (void)reloadAllWindows\n{\n    NSArray *windowControllers = [self.document windowControllers];\n    \n    for (RLMRealmBrowserWindowController *wc in windowControllers) {\n        [wc reloadAfterEdit];\n    }\n}\n\n- (void)reloadAfterEdit\n{\n    [self.outlineViewController reloadData];\n    \n    NSString *realmPath = self.document.fileURL.path;\n    NSString *key = [NSString stringWithFormat:kRealmKeyIsLockedForRealm, realmPath];\n    \n    BOOL realmIsLocked = [[NSUserDefaults standardUserDefaults] boolForKey:key];\n    self.tableViewController.realmIsLocked = realmIsLocked;\n    self.lockRealmButton.image = [NSImage imageNamed:realmIsLocked ? kRealmLockedImage : kRealmUnlockedImage];\n    self.lockRealmButton.toolTip = realmIsLocked ? kRealmLockedTooltip : kRealmUnlockedTooltip;\n\n    if (self.tableViewController.displayedType.isInvalidated) {\n        [navigationStack reset];\n        [self realmDidLoad];\n    } else {\n        [self.tableViewController reloadData];\n    }\n}\n\n#pragma mark - Public methods - Navigation\n\n- (void)addNavigationState:(RLMNavigationState *)state fromViewController:(RLMViewController *)controller\n{\n    if (!controller.navigationFromHistory) {\n        RLMNavigationState *oldState = navigationStack.currentState;\n        \n        [navigationStack pushState:state];\n        [self updateNavigationButtons];\n        \n        if (controller == self.tableViewController || controller == nil) {\n            [self.outlineViewController updateUsingState:state oldState:oldState];\n        }\n        \n        [self.tableViewController updateUsingState:state oldState:oldState];\n    }\n\n    // Searching is not implemented for link arrays yet\n    BOOL isArray = [state isMemberOfClass:[RLMArrayNavigationState class]];\n    [self.searchField setEnabled:!isArray];\n}\n\n- (void)newWindowWithNavigationState:(RLMNavigationState *)state\n{\n    RLMRealmBrowserWindowController *wc = [[RLMRealmBrowserWindowController alloc] initWithWindowNibName:self.windowNibName];\n\n    [self.document addWindowController:wc];\n    [self.document showWindows];\n\n    [wc addNavigationState:state fromViewController:wc.tableViewController];\n}\n\n- (IBAction)userClicksOnNavigationButtons:(NSSegmentedControl *)buttons\n{\n    RLMNavigationState *oldState = navigationStack.currentState;\n    \n    switch (buttons.selectedSegment) {\n        case 0: { // Navigate backwards\n            RLMNavigationState *state = [navigationStack navigateBackward];\n            if (state != nil) {\n                [self.outlineViewController updateUsingState:state oldState:oldState];\n                [self.tableViewController updateUsingState:state oldState:oldState];\n            }\n            break;\n        }\n        case 1: { // Navigate forwards\n            RLMNavigationState *state = [navigationStack navigateForward];\n            if (state != nil) {\n                [self.outlineViewController updateUsingState:state oldState:oldState];\n                [self.tableViewController updateUsingState:state oldState:oldState];\n            }\n            break;\n        }\n        default:\n            break;\n    }\n    \n    [self updateNavigationButtons];\n}\n\n- (IBAction)userClickedLockRealm:(id)sender\n{\n    NSString *realmPath = self.document.fileURL.path;\n    NSString *key = [NSString stringWithFormat:kRealmKeyIsLockedForRealm, realmPath];\n\n    BOOL currentlyLocked = [[NSUserDefaults standardUserDefaults] boolForKey:key];\n    [self setRealmLocked:!currentlyLocked];\n}\n\n-(void)setRealmLocked:(BOOL)locked\n{\n    NSString *realmPath = self.document.fileURL.path;\n    NSString *key = [NSString stringWithFormat:kRealmKeyIsLockedForRealm, realmPath];\n    [[NSUserDefaults standardUserDefaults] setBool:locked forKey:key];\n    [[NSUserDefaults standardUserDefaults] synchronize];\n    \n    [self reloadAllWindows];\n}\n\n- (IBAction)searchAction:(NSSearchFieldCell *)searchCell\n{\n    NSString *searchText = searchCell.stringValue;\n    RLMTypeNode *typeNode = navigationStack.currentState.selectedType;\n\n    // Return to parent class (showing all objects) when the user clears the search text\n    if (searchText.length == 0) {\n        if ([navigationStack.currentState isMemberOfClass:[RLMQueryNavigationState class]]) {\n            RLMNavigationState *state = [[RLMNavigationState alloc] initWithSelectedType:typeNode index:0];\n            [self addNavigationState:state fromViewController:self.tableViewController];\n        }\n        return;\n    }\n\n    NSArray *columns = typeNode.propertyColumns;\n    NSUInteger columnCount = columns.count;\n    RLMRealm *realm = self.document.presentedRealm.realm;\n\n    NSMutableArray *predicates = [NSMutableArray array];\n\n    NSNumberFormatter *floatFormatter = [[NSNumberFormatter alloc] init];\n    NSNumberFormatter *integerFormatter = [[NSNumberFormatter alloc] init];\n    integerFormatter.allowsFloats = NO;\n\n    for (NSUInteger index = 0; index < columnCount; index++) {\n\n        RLMClassProperty *property = columns[index];\n        NSExpression *propertyExpression = [NSExpression expressionForKeyPath:property.name];\n        NSExpression *valueExpression;\n        NSPredicateOperatorType comparisonOperator = NSEqualToPredicateOperatorType;\n        NSComparisonPredicateOptions comparisonOptions = 0;\n\n        switch (property.type) {\n            case RLMPropertyTypeBool: {\n                if ([searchText caseInsensitiveCompare:@\"true\"] == NSOrderedSame ||\n                    [searchText caseInsensitiveCompare:@\"YES\"] == NSOrderedSame) {\n                    valueExpression = [NSExpression expressionForConstantValue:@YES];\n                }\n                else if ([searchText caseInsensitiveCompare:@\"false\"] == NSOrderedSame ||\n                         [searchText caseInsensitiveCompare:@\"NO\"] == NSOrderedSame) {\n                    valueExpression = [NSExpression expressionForConstantValue:@NO];\n                }\n                break;\n            }\n            case RLMPropertyTypeInt: {\n                NSNumber *value = [integerFormatter numberFromString:searchText];\n                if (value) {\n                    valueExpression = [NSExpression expressionForConstantValue:value];\n                }\n                break;\n            }\n            case RLMPropertyTypeString: {\n                valueExpression = [NSExpression expressionForConstantValue:searchText];\n                comparisonOperator = NSContainsPredicateOperatorType;\n                comparisonOptions = NSCaseInsensitivePredicateOption;\n\n                break;\n            }\n            case RLMPropertyTypeFloat:\n            case RLMPropertyTypeDouble: {\n                NSNumber *value = [floatFormatter numberFromString:searchText];\n                if (value) {\n                    valueExpression = [NSExpression expressionForConstantValue:value];\n                }\n                break;\n            }\n            default:\n                break;\n        }\n\n        if (!valueExpression) {\n            // We were unable to convert the search text into a predicate for this property type.\n            continue;\n        }\n\n        NSPredicate *predicate = [NSComparisonPredicate predicateWithLeftExpression:propertyExpression\n                                                                    rightExpression:valueExpression\n                                                                           modifier:NSDirectPredicateModifier\n                                                                               type:comparisonOperator\n                                                                            options:comparisonOptions];\n        [predicates addObject:predicate];\n    }\n\n    NSPredicate *predicate = [NSCompoundPredicate orPredicateWithSubpredicates:predicates];\n    RLMResults *result = [realm objects:typeNode.name withPredicate:predicate];\n\n    RLMQueryNavigationState *state = [[RLMQueryNavigationState alloc] initWithQuery:searchText type:typeNode results:result];\n    [self addNavigationState:state fromViewController:self.tableViewController];\n}\n\n#pragma mark - Private methods\n\n- (void)updateNavigationButtons\n{\n    [self.navigationButtons setEnabled:[navigationStack canNavigateBackward] forSegment:0];\n    [self.navigationButtons setEnabled:[navigationStack canNavigateForward] forSegment:1];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMTypeOutlineViewController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\n#import \"RLMViewController.h\"\n#import \"RLMClassNode.h\"\n\n@interface RLMTypeOutlineViewController : RLMViewController <NSOutlineViewDataSource, NSOutlineViewDelegate>\n\n- (void)reloadData;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMTypeOutlineViewController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTypeOutlineViewController.h\"\n\n#import \"RLMRealmBrowserWindowController.h\"\n#import \"RLMRealmOutlineNode.h\"\n#import \"RLMArrayNavigationState.h\"\n#import \"RLMQueryNavigationState.h\"\n#import \"RLMObjectNode.h\"\n#import \"RLMResultsNode.h\"\n#import \"RLMRealmOutlineNode.h\"\n\n@interface RLMTypeOutlineViewController ()\n\n@property (nonatomic, strong) IBOutlet NSOutlineView *classesOutlineView;\n@property (nonatomic) BOOL skipSelectionChangeHandling;\n\n@end\n\n@implementation RLMTypeOutlineViewController\n\n#pragma mark - RLMViewController overrides\n\n-(void)realmDidLoad\n{\n    [self.classesOutlineView reloadData];\n    // Expand the root item representing the selected realm.\n    RLMRealmNode *firstItem = self.parentWindowController.document.presentedRealm;\n    if (firstItem != nil) {\n        // We want the class outline to be expanded as default\n        [self.classesOutlineView expandItem:firstItem expandChildren:YES];\n    }\n}\n\n- (void)reloadData {\n    NSInteger row = self.tableView.selectedRow;\n    [self.tableView reloadData];\n\n    self.skipSelectionChangeHandling = YES;\n    // selectRowIndexes:byExtendingSelection: notifies delegate but this notification should be skipped.\n    [self.tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];\n    self.skipSelectionChangeHandling = NO;\n}\n\n#pragma mark - NSOutlineViewDataSource implementation\n\n- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item\n{\n    if (item == nil) {\n        return self.parentWindowController.document.presentedRealm;\n    }\n    // ... and second level nodes are all classes.\n    else if ([item conformsToProtocol:@protocol(RLMRealmOutlineNode)]) {\n        id<RLMRealmOutlineNode> outlineItem = item;\n        \n        return [outlineItem childNodeAtIndex:index];\n    }\n    \n    return nil;\n}\n\n- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item\n{\n    // The root node is expandable if we are presenting a realm\n    if (item == nil) {\n        return self.parentWindowController.document.presentedRealm == nil;\n    }\n    // ... otherwise the exandability check is re-delegated to the node in question.\n    else if ([item conformsToProtocol:@protocol(RLMRealmOutlineNode)]) {\n        id<RLMRealmOutlineNode> outlineItem = item;\n        return outlineItem.isExpandable;\n    }\n    \n    return NO;\n}\n\n- (NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item\n{\n    // There is never more than one root node\n    if (item == nil) {\n        return 1;\n    }\n    // ... otherwise the number of child nodes are defined by the node in question.\n    else if ([item conformsToProtocol:@protocol(RLMRealmOutlineNode)]) {\n        id<RLMRealmOutlineNode> outlineItem = item;\n        return outlineItem.numberOfChildNodes;\n    }\n    \n    return 0;\n}\n\n#pragma mark - NSOutlineViewDelegate implementation\n\n- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item\n{\n    // Group headers should not be selectable\n    return ![item isKindOfClass:[RLMRealmNode class]];\n}\n\n- (BOOL)outlineView:(NSOutlineView *)outlineView shouldShowOutlineCellForItem:(id)item\n{\n    return NO;\n}\n\n- (NSString *)outlineView:(NSOutlineView *)outlineView\n           toolTipForCell:(NSCell *)cell\n                     rect:(NSRectPointer)rect\n              tableColumn:(NSTableColumn *)tc\n                     item:(id)item\n            mouseLocation:(NSPoint)mouseLocation\n{\n    if ([item respondsToSelector:@selector(hasToolTip)]) {\n        if ([item respondsToSelector:@selector(toolTipString)]) {\n            return [item toolTipString];\n        }\n    }\n    \n    return nil;\n}\n\n- (void)outlineViewSelectionDidChange:(NSNotification *)notification\n{\n    if (self.skipSelectionChangeHandling) {\n        return;\n    }\n\n    NSOutlineView *outlineView = notification.object;\n    if (outlineView == self.classesOutlineView) {\n        NSInteger row = [outlineView selectedRow];\n\n        // The arrays we get from link views are ephemeral, so we\n        // remove them when any class node is selected\n        if (row != -1) {\n            [self selectedItem:[outlineView itemAtRow:row]];\n        }\n    }\n}\n\n-(void)selectedItem:(id<RLMRealmOutlineNode>)item\n{\n    if ([item isKindOfClass:[RLMResultsNode class]]) {\n        return;\n    }\n\n    id<RLMRealmOutlineNode> theItem = item;\n    \n    // If we didn't select an array, we should flatten the outline view\n    if (![item isKindOfClass:[RLMArrayNode class]]) {\n        [self removeAllChildArrays];\n    }\n    \n    // If we clicked an object, collapse and then select its parent\n    if ([item isKindOfClass:[RLMObjectNode class]]) {\n        theItem = ((RLMObjectNode *)item).parentNode;\n    }\n    \n    RLMNavigationState *state = [[RLMNavigationState alloc] initWithSelectedType:theItem index:NSNotFound];\n    [self.parentWindowController addNavigationState:state fromViewController:self];\n    NSInteger typeIndex = [self.classesOutlineView rowForItem:theItem];\n    [self setSelectionIndex:typeIndex];\n}\n\n- (void)performUpdateUsingState:(RLMNavigationState *)newState oldState:(RLMNavigationState *)oldState\n{\n    if ([newState isMemberOfClass:[RLMArrayNavigationState class]]) {\n        // Deselect everything in sidebar in case of swithing to array\n        [self setSelectionIndex:-1];\n    } else {\n        [self setSelectionIndex:[self.classesOutlineView rowForItem:newState.selectedType]];\n    }\n}\n\n- (void)outlineView:(NSOutlineView *)outlineView didAddRowView:(NSTableRowView *)rowView forRow:(NSInteger)row\n{\n    // No Action\n}\n\n- (void)outlineView:(NSOutlineView *)outlineView didRemoveRowView:(NSTableRowView *)rowView forRow:(NSInteger)row\n{\n    // No Action\n}\n\n- (NSTableRowView *)outlineView:(NSOutlineView *)outlineView rowViewForItem:(id)item\n{\n    return nil;\n}\n\n- (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item\n{\n    if (outlineView == self.classesOutlineView) {\n        if ([item conformsToProtocol:@protocol(RLMRealmOutlineNode)]) {\n            id<RLMRealmOutlineNode> outlineNode = item;\n            return [outlineNode cellViewForTableView:self.tableView];\n        }\n    }\n    \n    return nil;\n}\n\n#pragma mark - Public methods - Accessors\n\n- (NSOutlineView *)outlineView\n{\n    if ([self.view isKindOfClass:[NSOutlineView class]]) {\n        return (NSOutlineView *)self.view;\n    }\n    \n    return nil;\n}\n\n#pragma mark - Private methods\n\n- (void)removeAllChildArrays\n{\n    for (RLMClassNode *node in self.parentWindowController.document.presentedRealm.topLevelClasses) {\n        [node removeAllChildNodes];\n        [self.classesOutlineView reloadItem:node];\n    }\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMViewController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\n#import \"RLMNavigationState.h\"\n\n@class RLMRealmBrowserWindowController;\n\n@interface RLMViewController : NSViewController\n\n@property (nonatomic, readonly) NSTableView *tableView;\n@property (nonatomic, readonly) BOOL navigationFromHistory;\n@property (nonatomic, strong) RLMTypeNode *displayedType;\n@property (nonatomic, weak) IBOutlet RLMRealmBrowserWindowController *parentWindowController;\n\n- (void)updateUsingState:(RLMNavigationState *)newState oldState:(RLMNavigationState *)oldState;\n\n- (void)performUpdateUsingState:(RLMNavigationState *)newState oldState:(RLMNavigationState *)oldState;\n\n- (void)clearSelection;\n\n- (void)setSelectionIndex:(NSInteger)newIndex;\n\n-(void)realmDidLoad;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Controllers/RLMViewController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMViewController.h\"\n\n#import \"RLMRealmBrowserWindowController.h\"\n\n@implementation RLMViewController\n\n#pragma mark - NSObject overrides\n\n- (void)awakeFromNib\n{\n    [super awakeFromNib];\n    _navigationFromHistory = NO;\n}\n\n#pragma mark - Public methods - Accessors\n\n-(void)realmDidLoad\n{\n    // No action - should be implemented by subclasses.\n}\n\n- (NSTableView *)tableView\n{\n    if ([self.view isKindOfClass:[NSTableView class]]) {\n        return (NSTableView *)self.view;\n    }\n        \n    return nil;\n}\n\n#pragma mark - Public methods\n\n- (void)updateUsingState:(RLMNavigationState *)newState oldState:(RLMNavigationState *)oldState\n{\n    _navigationFromHistory = YES;\n    \n    [self performUpdateUsingState:newState oldState:oldState];\n    \n    _navigationFromHistory = NO;\n}\n\n- (void)performUpdateUsingState:(RLMNavigationState *)newState oldState:(RLMNavigationState *)oldState\n{\n    // No action - should be implemented by subclasses.\n}\n\n- (void)clearSelection\n{\n    [self.tableView deselectAll:self];\n}\n\n- (void)setSelectionIndex:(NSInteger)newIndex\n{\n    NSInteger oldIndex = self.tableView.selectedRow;\n\n    if (oldIndex != newIndex) {\n        if (newIndex == -1) {\n            [self.tableView deselectAll:self];\n        } else {\n            [self.tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:newIndex] byExtendingSelection:NO];\n        }\n\n        [self.tableView scrollRowToVisible:newIndex];\n    }\n}\n\n@end\n\n\n\n\n"
  },
  {
    "path": "RealmBrowser/Models/RLMArrayNavigationState.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMNavigationState.h\"\n\n#import \"RLMArrayNode.h\"\n\n@interface RLMArrayNavigationState : RLMNavigationState\n\n@property (nonatomic, readonly) RLMProperty *property;\n@property (nonatomic, readonly) NSInteger arrayIndex;\n\n- (instancetype)initWithSelectedType:(RLMTypeNode *)type typeIndex:(NSInteger)typeIndex property:(RLMProperty *)property arrayIndex:(NSInteger)arrayIndex;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMArrayNavigationState.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMArrayNavigationState.h\"\n\n@implementation RLMArrayNavigationState\n\n- (instancetype)initWithSelectedType:(RLMTypeNode *)type typeIndex:(NSInteger)typeIndex property:(RLMProperty *)property arrayIndex:(NSInteger)arrayIndex;\n{\n    if (self = [super initWithSelectedType:type index:typeIndex]) {\n        _property = property;\n        _arrayIndex = arrayIndex;\n    }\n    return self;\n}\n\n- (void)updateSelectionToIndex:(NSInteger)index\n{\n    _arrayIndex = index;\n}\n\n- (BOOL)isEqualTo:(id)object\n{\n    if ([object isKindOfClass:[self class]]) {\n        BOOL result = [super isEqualTo:object];\n        \n        RLMArrayNavigationState *comparedState = (RLMArrayNavigationState *)object;\n        return result && self.property == comparedState.property;\n    }\n    \n    return NO;\n}\n\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMArrayNode.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTypeNode.h\"\n\n@interface RLMArrayNode : RLMTypeNode\n\n@property (readonly) RLMProperty *referringProperty;\n\n- (instancetype)initWithReferringProperty:(RLMProperty *)property onObject:(RLMObject *)object realm:(RLMRealm *)realm;\n\n- (BOOL)insertInstance:(RLMObject *)object atIndex:(NSUInteger)index;\n- (BOOL)removeInstanceAtIndex:(NSUInteger)index;\n- (BOOL)moveInstanceFromIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex;\n//- (BOOL)isEqualTo:(id)object;\n- (NSString *)objectClassName;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMArrayNode.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMArrayNode.h\"\n\n#import \"RLMSidebarTableCellView.h\"\n\n@interface RLMProperty (Dynamic)\n- (instancetype)initWithName:(NSString *)name\n                        type:(RLMPropertyType)type\n             objectClassName:(nullable NSString *)objectClassName\n      linkOriginPropertyName:(nullable NSString *)linkOriginPropertyName\n                     indexed:(BOOL)indexed\n                    optional:(BOOL)optional;\n@end\n@interface RLMObjectSchema (Dynamic)\n- (instancetype)initWithClassName:(NSString *)objectClassName objectClass:(Class)objectClass properties:(NSArray *)properties;\n@end\n\n// A value which pretends to be an RLMObject representing a row in a non-object array\n@interface RLMRowProxy : NSObject\n@end\n@implementation RLMRowProxy {\n    RLMArray *_array;\n    NSUInteger _index;\n}\n\n+ (instancetype)proxyForArray:(RLMArray *)array row:(NSUInteger)index {\n    RLMRowProxy *proxy = [[self alloc] init];\n    proxy->_array = array;\n    proxy->_index = index;\n    return proxy;\n}\n\n- (id)objectForKeyedSubscript:(__unused id)subscript {\n    return _array[_index];\n}\n- (void)setObject:(id)value forKeyedSubscript:(__unused id)subscript {\n    _array[_index] = value;\n}\n@end\n\n@implementation RLMArrayNode {\n    RLMProperty *_referringProperty;\n    RLMObject *_referringObject;\n    RLMArray *_displayedArray;\n    bool _isObject;\n}\n\n\n#pragma mark - Public Methods\n\n- (instancetype)initWithReferringProperty:(RLMProperty *)property onObject:(RLMObject *)object realm:(RLMRealm *)realm\n{\n    RLMArray *array = object[property.name];\n    RLMObjectSchema *elementSchema;\n    if (array.objectClassName) {\n        elementSchema = [realm.schema schemaForClassName:array.objectClassName];\n    }\n    else {\n        // Create a fake object schema representing the values of a primitive array\n        RLMProperty *prop = [[RLMProperty alloc] initWithName:@\"Value\"\n                                                         type:property.type\n                                              objectClassName:nil\n                                       linkOriginPropertyName:nil\n                                                      indexed:NO\n                                                     optional:property.optional];\n        elementSchema = [[RLMObjectSchema alloc] initWithClassName:property.name objectClass:RLMObject.class properties:@[prop]];\n    }\n    if (self = [super initWithSchema:elementSchema inRealm:realm]) {\n        _referringProperty = property;\n        _referringObject = object;\n        _displayedArray = array;\n        _isObject = array.objectClassName != nil;\n    }\n\n    return self;\n}\n\n-(BOOL)insertInstance:(RLMObject *)object atIndex:(NSUInteger)index\n{\n    if (index > _displayedArray.count || object == nil) {\n        return NO;\n    }\n    \n    [_displayedArray insertObject:object atIndex:index];\n    return YES;\n}\n\n-(BOOL)removeInstanceAtIndex:(NSUInteger)index\n{\n    if (index >= [_displayedArray count]) {\n        return NO;\n    }\n    \n    [_displayedArray removeObjectAtIndex:index];\n    return YES;\n}\n\n-(BOOL)moveInstanceFromIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex\n{\n    if (fromIndex >= [_displayedArray count] || toIndex > [_displayedArray count]) {\n        return NO;\n    }\n\n    [_displayedArray moveObjectAtIndex:fromIndex toIndex:toIndex];\n    return YES;\n}\n\n-(BOOL)isEqualTo:(id)object\n{\n    if ([object class] != [self class]) {\n        return NO;\n    }\n    \n    if (self == object) {\n        return YES;\n    }\n    \n    RLMArrayNode *otherArrayNode = object;\n    if (self.instanceCount != otherArrayNode.instanceCount) {\n        return NO;\n    }\n    \n    for (int i = 0; i < self.instanceCount; i++) {\n        if (![_displayedArray[i] isEqualToObject:[otherArrayNode instanceAtIndex:i]]) {\n            return NO;\n        }\n    }\n    \n    return YES;\n}\n\n- (NSString *)objectClassName\n{\n    return _displayedArray.objectClassName;\n}\n\n#pragma mark - RLMTypeNode Overrides\n\n- (NSString *)name\n{\n    return @\"Array\";\n}\n\n- (NSUInteger)instanceCount\n{\n    return _displayedArray.count;\n}\n\n- (BOOL)isInvalidated\n{\n    return _displayedArray.isInvalidated;\n}\n\n- (BOOL)isObject\n{\n    return _isObject;\n}\n\n- (RLMObject *)instanceAtIndex:(NSUInteger)index\n{\n    return _isObject ? _displayedArray[index] : [RLMRowProxy proxyForArray:_displayedArray row:index];\n}\n\n- (id)nodeElementForColumnWithIndex:(NSInteger)index\n{\n    switch (index) {\n        case 0:\n            return [NSString stringWithFormat:@\"%@<%@>\", _referringProperty.name, _referringProperty.objectClassName];\n            \n        default:\n            return nil;\n    }\n}\n\n- (NSView *)cellViewForTableView:(NSTableView *)tableView\n{\n    RLMSidebarTableCellView *cellView = [tableView makeViewWithIdentifier:@\"MainCell\" owner:self];\n    cellView.textField.stringValue = [NSString stringWithFormat:@\"%@: <%@>\",\n                                      _referringProperty.name, _referringProperty.objectClassName];\n\n    cellView.button.title = [NSString stringWithFormat:@\"%lu\", [self instanceCount]];\n    [[cellView.button cell] setHighlightsBy:0];\n    cellView.button.hidden = NO;\n    \n    return cellView;\n}\n\n#pragma mark - RLMRealmOutlineNode Implementation\n\n- (BOOL)hasToolTip\n{\n    return YES;\n}\n\n- (NSString *)toolTipString\n{\n    return _referringObject.description;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMClassNode.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTypeNode.h\"\n\n@class RLMObjectNode;\n@class RLMResultsNode;\n@class RLMResults;\n\n@interface RLMClassNode : RLMTypeNode\n\n@property (nonatomic) RLMResults *allObjects;\n\n- (RLMObjectNode *)displayChildObject:(RLMObject *)object;\n\n- (RLMResultsNode *)displayChildResultsFromQuery:(NSString *)searchText result:(RLMResults *)result;\n\n- (void)removeAllChildNodes;\n\n- (void)removeDisplayingOfArrayAtIndex:(NSUInteger)index;\n\n- (void)removeDisplayingOfArrayFromObjectAtIndex:(NSUInteger)index;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMClassNode.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMClassNode.h\"\n\n@import Realm.Dynamic;\n\n#import \"RLMObjectNode.h\"\n#import \"RLMArrayNode.h\"\n#import \"RLMResultsNode.h\"\n\n#import \"RLMSidebarTableCellView.h\"\n\n@interface RLMClassNode ()\n\n@property (nonatomic, readonly) NSMutableArray *displayedItems;\n\n@end\n\n\n@implementation RLMClassNode {\n    NSMutableArray *displayedObjects;\n    NSMutableArray *displayedArrays;\n    \n    BOOL displaysQuery;\n}\n\n- (instancetype)initWithSchema:(RLMObjectSchema *)schema inRealm:(RLMRealm *)realm\n{\n    self = [super initWithSchema:schema inRealm:realm];\n    if (self) {\n        displayedObjects = [[NSMutableArray alloc] initWithCapacity:10];\n        displayedArrays = [[NSMutableArray alloc] initWithCapacity:10];\n        displaysQuery = NO;\n    }\n    \n    return self;\n}\n\n#pragma mark - RLMObjectNode overrides\n\n- (NSString *)name\n{\n    return [self.schema.className copy];\n}\n\n- (NSUInteger)instanceCount\n{\n    return self.allObjects.count;\n}\n\n#pragma mark - RLMRealmOutlineNode implementation\n\n- (BOOL)isExpandable\n{\n    return self.displayedItems.count > 0;\n}\n\n- (NSUInteger)numberOfChildNodes\n{\n    return self.displayedItems.count;\n}\n\n- (id<RLMRealmOutlineNode>)childNodeAtIndex:(NSUInteger)index\n{\n    return self.displayedItems[index];\n}\n\n#pragma mark - RLMTypeNode overrides\n\n- (RLMObject *)instanceAtIndex:(NSUInteger)index\n{\n    return self.allObjects[index];\n}\n\n- (NSUInteger)indexOfInstance:(RLMObject *)instance\n{    \n    return [self.allObjects indexOfObject:instance];\n}\n\n- (NSView *)cellViewForTableView:(NSTableView *)tableView\n{\n    RLMSidebarTableCellView *result = [tableView makeViewWithIdentifier:@\"MainCell\" owner:self];\n\n    result.textField.stringValue = self.name;\n    result.button.title = [NSString stringWithFormat:@\"%lu\", (unsigned long)[self instanceCount]];\n    [[result.button cell] setHighlightsBy:0];\n    result.button.hidden = NO;\n    result.imageView.image = nil;\n    \n    return result;\n}\n\n- (RLMResults *)allObjects\n{\n    if (!_allObjects) {\n        _allObjects = [self.realm allObjects:self.schema.className];\n    }\n    \n    return _allObjects;\n}\n\n#pragma mark - Public methods\n\n- (RLMObjectNode *)displayChildObject:(RLMObject *)object\n{\n    displaysQuery = NO;\n    \n    RLMObjectNode *objectNode = [[RLMObjectNode alloc] initWithObject:object realm:self.realm];\n    objectNode.parentNode = self;\n    \n    if (displayedObjects.count == 0) {\n        [displayedObjects addObject:objectNode];\n    }\n    else {\n        [displayedObjects replaceObjectAtIndex:0 withObject:objectNode];\n    }\n\n    return objectNode;\n}\n\n- (RLMResultsNode *)displayChildResultsFromQuery:(NSString *)searchText result:(RLMResults *)result\n{\n    displaysQuery = YES;\n    \n    RLMResultsNode *resultsNode = [[RLMResultsNode alloc] initWithQuery:searchText result:result andParent:self];\n    \n    if (displayedArrays.count == 0) {\n        [displayedArrays addObject:resultsNode];\n    }\n    else {\n        [displayedArrays replaceObjectAtIndex:0 withObject:resultsNode];\n    }\n\n    return resultsNode;\n}\n\n- (void)removeAllChildNodes\n{\n    [displayedArrays removeAllObjects];\n    [displayedObjects removeAllObjects];\n}\n\n- (void)removeDisplayingOfArrayAtIndex:(NSUInteger)index\n{\n\n}\n\n- (void)removeDisplayingOfArrayFromObjectAtIndex:(NSUInteger)index\n{\n\n}\n\n#pragma mark - Private methods\n\n- (NSMutableArray *)displayedItems\n{\n    return displaysQuery ? displayedArrays : displayedObjects;\n}\n\n@end\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "RealmBrowser/Models/RLMClassProperty.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n@import Realm;\n\n@interface RLMClassProperty : NSObject\n\n@property (nonatomic, readonly) RLMProperty *property;\n@property (nonatomic, readonly) NSString *name;\n@property (nonatomic, readonly) RLMPropertyType type;\n@property (nonatomic, readonly) BOOL isPrimaryKey;\n@property (nonatomic, readonly) Class class;\n\n- (instancetype)initWithProperty:(RLMProperty *)property isPrimaryKey:(BOOL)flag;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMClassProperty.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMClassNode.h\"\n#import \"RLMClassProperty.h\"\n\n@implementation RLMClassProperty\n\n- (instancetype)initWithProperty:(RLMProperty *)property isPrimaryKey:(BOOL)flag;\n{\n    if (self = [super init]) {\n        _property = property;\n        _isPrimaryKey = flag;\n    }\n    return self;\n}\n\n- (NSString *)name\n{\n    return _property.name;\n}\n\n- (RLMPropertyType)type\n{\n    return _property.type;\n}\n\n- (Class)class\n{\n    switch (self.type) {\n        case RLMPropertyTypeBool:\n        case RLMPropertyTypeInt:\n        case RLMPropertyTypeFloat:\n        case RLMPropertyTypeDouble:\n            return [NSNumber class];\n        case RLMPropertyTypeString:\n            return [NSString class];\n        case RLMPropertyTypeDate:\n            return [NSDate class];\n        case RLMPropertyTypeData:\n        case RLMPropertyTypeObject:\n        case RLMPropertyTypeAny:\n            return [RLMClassNode class];\n        default:\n            return nil;\n    }\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMDocument.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n@import Realm;\n\n#import \"RLMRealmNode.h\"\n\ntypedef NS_ENUM(NSInteger, RLMDocumentState) {\n    RLMDocumentStateRequiresFormatUpgrade,\n    RLMDocumentStateNeedsEncryptionKey,\n    RLMDocumentStateNeedsValidCredentials,\n    RLMDocumentStateLoading,\n    RLMDocumentStateLoaded,\n    RLMDocumentStateUnrecoverableError\n};\n\n@interface RLMDocument : NSDocument\n\n@property (nonatomic, assign) RLMDocumentState state;\n@property (nonatomic, strong) IBOutlet RLMRealmNode *presentedRealm;\n\n@property (nonatomic, copy, readonly) NSURL *syncURL;\n@property (nonatomic, copy, readonly) NSURL *authServerURL;\n@property (nonatomic, strong, readonly) RLMSyncCredentials *credentials;\n@property (nonatomic, strong, readonly) NSError *error;\n\n- (instancetype)initWithContentsOfFileURL:(NSURL *)fileURL error:(NSError **)outError;\n- (instancetype)initWithContentsOfSyncURL:(NSURL *)syncURL credentials:(RLMSyncCredentials *)credentials authServerURL:(NSURL *)authServerURL error:(NSError **)outError;\n\n- (BOOL)loadByPerformingFormatUpgradeWithError:(NSError * __autoreleasing *)error;\n- (BOOL)loadWithEncryptionKey:(NSData *)key error:(NSError * __autoreleasing *)error;\n- (void)loadWithCredentials:(RLMSyncCredentials *)credentials completionHandler:(void (^)(NSError *error))completionHandler;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMDocument.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import AppSandboxFileAccess;\n@import Realm.Private;\n\n#import \"RLMDocument.h\"\n#import \"RLMBrowserConstants.h\"\n#import \"RLMRealmBrowserWindowController.h\"\n#import \"RLMSyncUtils.h\"\n\n@interface RLMDocument ()\n\n@property (nonatomic, strong) NSURL *securityScopedURL;\n\n@property (nonatomic, copy) NSURL *syncURL;\n@property (nonatomic, copy) NSURL *authServerURL;\n@property (nonatomic, strong) RLMSyncCredentials *credentials;\n@property (nonatomic, strong) NSError *error;\n\n@property (nonatomic, strong) RLMSyncUser *user;\n\n@end\n\n@implementation RLMDocument\n\n- (instancetype)initWithContentsOfURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSError **)outError\n{\n    if (![typeName.lowercaseString isEqualToString:kRealmUTIIdentifier]) {\n        return nil;\n    }\n\n    if (absoluteURL.isFileURL) {\n        return [self initWithContentsOfFileURL:absoluteURL error:outError];\n    } else {\n        return [self initWithContentsOfSyncURL:absoluteURL credentials:nil authServerURL:nil error:outError];\n    }\n}\n\n- (instancetype)initWithContentsOfFileURL:(NSURL *)fileURL error:(NSError **)outError {\n    if (![fileURL.pathExtension.lowercaseString isEqualToString:kRealmFileExtension]) {\n        return nil;\n    }\n\n    BOOL isDir = NO;\n    if (!([[NSFileManager defaultManager] fileExistsAtPath:fileURL.path isDirectory:&isDir] && isDir == NO)) {\n        return nil;\n    }\n\n    NSURL *folderURL = fileURL.URLByDeletingLastPathComponent;\n\n    self = [super init];\n\n    if (self != nil) {\n        self.fileURL = fileURL;\n\n        // In case we're trying to open Realm file located in app's container directory there is no reason to ask access permissions\n        if (![[NSFileManager defaultManager] isWritableFileAtPath:folderURL.path]) {\n            [[AppSandboxFileAccess fileAccess] requestAccessPermissionsForFileURL:folderURL persistPermission:YES withBlock:^(NSURL *securityScopedFileURL, NSData *bookmarkData) {\n                self.securityScopedURL = securityScopedFileURL;\n            }];\n\n            if (self.securityScopedURL == nil) {\n                return nil;\n            }\n        }\n\n        [self.securityScopedURL startAccessingSecurityScopedResource];\n\n        self.presentedRealm = [[RLMRealmNode alloc] initWithFileURL:self.fileURL];\n\n        if (![self loadWithError:outError] && self.state == RLMDocumentStateUnrecoverableError) {\n            return nil;\n        }\n    }\n\n    return self;\n}\n\n- (instancetype)initWithContentsOfSyncURL:(NSURL *)syncURL credentials:(RLMSyncCredentials *)credentials authServerURL:(NSURL *)authServerURL error:(NSError **)outError {\n    self = [super init];\n\n    if (self != nil) {\n        self.syncURL = syncURL;\n        self.authServerURL = authServerURL ?: authServerURLForSyncURL(syncURL);\n        self.state = RLMDocumentStateNeedsValidCredentials;\n\n        if (credentials != nil) {\n            [self loadWithCredentials:credentials completionHandler:nil];\n        }\n    }\n\n    return self;\n}\n\n- (void)dealloc {\n    if (self.securityScopedURL != nil) {\n        //In certain instances, RLMRealm's C++ destructor method will attempt to clean up\n        //specific auxiliary files belonging to this realm file.\n        //If the destructor call occurs after the access to the sandbox resource has been released here,\n        //and it attempts to delete any files, RLMRealm will throw an exception.\n        //Mac OS X apps only have a finite number of open sandbox resources at any given time, so while it's not necessary\n        //to release them straight away, it is still good practice to do so eventually.\n        //As such, this will release the handle a minute, after closing the document.\n        NSURL *scopedURL = self.securityScopedURL;\n        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(60 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{\n            [scopedURL stopAccessingSecurityScopedResource];\n        });\n    }\n}\n\n- (BOOL)loadByPerformingFormatUpgradeWithError:(NSError **)error {\n    NSAssert(self.state == RLMDocumentStateRequiresFormatUpgrade, @\"Invalid document state\");\n\n    self.presentedRealm.disableFormatUpgrade = NO;\n\n    return [self loadWithError:error];\n}\n\n- (BOOL)loadWithEncryptionKey:(NSData *)key error:(NSError **)error {\n    NSAssert(self.state == RLMDocumentStateNeedsEncryptionKey, @\"Invalid document state\");\n\n    self.presentedRealm.encryptionKey = key;\n\n    return [self loadWithError:error];\n}\n\n- (void)loadWithCredentials:(RLMSyncCredentials *)credentials completionHandler:(void (^)(NSError *error))completionHandler {\n    // Workaround for access token auth, state will be set to RLMDocumentStateUnrecoverableError in case of invalid token\n    NSAssert(self.state == RLMDocumentStateNeedsValidCredentials || self.state == RLMDocumentStateUnrecoverableError, @\"Invalid document state\");\n\n    completionHandler = completionHandler ?: ^(NSError *error) {};\n\n    self.credentials = credentials;\n    self.state = RLMDocumentStateLoading;\n\n    __weak typeof(self) weakSelf = self;\n    [RLMSyncUser logInWithCredentials:self.credentials authServerURL:self.authServerURL onCompletion:^(RLMSyncUser *user, NSError *error) {\n        dispatch_async(dispatch_get_main_queue(), ^{\n            if (!weakSelf) {\n                return;\n            } else if (user == nil) {\n                weakSelf.state = RLMDocumentStateNeedsValidCredentials;\n\n                // FIXME: workaround for https://github.com/realm/realm-cocoa-private/issues/204\n                if (error.code == RLMSyncAuthErrorHTTPStatusCodeError && [[error.userInfo valueForKey:@\"statusCode\"] integerValue] == 400) {\n                    NSMutableDictionary *userInfo = [error.userInfo mutableCopy];\n\n                    [userInfo setValue:@\"Invalid credentials.\" forKey:NSLocalizedDescriptionKey];\n                    [userInfo setValue:@\"Please check your authentication credentials and that you have an access to the specified URL.\" forKey:NSLocalizedRecoverySuggestionErrorKey];\n\n                    NSError *authenticationError = [[NSError alloc] initWithDomain:error.domain code:error.code userInfo:userInfo];\n\n                    completionHandler(authenticationError);\n                } else {\n                    completionHandler(error);\n                }\n            } else {\n                weakSelf.user = user;\n\n                RLMRealmConfiguration *configuration = [[RLMRealmConfiguration alloc] init];\n                configuration.dynamic = YES;\n                configuration.syncConfiguration = [[RLMSyncConfiguration alloc] initWithUser:weakSelf.user realmURL:weakSelf.syncURL];\n                configuration.syncConfiguration.enableSSLValidation = NO;\n\n                [RLMRealm asyncOpenWithConfiguration:configuration callbackQueue:dispatch_get_main_queue() callback:^(RLMRealm *realm, NSError *error) {\n                    if (!weakSelf) {\n                        return;\n                    } else if (error) {\n                        weakSelf.state = RLMDocumentStateUnrecoverableError;\n                    } else {\n                        weakSelf.presentedRealm = [[RLMRealmNode alloc] initWithConfiguration:configuration];\n\n                        [weakSelf loadWithError:&error];\n                    }\n\n                    completionHandler(error);\n                }];\n            }\n        });\n    }];\n}\n\n- (BOOL)loadWithError:(NSError **)outError {\n    NSAssert(self.presentedRealm != nil, @\"Presented Realm must be created before loading\");\n\n    NSError *error;\n    if ([self.presentedRealm connect:&error]) {\n        self.state = RLMDocumentStateLoaded;\n        self.error = nil;\n\n        return YES;\n    } else {\n        switch (error.code) {\n            case RLMErrorFileAccess:\n            self.state = RLMDocumentStateNeedsEncryptionKey;\n            break;\n\n            case RLMErrorFileFormatUpgradeRequired:\n            self.state = RLMDocumentStateRequiresFormatUpgrade;\n            break;\n            \n            default:\n            self.state = RLMDocumentStateUnrecoverableError;\n            break;\n        }\n\n        self.error = error;\n\n        if (outError != nil) {\n            *outError = error;\n        }\n\n        return NO;\n    }\n}\n\n#pragma mark NSDocument overrides\n\n- (void)makeWindowControllers\n{\n    RLMRealmBrowserWindowController *windowController = [[RLMRealmBrowserWindowController alloc] initWithWindowNibName:self.windowNibName];\n    [self addWindowController:windowController];\n}\n\n- (NSString *)windowNibName\n{\n    return @\"RLMDocument\";\n}\n\n- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError\n{\n    // As we do not use the usual file handling mechanism we just returns nil (but it is necessary\n    // to override this method as the default implementation throws an exception.\n    return nil;\n}\n\n- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError\n{\n    // As we do not use the usual file handling mechanism we just returns YES (but it is necessary\n    // to override this method as the default implementation throws an exception.\n    return YES;\n}\n\n- (NSString *)displayName\n{\n    return self.syncURL ? self.syncURL.absoluteString : self.fileURL.lastPathComponent.stringByDeletingPathExtension;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMNavigationStack.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n\n#import \"RLMNavigationState.h\"\n#import \"RLMArrayNavigationState.h\"\n#import \"RLMQueryNavigationState.h\"\n\n@interface RLMNavigationStack : NSObject\n\n@property (nonatomic, readonly) RLMNavigationState *currentState;\n\n- (void)reset;\n\n- (RLMNavigationState *)pushStateWithTypeNode:(RLMTypeNode *)typeNode index:(NSInteger)selectionIndex;\n\n- (RLMArrayNavigationState *)pushStateWithTypeNode:(RLMTypeNode *)typeNode index:(NSInteger)selectionIndex property:(RLMProperty *)property;\n\n- (void)pushState:(RLMNavigationState *)state;\n\n- (RLMNavigationState *)navigateBackward;\n\n- (RLMNavigationState *)navigateForward;\n\n- (BOOL)canNavigateBackward;\n\n- (BOOL)canNavigateForward;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMNavigationStack.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMNavigationStack.h\"\n\n@implementation RLMNavigationStack {\n\n    NSMutableArray *stack;\n    NSInteger index;\n}\n\n- (instancetype)init\n{\n    if (self = [super init]) {\n        stack = [[NSMutableArray alloc] initWithCapacity:200];\n        index = -1;\n    }\n    return  self;\n}\n\n- (void)reset\n{\n    [stack removeAllObjects];\n    index = -1;\n}\n\n- (RLMNavigationState *)currentState\n{\n    if (0 <= index && index < stack.count ) {\n        return stack[index];\n    }\n    \n    return nil;\n}\n\n- (RLMNavigationState *)pushStateWithTypeNode:(RLMTypeNode *)typeNode index:(NSInteger)selectionIndex\n{\n    RLMNavigationState *state = [[RLMNavigationState alloc] initWithSelectedType:typeNode\n                                                                            index:selectionIndex];\n    [self pushState:state];\n    \n    return state;\n}\n\n- (RLMArrayNavigationState *)pushStateWithTypeNode:(RLMTypeNode *)typeNode index:(NSInteger)selectionIndex property:(RLMProperty *)property\n{\n    RLMArrayNavigationState *state = [[RLMArrayNavigationState alloc] initWithSelectedType:typeNode\n                                                                                 typeIndex:selectionIndex\n                                                                                  property:property\n                                                                                arrayIndex:0];\n    [self pushState:state];\n    \n    return state;\n}\n\n- (void)pushState:(RLMNavigationState *)state\n{\n    NSInteger lastIndex = (NSInteger)stack.count - 1;\n    if (index < lastIndex) {\n        [stack removeObjectsInRange:NSMakeRange(index, stack.count - index - 1)];\n    }\n    \n    [stack addObject:state];\n    index++;\n}\n\n- (RLMNavigationState *)navigateBackward\n{\n    if (index > 0) {\n        index--;\n        return stack[index];\n    }\n    return nil;\n}\n\n- (RLMNavigationState *)navigateForward\n{\n    if (index < stack.count - 1) {\n        index++;\n        return stack[index];\n    }\n    return nil;\n}\n\n- (BOOL)canNavigateBackward\n{\n    return stack.count > 1 && index > 0;\n}\n\n- (BOOL)canNavigateForward\n{\n    return stack.count > 1 && index < stack.count - 1;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMNavigationState.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n\n#import \"RLMTypeNode.h\"\n\n@interface RLMNavigationState : NSObject\n\n@property (nonatomic, readonly) RLMTypeNode *selectedType;\n@property (nonatomic, readonly) NSInteger selectedInstanceIndex;\n\n- (instancetype)initWithSelectedType:(RLMTypeNode *)type index:(NSInteger)index;\n\n- (void)updateSelectionToIndex:(NSInteger)index;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMNavigationState.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMNavigationState.h\"\n\n@implementation RLMNavigationState\n\n- (instancetype)initWithSelectedType:(RLMTypeNode *)type index:(NSInteger)index\n{\n    if (self = [super init]) {\n        _selectedType = type;\n        _selectedInstanceIndex = index;\n    }\n    \n    return self;\n}\n\n- (void)updateSelectionToIndex:(NSInteger)index\n{\n    _selectedInstanceIndex = index;\n}\n\n- (BOOL)isEqualTo:(id)object\n{\n    if ([object isKindOfClass:[self class]]) {\n        RLMNavigationState *comparedState = (RLMNavigationState *)object;\n        BOOL result = self.selectedType == comparedState.selectedType &&\n                      self.selectedInstanceIndex == comparedState.selectedInstanceIndex;\n        \n        return result;\n    }\n    \n    return NO;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMObjectNode.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTypeNode.h\"\n\n@class RLMArrayNode;\n@interface RLMObjectNode : RLMTypeNode\n\n@property (nonatomic) id<RLMRealmOutlineNode> childNode;\n@property (nonatomic) id<RLMRealmOutlineNode> parentNode;\n\n- (instancetype)initWithObject:(RLMObject *)object realm:(RLMRealm *)realm;\n- (RLMArrayNode *)displayChildArrayFromProperty:(RLMProperty *)property object:(RLMObject *)object;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMObjectNode.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMObjectNode.h\"\n#import \"RLMSidebarTableCellView.h\"\n#import \"RLMArrayNode.h\"\n#import \"RLMDescriptions.h\"\n\n@interface RLMObjectNode ()\n\n@property (nonatomic) RLMObject *object;\n@property (nonatomic) RLMDescriptions *realmDescriptions;\n\n@end\n\n\n@implementation RLMObjectNode {\n    NSMutableArray *displayedArrays;\n}\n\n- (instancetype)initWithObject:(RLMObject *)object realm:(RLMRealm *)realm\n{\n    NSString *elementTypeName = object.className;\n    RLMSchema *realmSchema = realm.schema;\n    RLMObjectSchema *elementSchema = [realmSchema schemaForClassName:elementTypeName];\n    \n    if (self = [super initWithSchema:elementSchema inRealm:realm]) {\n        displayedArrays = [[NSMutableArray alloc] initWithCapacity:10];\n        self.realmDescriptions = [[RLMDescriptions alloc] init];\n        \n        self.object = object;\n    }\n    \n    return self;\n}\n\n- (BOOL)isExpandable\n{\n    return YES;\n}\n\n- (NSUInteger)numberOfChildNodes\n{\n    return 1;\n}\n\n- (id<RLMRealmOutlineNode>)childNodeAtIndex:(NSUInteger)index\n{\n    return self.childNode;\n}\n\n- (RLMArrayNode *)displayChildArrayFromProperty:(RLMProperty *)property object:(RLMObject *)object\n{\n    RLMArrayNode *arrayNode = [[RLMArrayNode alloc] initWithReferringProperty:property onObject:object realm:self.realm];\n    \n    if (displayedArrays.count == 0) {\n        [displayedArrays addObject:arrayNode];\n    }\n    else {\n        [displayedArrays replaceObjectAtIndex:0 withObject:arrayNode];\n    }\n    \n    return arrayNode;\n}\n\n- (NSView *)cellViewForTableView:(NSTableView *)tableView\n{\n    RLMSidebarTableCellView *result = [tableView makeViewWithIdentifier:@\"MainCell\" owner:self];\n    \n    result.textField.stringValue = [self.realmDescriptions descriptionOfObject:self.object];\n    result.button.hidden = YES;\n    \n    return result;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMQueryNavigationState.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMNavigationState.h\"\n\n#import \"RLMArrayNode.h\"\n\n@interface RLMQueryNavigationState : RLMNavigationState\n\n@property (nonatomic, readonly) RLMResults *results;\n@property (nonatomic, readonly) NSString *searchText;\n\n- (instancetype)initWithQuery:(NSString*)searchText type:(RLMTypeNode *)type results:(RLMResults *)results;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMQueryNavigationState.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMQueryNavigationState.h\"\n\n@implementation RLMQueryNavigationState\n\n- (instancetype)initWithQuery:(NSString*)searchText type:(RLMTypeNode *)type results:(RLMResults *)results;\n{\n    if (self = [super initWithSelectedType:type\n                                     index:0]) {\n        _results = results;\n        _searchText = searchText;\n    }\n\n    return self;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMRealmNode.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n@import Realm;\n\n#import \"RLMClassNode.h\"\n#import \"RLMRealmOutlineNode.h\"\n\n@interface RLMRealmNode : NSObject <RLMRealmOutlineNode>\n\n@property (nonatomic, readonly) RLMRealm *realm;\n@property (nonatomic, readonly) NSArray *topLevelClasses;\n\n@property (nonatomic, strong) NSData *encryptionKey;\n@property (nonatomic, assign) BOOL disableFormatUpgrade;\n\n- (instancetype)initWithConfiguration:(RLMRealmConfiguration *)configuration;\n- (instancetype)initWithFileURL:(NSURL *)fileURL;\n- (instancetype)initWithSyncURL:(NSURL *)syncURL user:(RLMSyncUser *)user;\n\n- (BOOL)connect:(NSError **)error;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMRealmNode.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Realm.Private;\n@import Realm.Dynamic;\n\n#import \"RLMRealmNode.h\"\n\n@interface RLMRealmNode ()\n\n@property (nonatomic, strong) RLMRealmConfiguration *configuration;\n\n@end\n\n@implementation RLMRealmNode\n\n- (instancetype)initWithConfiguration:(RLMRealmConfiguration *)configuration {\n    self = [super init];\n\n    if (self) {\n        self.configuration = configuration;\n    }\n\n    return self;\n}\n\n- (instancetype)initWithFileURL:(NSURL *)fileURL {\n    RLMRealmConfiguration *configuration = [[RLMRealmConfiguration alloc] init];\n    configuration.dynamic = YES;\n    configuration.fileURL = fileURL;\n\n    self = [self initWithConfiguration:configuration];\n\n    if (self) {\n        self.disableFormatUpgrade = YES;\n    }\n\n    return self;\n}\n\n- (instancetype)initWithSyncURL:(NSURL *)syncURL user:(RLMSyncUser *)user {\n    RLMRealmConfiguration *configuration = [[RLMRealmConfiguration alloc] init];\n    configuration.dynamic = YES;\n    configuration.syncConfiguration = [[RLMSyncConfiguration alloc] initWithUser:user realmURL:syncURL];\n    configuration.syncConfiguration.enableSSLValidation = NO;\n\n    return [self initWithConfiguration:configuration];\n}\n\n- (BOOL)connect:(NSError **)error {\n    self.configuration.encryptionKey = self.encryptionKey;\n    self.configuration.disableFormatUpgrade = self.disableFormatUpgrade;\n\n    NSError *localError;\n    _realm = [RLMRealm realmWithConfiguration:self.configuration error:&localError];\n\n    if (localError) {\n        NSLog(@\"Realm was opened with error: %@\", localError);\n    } else {\n        _topLevelClasses = [self constructTopLevelClasses];\n    }\n\n    if (error) {\n        *error = localError;\n    }\n\n    return !localError;\n}\n\n#pragma mark - RLMRealmOutlineNode implementation\n\n- (BOOL)isRootNode\n{\n    return YES;\n}\n\n- (BOOL)isExpandable\n{\n    return self.topLevelClasses.count != 0;\n}\n\n- (NSUInteger)numberOfChildNodes\n{\n    return self.topLevelClasses.count;\n}\n\n- (id<RLMRealmOutlineNode>)childNodeAtIndex:(NSUInteger)index\n{\n    return self.topLevelClasses[index];\n}\n\n- (BOOL)hasToolTip\n{\n    return YES;\n}\n\n- (NSString *)toolTipString\n{\n    return self.configuration.fileURL.path;\n}\n\n- (NSView *)cellViewForTableView:(NSTableView *)tableView\n{\n    NSTableCellView *headerView = [tableView makeViewWithIdentifier:@\"HeaderCell\" owner:self];\n    \n    headerView.textField.stringValue = @\"Models\";\n    \n    return headerView;\n}\n\n#pragma mark - Private methods\n\n- (NSArray *)constructTopLevelClasses\n{\n    RLMSchema *realmSchema = _realm.schema;\n    NSArray *objectSchemas = realmSchema.objectSchema;\n\n    NSMutableArray *result = [[NSMutableArray alloc] initWithCapacity:objectSchemas.count];\n    \n    for (RLMObjectSchema *objectSchema in objectSchemas) {\n        if (objectSchema.properties.count > 0) {\n            RLMClassNode *tableNode = [[RLMClassNode alloc] initWithSchema:objectSchema inRealm:_realm];\n            [result addObject:tableNode];\n        }\n    }\n\n    [result sortUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:@\"name\" ascending:YES]]];\n\n    return result;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMRealmOutlineNode.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n@import Cocoa;\n\n@protocol RLMRealmOutlineNode <NSObject>\n\n- (BOOL)isRootNode;\n\n- (BOOL)isExpandable;\n\n- (NSUInteger)numberOfChildNodes;\n\n- (id<RLMRealmOutlineNode>)childNodeAtIndex:(NSUInteger)index;\n\n- (NSView *)cellViewForTableView:(NSTableView *)tableView;\n\n@optional\n\n- (BOOL)hasToolTip;\n\n- (NSString *)toolTipString;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMResultsNode.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTypeNode.h\"\n\n@interface RLMResultsNode : RLMTypeNode\n\n- (instancetype)initWithQuery:(NSString *)searchText result:(RLMResults *)result andParent:(RLMTypeNode *)classNode;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMResultsNode.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMResultsNode.h\"\n#import \"RLMSidebarTableCellView.h\"\n\n@implementation RLMResultsNode {\n    RLMResults *displayedResults;\n    NSString *name;\n}\n\n- (instancetype)initWithQuery:(NSString *)searchText result:(RLMResults *)result andParent:(RLMTypeNode *)classNode\n{\n    if (self = [super initWithSchema:classNode.schema inRealm:classNode.realm]) {\n        displayedResults = result;\n        name = searchText;\n    }\n    \n    return self;\n}\n\n- (NSView *)cellViewForTableView:(NSTableView *)tableView\n{\n    RLMSidebarTableCellView *cellView = [tableView makeViewWithIdentifier:@\"MainCell\" owner:self];\n    if (name) {\n        cellView.textField.stringValue = [NSString stringWithFormat:@\"\\\"%@\\\"\", name];\n    }\n    \n    cellView.button.title = [NSString stringWithFormat:@\"%lu\", [self instanceCount]];\n    [[cellView.button cell] setHighlightsBy:0];\n    cellView.button.hidden = NO;\n    \n    return cellView;\n}\n\n- (NSUInteger)instanceCount\n{\n    return displayedResults.count;\n}\n\n- (RLMObject *)instanceAtIndex:(NSUInteger)index\n{\n    return displayedResults[index];\n}\n\n- (BOOL)isObject\n{\n    return YES;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMTableColumn.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n#import \"RLMTypeNode.h\"\n\n@interface RLMTableColumn : NSTableColumn\n\n@property (nonatomic) RLMPropertyType propertyType;\n\n- (CGFloat)sizeThatFitsWithLimit:(BOOL)limited;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMTableColumn.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTableColumn.h\"\n#import \"RLMTableCellView.h\"\n\n@implementation RLMTableColumn\n\nconst NSUInteger kMaxNumberOfRowsToConsider = 50;\nconst CGFloat kMaxColumnWidth = 200.0;\n\n- (CGFloat)sizeThatFitsWithLimit:(BOOL)limited\n{\n    int rowsToConsider;\n    \n    switch (self.propertyType) {\n        case RLMPropertyTypeBool:\n        case RLMPropertyTypeData:\n        case RLMPropertyTypeAny:\n            rowsToConsider = 1;\n            break;\n            \n        case RLMPropertyTypeObject:\n        case RLMPropertyTypeDate:\n        case RLMPropertyTypeLinkingObjects:\n            rowsToConsider = 3;\n            break;\n\n        case RLMPropertyTypeInt:\n        case RLMPropertyTypeFloat:\n        case RLMPropertyTypeDouble:\n        case RLMPropertyTypeString:\n            rowsToConsider = kMaxNumberOfRowsToConsider;\n            break;\n    }\n\n    NSInteger columnIndex = [self.tableView.tableColumns indexOfObject:self];\n\n    if (self.tableView.numberOfRows == 0) {\n        [self.tableView reloadData];\n    }\n    \n    CGFloat maxWidth = 0.0;\n\n    for (NSInteger rowIndex = 0; rowIndex < MIN(rowsToConsider, self.tableView.numberOfRows); rowIndex++) {\n        RLMTableCellView *tableCellView = [self.tableView viewAtColumn:columnIndex row:rowIndex makeIfNecessary:YES];\n        maxWidth = MAX(maxWidth, tableCellView.fittingSize.width);\n    }\n    \n    NSCell *headerCell = self.headerCell;\n    NSRect rect = NSMakeRect(0,0, INFINITY, self.tableView.rowHeight);\n    NSSize headerSize = [headerCell cellSizeForBounds:rect];\n\n    maxWidth = MAX(maxWidth + 10.0f, headerSize.width*1.1);\n    \n    if (limited) {\n        maxWidth = MIN(maxWidth, kMaxColumnWidth);\n    }\n    \n    return maxWidth;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMTypeNode.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n@import Realm;\n\n#import \"RLMRealmOutlineNode.h\"\n#import \"RLMClassProperty.h\"\n\n@interface RLMTypeNode : NSObject <RLMRealmOutlineNode>\n\n@property (nonatomic, readonly) RLMRealm *realm;\n@property (nonatomic, readonly) RLMObjectSchema *schema;\n@property (nonatomic, readonly) NSString *name;\n@property (nonatomic, readonly) NSArray *propertyColumns;\n@property (nonatomic, readonly) NSUInteger instanceCount;\n\n@property (nonatomic, readonly) BOOL isInvalidated;\n@property (nonatomic, readonly) BOOL isObject;\n\n- (instancetype)initWithSchema:(RLMObjectSchema *)schema inRealm:(RLMRealm *)realm;\n\n- (RLMObject *)instanceAtIndex:(NSUInteger)index;\n\n- (NSUInteger)indexOfInstance:(RLMObject *)instance;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Models/RLMTypeNode.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTypeNode.h\"\n\n@implementation RLMTypeNode\n\n@dynamic name;\n@dynamic instanceCount;\n\n- (instancetype)initWithSchema:(RLMObjectSchema *)schema inRealm:(RLMRealm *)realm\n{\n    if (self = [super init]) {\n        _realm = realm;\n        _schema = schema;\n        _propertyColumns = [self constructColumnObjectsForScheme:schema];\n    }\n    return self;\n}\n\n#pragma mark - RLMRealmOutlineNode implementation\n\n- (BOOL)isRootNode\n{\n    return NO; // Default implementation - should be overridden by subclasses.\n}\n\n- (BOOL)isExpandable\n{\n    return NO; // Default implementation - should be overridden by subclasses.\n}\n\n- (NSUInteger)numberOfChildNodes\n{\n    return 0; // Default implementation - should be overridden by subclasses.\n}\n\n- (id<RLMRealmOutlineNode>)childNodeAtIndex:(NSUInteger)index\n{\n    return nil; // Default implementation - should be overridden by subclasses.\n}\n\n- (id)nodeElementForColumnWithIndex:(NSInteger)index\n{\n    return nil; // Default implementation - should be overridden by subclasses.\n}\n\n- (NSView *)cellViewForTableView:(NSTableView *)tableView\n{\n    return nil; // Default implementation - should be overridden by subclasses.    \n}\n\n#pragma mark - Public methods - Accessors\n\n- (NSString *)name\n{\n    return @\"\"; // Default implementation - should be overridden by subclasses.\n}\n\n- (NSUInteger)instanceCount\n{\n    return 0; // Default implementation - should be overridden by subclasses.\n}\n\n- (BOOL)isInvalidated\n{\n    return NO;\n}\n\n- (BOOL)isObject\n{\n    return YES;\n}\n\n#pragma mark - Public methods\n\n- (RLMObject *)instanceAtIndex:(NSUInteger)index\n{\n    return nil; // Default implementation - should be overridden by subclasses.\n}\n\n- (NSUInteger)indexOfInstance:(RLMObject *)instance\n{\n    return 0; // Default implementation - should be overridden by subclasses.\n}\n\n#pragma mark - Private methods\n\n- (NSArray *)constructColumnObjectsForScheme:(RLMObjectSchema *)schema;\n{\n    NSArray *properties = schema.properties;\n    NSUInteger propertyCount = properties.count;\n    \n    NSMutableArray *result = [[NSMutableArray alloc] initWithCapacity:propertyCount];\n    for (NSUInteger index = 0; index < propertyCount; index++) {\n        RLMProperty *property = properties[index];\n        BOOL isPrimaryKey = [schema.primaryKeyProperty isEqualToProperty:property];\n        RLMClassProperty *tableColumn = [[RLMClassProperty alloc] initWithProperty:property isPrimaryKey:isPrimaryKey];\n        [result addObject:tableColumn];\n    }\n    \n    return result;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Resources/Documents/en.lproj/Credits.rtf",
    "content": "{\\rtf1\\ansi\\ansicpg1252\\cocoartf1347\\cocoasubrtf570\n{\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica;}\n{\\colortbl;\\red255\\green255\\blue255;}\n\\paperw11900\\paperh16840\\vieww17700\\viewh10020\\viewkind0\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\sl360\\slmult1\\qc\n\n\\f0\\b\\fs24 \\cf0 Third Party Acknowledgements\\\n\\pard\\tx560\\tx1120\\tx1680\\tx2240\\tx2800\\tx3360\\tx3920\\tx4480\\tx5040\\tx5600\\tx6160\\tx6720\\sl360\\slmult1\\pardirnatural\\qc\n\n\\b0\\fs22 \\cf0 AppSandboxFileAccess by Leigh McCulloch\n\\fs24 \\\n}"
  },
  {
    "path": "RealmBrowser/Resources/Images.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"size\" : \"16x16\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmBrowserAppIcon16x16.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"16x16\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmBrowserAppIcon16x16@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"32x32\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmBrowserAppIcon32x32.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"32x32\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmBrowserAppIcon32x32@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"128x128\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmBrowserAppIcon128x128.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"128x128\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmBrowserAppIcon128x128@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"256x256\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmBrowserAppIcon256x256.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"256x256\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmBrowserAppIcon256x256@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"512x512\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmBrowserAppIcon512x512.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"512x512\",\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmBrowserAppIcon512x512@2x.png\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "RealmBrowser/Resources/Images.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "RealmBrowser/Resources/Images.xcassets/Mavericks10.9.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-17.png\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-18.png\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-39.png\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-38.png\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-48.png\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-49.png\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-19.png\",\n      \"language-direction\" : \"right-to-left\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-20.png\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"language-direction\" : \"right-to-left\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-37.png\",\n      \"language-direction\" : \"right-to-left\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-36.png\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"language-direction\" : \"right-to-left\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-50.png\",\n      \"language-direction\" : \"right-to-left\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-51.png\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"language-direction\" : \"right-to-left\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-21.png\",\n      \"width-class\" : \"regular\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-22.png\",\n      \"width-class\" : \"regular\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-35.png\",\n      \"width-class\" : \"regular\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-34.png\",\n      \"width-class\" : \"regular\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-52.png\",\n      \"width-class\" : \"regular\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-53.png\",\n      \"width-class\" : \"regular\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"language-direction\" : \"right-to-left\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-23.png\",\n      \"width-class\" : \"regular\",\n      \"language-direction\" : \"right-to-left\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"language-direction\" : \"right-to-left\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"idiom\" : \"universal\",\n      \"width-class\" : \"regular\",\n      \"filename\" : \"apple-16.png\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-33.png\",\n      \"width-class\" : \"regular\",\n      \"language-direction\" : \"right-to-left\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"language-direction\" : \"right-to-left\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"idiom\" : \"universal\",\n      \"width-class\" : \"regular\",\n      \"filename\" : \"apple-32.png\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"apple-54.png\",\n      \"width-class\" : \"regular\",\n      \"language-direction\" : \"right-to-left\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"language-direction\" : \"right-to-left\",\n      \"graphics-feature-set\" : \"metal1v2\",\n      \"idiom\" : \"universal\",\n      \"width-class\" : \"regular\",\n      \"filename\" : \"apple-55.png\",\n      \"height-class\" : \"regular\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "RealmBrowser/Resources/Images.xcassets/RealmLocked.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmLocked.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmLocked@2x.png\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "RealmBrowser/Resources/Images.xcassets/RealmUnlocked.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmUnlocked.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"mac\",\n      \"filename\" : \"RealmUnlocked@2x.png\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "RealmBrowser/Resources/UI/Base.lproj/EncryptionKeyWindow.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"16A323\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMEncryptionKeyWindowController\">\n            <connections>\n                <outlet property=\"keyTextField\" destination=\"YEA-96-Ofv\" id=\"g89-Gw-GuT\"/>\n                <outlet property=\"okayButton\" destination=\"McO-QZ-coV\" id=\"EK4-Vm-sDT\"/>\n                <outlet property=\"window\" destination=\"QvC-M9-y7g\" id=\"ypd-fU-j9O\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <window title=\"Enter Realm Encryption Key\" allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" oneShot=\"NO\" releasedWhenClosed=\"NO\" visibleAtLaunch=\"NO\" animationBehavior=\"default\" id=\"QvC-M9-y7g\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <windowPositionMask key=\"initialPositionMask\" leftStrut=\"YES\" rightStrut=\"YES\" topStrut=\"YES\" bottomStrut=\"YES\"/>\n            <rect key=\"contentRect\" x=\"564\" y=\"438\" width=\"422\" height=\"216\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"1280\" height=\"800\"/>\n            <view key=\"contentView\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"422\" height=\"216\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" setsMaxLayoutWidthAtFirstLayout=\"YES\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"FwU-VW-Atp\">\n                        <rect key=\"frame\" x=\"18\" y=\"179\" width=\"386\" height=\"17\"/>\n                        <textFieldCell key=\"cell\" sendsActionOnEndEditing=\"YES\" title=\"Please enter a valid encryption key for this Realm file.\" id=\"fT6-nk-ebe\">\n                            <font key=\"font\" metaFont=\"systemBold\"/>\n                            <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                    </textField>\n                    <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" setsMaxLayoutWidthAtFirstLayout=\"YES\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"DKP-My-LLz\">\n                        <rect key=\"frame\" x=\"18\" y=\"143\" width=\"386\" height=\"28\"/>\n                        <textFieldCell key=\"cell\" sendsActionOnEndEditing=\"YES\" title=\"The encryption key must be entered as a 128-character string of hexadecimal values.\" id=\"s3g-jW-WhF\">\n                            <font key=\"font\" metaFont=\"smallSystem\"/>\n                            <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                    </textField>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"McO-QZ-coV\">\n                        <rect key=\"frame\" x=\"335\" y=\"13\" width=\"73\" height=\"32\"/>\n                        <buttonCell key=\"cell\" type=\"push\" title=\"Open\" bezelStyle=\"rounded\" alignment=\"center\" enabled=\"NO\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"ha8-hF-EnU\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nDQ\n</string>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"okayButtonClicked:\" target=\"-2\" id=\"Ok0-Jw-dZk\"/>\n                        </connections>\n                    </button>\n                    <textField verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"YEA-96-Ofv\">\n                        <rect key=\"frame\" x=\"20\" y=\"55\" width=\"382\" height=\"80\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"80\" id=\"U1V-5V-BKD\"/>\n                            <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"300\" id=\"iyh-7g-FXH\"/>\n                        </constraints>\n                        <textFieldCell key=\"cell\" lineBreakMode=\"charWrapping\" selectable=\"YES\" editable=\"YES\" sendsActionOnEndEditing=\"YES\" state=\"on\" borderStyle=\"bezel\" alignment=\"left\" placeholderString=\"efa373ad146cd28f...\" drawsBackground=\"YES\" id=\"IIl-JF-ZUE\">\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <color key=\"textColor\" name=\"textColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                        <connections>\n                            <outlet property=\"delegate\" destination=\"-2\" id=\"RbU-yc-Puc\"/>\n                        </connections>\n                    </textField>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"767-HS-feX\">\n                        <rect key=\"frame\" x=\"252\" y=\"13\" width=\"83\" height=\"32\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"width\" constant=\"71\" id=\"mhj-IN-obk\"/>\n                        </constraints>\n                        <buttonCell key=\"cell\" type=\"push\" title=\"Cancel\" bezelStyle=\"rounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"RUG-OT-Xjr\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nGw\n</string>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"closeWindow:\" target=\"-2\" id=\"Zp2-CA-8hU\"/>\n                        </connections>\n                    </button>\n                </subviews>\n                <constraints>\n                    <constraint firstItem=\"767-HS-feX\" firstAttribute=\"baseline\" secondItem=\"McO-QZ-coV\" secondAttribute=\"baseline\" id=\"3i6-9B-N4z\"/>\n                    <constraint firstItem=\"DKP-My-LLz\" firstAttribute=\"top\" secondItem=\"FwU-VW-Atp\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"4cb-U1-aJf\"/>\n                    <constraint firstItem=\"YEA-96-Ofv\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"20\" id=\"6LW-3I-i0m\"/>\n                    <constraint firstItem=\"McO-QZ-coV\" firstAttribute=\"top\" secondItem=\"YEA-96-Ofv\" secondAttribute=\"bottom\" constant=\"14\" id=\"FUh-eV-CMx\"/>\n                    <constraint firstItem=\"FwU-VW-Atp\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"20\" id=\"JtF-6g-qcD\"/>\n                    <constraint firstItem=\"DKP-My-LLz\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"20\" id=\"MM4-NZ-w3R\"/>\n                    <constraint firstAttribute=\"bottom\" secondItem=\"McO-QZ-coV\" secondAttribute=\"bottom\" constant=\"20\" id=\"Mnd-Os-0tj\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"FwU-VW-Atp\" secondAttribute=\"trailing\" constant=\"20\" symbolic=\"YES\" id=\"cJa-b1-L5d\"/>\n                    <constraint firstItem=\"YEA-96-Ofv\" firstAttribute=\"top\" secondItem=\"DKP-My-LLz\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"ch1-K2-dQV\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"DKP-My-LLz\" secondAttribute=\"trailing\" constant=\"20\" symbolic=\"YES\" id=\"eB5-1y-qDx\"/>\n                    <constraint firstItem=\"FwU-VW-Atp\" firstAttribute=\"top\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"top\" constant=\"20\" id=\"lRv-SX-GkM\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"YEA-96-Ofv\" secondAttribute=\"trailing\" constant=\"20\" id=\"rya-MM-2MH\"/>\n                    <constraint firstItem=\"McO-QZ-coV\" firstAttribute=\"leading\" secondItem=\"767-HS-feX\" secondAttribute=\"trailing\" constant=\"12\" id=\"sHf-LN-97w\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"McO-QZ-coV\" secondAttribute=\"trailing\" constant=\"20\" id=\"xvz-xQ-Hei\"/>\n                </constraints>\n            </view>\n            <point key=\"canvasLocation\" x=\"59\" y=\"195\"/>\n        </window>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowser/Resources/UI/Base.lproj/MainMenu.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"13529\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"13529\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"NSApplication\">\n            <connections>\n                <outlet property=\"delegate\" destination=\"PLw-ns-0qo\" id=\"yDV-cp-fYQ\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customObject id=\"PLw-ns-0qo\" customClass=\"RLMApplicationDelegate\">\n            <connections>\n                <outlet property=\"fileMenu\" destination=\"bib-Uj-vzu\" id=\"xMk-IQ-flg\"/>\n                <outlet property=\"openAnyRealmMenu\" destination=\"ZOZ-6y-KFJ\" id=\"vHm-DP-i8r\"/>\n                <outlet property=\"openMenuItem\" destination=\"IAo-SY-fd9\" id=\"U7H-mk-W2m\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"YLy-65-1bz\" customClass=\"NSFontManager\"/>\n        <menu title=\"Main Menu\" systemMenu=\"main\" id=\"AYu-sK-qS6\">\n            <items>\n                <menuItem title=\"Realm Browser\" id=\"1Xt-HY-uBw\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Realm Browser\" systemMenu=\"apple\" id=\"uQy-DD-JDr\">\n                        <items>\n                            <menuItem title=\"About Realm Browser\" id=\"5kV-Vb-QxS\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"orderFrontStandardAboutPanel:\" target=\"-1\" id=\"Exp-CZ-Vem\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"VOq-y0-SEH\"/>\n                            <menuItem title=\"Preferences…\" keyEquivalent=\",\" id=\"BOF-NM-1cW\"/>\n                            <menuItem isSeparatorItem=\"YES\" id=\"wFC-TO-SCJ\"/>\n                            <menuItem title=\"Services\" id=\"NMo-om-nkz\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Services\" systemMenu=\"services\" id=\"hz9-B4-Xy5\"/>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"4je-JR-u6R\"/>\n                            <menuItem title=\"Hide Realm Browser\" keyEquivalent=\"h\" id=\"Olw-nP-bQN\">\n                                <connections>\n                                    <action selector=\"hide:\" target=\"-1\" id=\"PnN-Uc-m68\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Hide Others\" keyEquivalent=\"h\" id=\"Vdr-fp-XzO\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"hideOtherApplications:\" target=\"-1\" id=\"VT4-aY-XCT\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Show All\" id=\"Kd2-mp-pUS\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"unhideAllApplications:\" target=\"-1\" id=\"Dhg-Le-xox\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"kCx-OE-vgT\"/>\n                            <menuItem title=\"Quit Realm Browser\" keyEquivalent=\"q\" id=\"4sb-4s-VLi\">\n                                <connections>\n                                    <action selector=\"terminate:\" target=\"-1\" id=\"Te7-pn-YzF\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"File\" id=\"dMs-cI-mzQ\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"File\" id=\"bib-Uj-vzu\">\n                        <items>\n                            <menuItem title=\"Open…\" keyEquivalent=\"o\" id=\"IAo-SY-fd9\">\n                                <connections>\n                                    <action selector=\"openDocument:\" target=\"-1\" id=\"bVn-NM-KNZ\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Open Recent\" id=\"tXI-mr-wws\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Open Recent\" systemMenu=\"recentDocuments\" id=\"oas-Oc-fiZ\">\n                                    <items>\n                                        <menuItem title=\"Clear Menu\" id=\"vNY-rz-j42\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"clearRecentDocuments:\" target=\"-1\" id=\"Daa-9d-B3U\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Open Common Location\" id=\"vgP-2m-quz\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Open Common Location\" id=\"ZOZ-6y-KFJ\">\n                                    <connections>\n                                        <outlet property=\"delegate\" destination=\"PLw-ns-0qo\" id=\"12y-1Y-2Xp\"/>\n                                    </connections>\n                                </menu>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"m54-Is-iLE\"/>\n                            <menuItem title=\"Open Sync URL...\" keyEquivalent=\"O\" id=\"iTJ-09-gX5\">\n                                <connections>\n                                    <action selector=\"openSyncURL:\" target=\"PLw-ns-0qo\" id=\"bt7-BD-wFI\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Connect to Object Server…\" keyEquivalent=\"k\" id=\"u5P-s1-qhf\">\n                                <connections>\n                                    <action selector=\"connectToSyncServer:\" target=\"PLw-ns-0qo\" id=\"6MJ-bq-efe\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"9zf-QU-MRX\"/>\n                            <menuItem title=\"Close\" keyEquivalent=\"w\" id=\"DVo-aG-piG\">\n                                <connections>\n                                    <action selector=\"performClose:\" target=\"-1\" id=\"HmO-Ls-i7Q\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"WZk-W9-hhB\"/>\n                            <menuItem title=\"Save Model Definitions\" id=\"AC9-MV-vQr\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Save Model Definitions\" id=\"YSO-b8-a2a\">\n                                    <items>\n                                        <menuItem title=\"Java...\" id=\"kuf-fu-JL0\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"saveJavaModels:\" target=\"-1\" id=\"6op-mb-kj6\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Objective-C...\" id=\"yRS-DK-aHw\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"saveObjcModels:\" target=\"-1\" id=\"6Rj-7H-W6J\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"Swift...\" id=\"Nxi-3A-mZH\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"saveSwiftModels:\" target=\"-1\" id=\"7le-yg-BNa\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"JavaScript...\" id=\"YBd-iW-lGC\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"saveJavaScriptModels:\" target=\"-1\" id=\"HHN-6e-uP7\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"C#...\" id=\"IEI-T6-yOj\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"saveCSharpModels:\" target=\"-1\" id=\"6CY-YI-2fe\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"H9W-ez-O6J\"/>\n                            <menuItem title=\"Import From\" id=\"Oxm-sa-Vwc\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Import From\" id=\"bDd-8m-aT5\">\n                                    <items>\n                                        <menuItem title=\"CSV...\" id=\"xX6-Jo-Xnr\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"importFileFromCSV:\" target=\"PLw-ns-0qo\" id=\"K9H-ZF-cLu\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"XLSX...\" id=\"rzP-vT-bQx\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"importFileFromXLSX:\" target=\"PLw-ns-0qo\" id=\"JkU-oL-OKa\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                            <menuItem title=\"Export To\" id=\"yWr-qU-lWA\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <menu key=\"submenu\" title=\"Export To\" id=\"KHC-xM-yfH\">\n                                    <items>\n                                        <menuItem title=\"Compacted Realm...\" id=\"pNK-cr-EuG\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"exportToCompactedRealm:\" target=\"-1\" id=\"Bqf-SJ-Zgf\"/>\n                                            </connections>\n                                        </menuItem>\n                                        <menuItem title=\"CSV...\" id=\"r4f-YM-16u\">\n                                            <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                            <connections>\n                                                <action selector=\"exportToCSV:\" target=\"-1\" id=\"iMl-yy-kcK\"/>\n                                            </connections>\n                                        </menuItem>\n                                    </items>\n                                </menu>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Edit\" id=\"QHR-Bb-K4I\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Edit\" id=\"y0u-fA-7CK\">\n                        <items>\n                            <menuItem title=\"Delete Object\" tag=\"100\" id=\"Kvq-ch-tH8\">\n                                <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nCA\n</string>\n                                <connections>\n                                    <action selector=\"deleteObjectsAction:\" target=\"-1\" id=\"ONd-wB-hIM\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Add New Object\" tag=\"101\" keyEquivalent=\"+\" id=\"9cP-yO-4m2\">\n                                <connections>\n                                    <action selector=\"addObjectsAction:\" target=\"-1\" id=\"rvy-Ho-ulx\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"Qmi-Y4-sb2\"/>\n                            <menuItem title=\"Cut\" keyEquivalent=\"x\" id=\"z3i-i2-gcn\">\n                                <connections>\n                                    <action selector=\"cut:\" target=\"-1\" id=\"c9W-9t-Nyw\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Copy\" keyEquivalent=\"c\" id=\"XG2-3G-zAd\">\n                                <connections>\n                                    <action selector=\"copy:\" target=\"-1\" id=\"cPV-fT-Dg0\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Paste\" keyEquivalent=\"v\" id=\"WGQ-ME-KaY\">\n                                <connections>\n                                    <action selector=\"paste:\" target=\"-1\" id=\"8Td-Gt-2qt\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Select All\" keyEquivalent=\"a\" id=\"LGR-0P-v9Y\">\n                                <connections>\n                                    <action selector=\"selectAll:\" target=\"-1\" id=\"pVH-y4-yAI\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"fbn-yl-KvM\"/>\n                            <menuItem title=\"Remove Object From Array\" tag=\"110\" id=\"XeB-wT-76a\">\n                                <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nCA\n</string>\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"removeRowsFromArrayAction:\" target=\"-1\" id=\"0zM-g2-uNZ\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Remove Object From Array and Delete\" tag=\"111\" id=\"dEm-Cz-ggu\">\n                                <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nCA\n</string>\n                                <modifierMask key=\"keyEquivalentModifierMask\" shift=\"YES\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"deleteRowsFromArrayAction:\" target=\"-1\" id=\"cOY-tf-Nwc\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Add New Object to Array\" tag=\"112\" keyEquivalent=\"+\" id=\"NDc-iI-dKd\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"addRowsToArrayAction:\" target=\"-1\" id=\"v6Y-zi-8rX\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Add Existing Object to Array\" tag=\"113\" keyEquivalent=\"+\" id=\"OUC-JK-qjs\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" control=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"insertRowsToArrayAction:\" target=\"-1\" id=\"Yxs-Xk-68j\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Tools\" id=\"VMz-0o-2zQ\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Tools\" id=\"wdT-VW-ieg\">\n                        <items>\n                            <menuItem title=\"Generate Demo Database\" id=\"7kr-9Q-AVq\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"generatedDemoDatabase:\" target=\"-1\" id=\"jBw-mZ-hAB\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"View\" hidden=\"YES\" id=\"H8h-7b-M4v\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"View\" id=\"HyV-fh-RgO\">\n                        <items>\n                            <menuItem title=\"Show Toolbar\" keyEquivalent=\"t\" id=\"snW-S8-Cw5\">\n                                <modifierMask key=\"keyEquivalentModifierMask\" option=\"YES\" command=\"YES\"/>\n                                <connections>\n                                    <action selector=\"toggleToolbarShown:\" target=\"-1\" id=\"BXY-wc-z0C\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Customize Toolbar…\" id=\"1UK-8n-QPP\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"runToolbarCustomizationPalette:\" target=\"-1\" id=\"pQI-g3-MTW\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Window\" id=\"aUF-d1-5bR\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Window\" systemMenu=\"window\" id=\"Td7-aD-5lo\">\n                        <items>\n                            <menuItem title=\"Minimize\" keyEquivalent=\"m\" id=\"OY7-WF-poV\">\n                                <connections>\n                                    <action selector=\"performMiniaturize:\" target=\"-1\" id=\"VwT-WD-YPe\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Zoom\" id=\"R4o-n2-Eq4\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"performZoom:\" target=\"-1\" id=\"DIl-cC-cCs\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"AN0-IA-yWy\"/>\n                            <menuItem title=\"Welcome to Realm Browser\" id=\"du5-RL-cMe\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"showWelcomeWindow:\" target=\"PLw-ns-0qo\" id=\"Hcm-oE-HvR\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem isSeparatorItem=\"YES\" id=\"eu3-7i-yIM\"/>\n                            <menuItem title=\"Bring All to Front\" id=\"LE2-aR-0XJ\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"arrangeInFront:\" target=\"-1\" id=\"DRN-fu-gQh\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n                <menuItem title=\"Help\" id=\"wpr-3q-Mcd\">\n                    <modifierMask key=\"keyEquivalentModifierMask\"/>\n                    <menu key=\"submenu\" title=\"Help\" systemMenu=\"help\" id=\"F2S-fz-NVQ\">\n                        <items>\n                            <menuItem title=\"Realm Browser Help\" keyEquivalent=\"?\" id=\"FKE-Sm-Kum\">\n                                <connections>\n                                    <action selector=\"showHelp:\" target=\"-1\" id=\"y7X-2Q-9no\"/>\n                                </connections>\n                            </menuItem>\n                            <menuItem title=\"Visit Realm Studio Website\" id=\"pv3-Ik-bUn\">\n                                <modifierMask key=\"keyEquivalentModifierMask\"/>\n                                <connections>\n                                    <action selector=\"visitRealmStudioSite:\" target=\"PLw-ns-0qo\" id=\"BoC-G4-nUt\"/>\n                                </connections>\n                            </menuItem>\n                        </items>\n                    </menu>\n                </menuItem>\n            </items>\n        </menu>\n        <menuItem title=\"Item\" id=\"FTR-b1-6Fe\">\n            <modifierMask key=\"keyEquivalentModifierMask\"/>\n        </menuItem>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowser/Resources/UI/Base.lproj/RLMDocument.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"11542\" systemVersion=\"16B2555\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"11542\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMRealmBrowserWindowController\">\n            <connections>\n                <outlet property=\"lockRealmButton\" destination=\"L8G-EJ-A1Z\" id=\"UgQ-Tm-A3A\"/>\n                <outlet property=\"navigationButtons\" destination=\"2Ep-Z1-kHF\" id=\"R6Y-2D-J2o\"/>\n                <outlet property=\"outlineViewController\" destination=\"hSp-0t-Gbg\" id=\"wTv-NH-RZX\"/>\n                <outlet property=\"searchField\" destination=\"d5n-tM-xUt\" id=\"8FS-BC-KyY\"/>\n                <outlet property=\"splitView\" destination=\"IXc-8a-g01\" id=\"IMn-O6-Eyj\"/>\n                <outlet property=\"tableViewController\" destination=\"X01-Pz-1Ve\" id=\"3ep-TB-FsM\"/>\n                <outlet property=\"window\" destination=\"xOd-HO-29H\" id=\"JIz-fz-R2o\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <window title=\"Realm\" allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" restorable=\"NO\" releasedWhenClosed=\"NO\" visibleAtLaunch=\"NO\" appearanceType=\"aqua\" animationBehavior=\"default\" id=\"xOd-HO-29H\" userLabel=\"Window\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\" texturedBackground=\"YES\" unifiedTitleAndToolbar=\"YES\"/>\n            <windowCollectionBehavior key=\"collectionBehavior\" fullScreenPrimary=\"YES\"/>\n            <rect key=\"contentRect\" x=\"247\" y=\"192\" width=\"977\" height=\"476\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"1280\" height=\"800\"/>\n            <value key=\"minSize\" type=\"size\" width=\"440\" height=\"200\"/>\n            <view key=\"contentView\" wantsLayer=\"YES\" id=\"gIp-Ho-8D9\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"977\" height=\"476\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <splitView focusRingType=\"none\" placeholderIntrinsicWidth=\"977\" placeholderIntrinsicHeight=\"300\" dividerStyle=\"thin\" vertical=\"YES\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"IXc-8a-g01\" userLabel=\"Left-Right Split\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"977\" height=\"476\"/>\n                        <subviews>\n                            <customView focusRingType=\"none\" id=\"wGq-XQ-Lyz\" userLabel=\"Outline\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"236\" height=\"476\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <subviews>\n                                    <scrollView appearanceType=\"aqua\" borderType=\"none\" autohidesScrollers=\"YES\" horizontalLineScroll=\"24\" horizontalPageScroll=\"10\" verticalLineScroll=\"24\" verticalPageScroll=\"10\" usesPredominantAxisScrolling=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"MSf-82-x0U\" userLabel=\"OutlineScroll\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"236\" height=\"476\"/>\n                                        <clipView key=\"contentView\" focusRingType=\"none\" drawsBackground=\"NO\" id=\"udQ-xx-2L4\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"236\" height=\"476\"/>\n                                            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                                            <subviews>\n                                                <outlineView verticalHuggingPriority=\"750\" allowsExpansionToolTips=\"YES\" columnAutoresizingStyle=\"lastColumnOnly\" selectionHighlightStyle=\"sourceList\" multipleSelection=\"NO\" autosaveColumns=\"NO\" rowHeight=\"24\" viewBased=\"YES\" outlineTableColumn=\"ye8-fR-LJ8\" id=\"IMi-6Y-gQF\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"236\" height=\"476\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <size key=\"intercellSpacing\" width=\"3\" height=\"0.0\"/>\n                                                    <color key=\"backgroundColor\" name=\"_sourceListBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                    <color key=\"gridColor\" name=\"gridColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                    <tableColumns>\n                                                        <tableColumn editable=\"NO\" width=\"233\" minWidth=\"16\" maxWidth=\"1000\" id=\"ye8-fR-LJ8\">\n                                                            <tableHeaderCell key=\"headerCell\" lineBreakMode=\"truncatingTail\" borderStyle=\"border\" alignment=\"left\">\n                                                                <font key=\"font\" metaFont=\"smallSystem\"/>\n                                                                <color key=\"textColor\" name=\"headerTextColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                                <color key=\"backgroundColor\" white=\"0.33333298560000002\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                            </tableHeaderCell>\n                                                            <textFieldCell key=\"dataCell\" lineBreakMode=\"truncatingTail\" selectable=\"YES\" editable=\"YES\" alignment=\"left\" title=\"Text Cell\" id=\"5Jm-IL-zhx\">\n                                                                <font key=\"font\" metaFont=\"system\"/>\n                                                                <color key=\"textColor\" name=\"controlTextColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                                <color key=\"backgroundColor\" name=\"controlBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                            </textFieldCell>\n                                                            <tableColumnResizingMask key=\"resizingMask\" resizeWithTable=\"YES\" userResizable=\"YES\"/>\n                                                            <prototypeCellViews>\n                                                                <tableCellView identifier=\"HeaderCell\" id=\"vtE-Hx-1bJ\" userLabel=\"HeaderCellView\">\n                                                                    <rect key=\"frame\" x=\"1\" y=\"0.0\" width=\"233\" height=\"22\"/>\n                                                                    <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                                                                    <subviews>\n                                                                        <textField verticalHuggingPriority=\"750\" horizontalCompressionResistancePriority=\"250\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"RE7-fm-65w\">\n                                                                            <rect key=\"frame\" x=\"6\" y=\"2\" width=\"209\" height=\"14\"/>\n                                                                            <textFieldCell key=\"cell\" lineBreakMode=\"truncatingTail\" sendsActionOnEndEditing=\"YES\" title=\"Header\" id=\"Z56-IJ-NgS\">\n                                                                                <font key=\"font\" metaFont=\"smallSystemBold\"/>\n                                                                                <color key=\"textColor\" name=\"disabledControlTextColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                                                <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                                            </textFieldCell>\n                                                                        </textField>\n                                                                    </subviews>\n                                                                    <constraints>\n                                                                        <constraint firstAttribute=\"bottom\" secondItem=\"RE7-fm-65w\" secondAttribute=\"bottom\" constant=\"2\" id=\"RKE-G9-pa5\"/>\n                                                                        <constraint firstAttribute=\"trailing\" secondItem=\"RE7-fm-65w\" secondAttribute=\"trailing\" constant=\"20\" symbolic=\"YES\" id=\"dLD-tf-L70\"/>\n                                                                        <constraint firstItem=\"RE7-fm-65w\" firstAttribute=\"leading\" secondItem=\"vtE-Hx-1bJ\" secondAttribute=\"leading\" constant=\"8\" id=\"fxJ-hK-jvb\"/>\n                                                                    </constraints>\n                                                                    <connections>\n                                                                        <outlet property=\"textField\" destination=\"RE7-fm-65w\" id=\"8UX-iG-ots\"/>\n                                                                    </connections>\n                                                                </tableCellView>\n                                                                <customView identifier=\"MainCell\" id=\"O58-xq-8no\" userLabel=\"RowCellView\" customClass=\"RLMSidebarTableCellView\">\n                                                                    <rect key=\"frame\" x=\"1\" y=\"22\" width=\"233\" height=\"22\"/>\n                                                                    <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\" flexibleMaxY=\"YES\"/>\n                                                                    <subviews>\n                                                                        <textField verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"EaJ-q6-IlG\">\n                                                                            <rect key=\"frame\" x=\"18\" y=\"3\" width=\"169\" height=\"17\"/>\n                                                                            <textFieldCell key=\"cell\" lineBreakMode=\"truncatingTail\" sendsActionOnEndEditing=\"YES\" alignment=\"left\" title=\"Row label\" id=\"A0k-QZ-8eL\">\n                                                                                <font key=\"font\" metaFont=\"system\"/>\n                                                                                <color key=\"textColor\" name=\"controlTextColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                                                <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                                            </textFieldCell>\n                                                                        </textField>\n                                                                        <button hidden=\"YES\" horizontalHuggingPriority=\"751\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"I1l-Wv-wMz\">\n                                                                            <rect key=\"frame\" x=\"193\" y=\"3\" width=\"40\" height=\"17\"/>\n                                                                            <buttonCell key=\"cell\" type=\"inline\" title=\"0123\" bezelStyle=\"inline\" alignment=\"center\" state=\"on\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"Lw1-PH-p6Q\">\n                                                                                <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                                                                                <font key=\"font\" metaFont=\"smallSystemBold\"/>\n                                                                            </buttonCell>\n                                                                        </button>\n                                                                    </subviews>\n                                                                    <constraints>\n                                                                        <constraint firstItem=\"I1l-Wv-wMz\" firstAttribute=\"leading\" secondItem=\"EaJ-q6-IlG\" secondAttribute=\"trailing\" constant=\"8\" symbolic=\"YES\" id=\"D5m-MW-YqC\"/>\n                                                                        <constraint firstAttribute=\"trailing\" secondItem=\"I1l-Wv-wMz\" secondAttribute=\"trailing\" id=\"S2j-K1-n7V\"/>\n                                                                        <constraint firstItem=\"EaJ-q6-IlG\" firstAttribute=\"centerY\" secondItem=\"O58-xq-8no\" secondAttribute=\"centerY\" id=\"UfS-ho-zJk\"/>\n                                                                        <constraint firstItem=\"EaJ-q6-IlG\" firstAttribute=\"leading\" secondItem=\"O58-xq-8no\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"fkb-ge-NET\"/>\n                                                                        <constraint firstItem=\"I1l-Wv-wMz\" firstAttribute=\"centerY\" secondItem=\"EaJ-q6-IlG\" secondAttribute=\"centerY\" id=\"oq8-FO-4hn\"/>\n                                                                    </constraints>\n                                                                    <connections>\n                                                                        <outlet property=\"button\" destination=\"I1l-Wv-wMz\" id=\"bbO-A1-Jhu\"/>\n                                                                        <outlet property=\"textField\" destination=\"EaJ-q6-IlG\" id=\"Mfb-av-BRv\"/>\n                                                                    </connections>\n                                                                </customView>\n                                                            </prototypeCellViews>\n                                                        </tableColumn>\n                                                    </tableColumns>\n                                                    <connections>\n                                                        <outlet property=\"dataSource\" destination=\"hSp-0t-Gbg\" id=\"Ysl-BR-v6p\"/>\n                                                        <outlet property=\"delegate\" destination=\"hSp-0t-Gbg\" id=\"CW4-45-uk0\"/>\n                                                    </connections>\n                                                </outlineView>\n                                            </subviews>\n                                            <nil key=\"backgroundColor\"/>\n                                        </clipView>\n                                        <scroller key=\"horizontalScroller\" hidden=\"YES\" verticalHuggingPriority=\"750\" horizontal=\"YES\" id=\"exH-b9-o3D\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"460\" width=\"236\" height=\"16\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                        </scroller>\n                                        <scroller key=\"verticalScroller\" hidden=\"YES\" verticalHuggingPriority=\"750\" horizontal=\"NO\" id=\"2YT-v9-0yd\">\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                        </scroller>\n                                    </scrollView>\n                                </subviews>\n                                <constraints>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"MSf-82-x0U\" secondAttribute=\"bottom\" id=\"1MR-hG-UmC\"/>\n                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"225\" id=\"6VO-8s-HPp\"/>\n                                    <constraint firstAttribute=\"width\" relation=\"lessThanOrEqual\" constant=\"400\" id=\"Kov-uo-PCT\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"MSf-82-x0U\" secondAttribute=\"trailing\" id=\"SCi-ef-bJn\"/>\n                                    <constraint firstItem=\"MSf-82-x0U\" firstAttribute=\"leading\" secondItem=\"wGq-XQ-Lyz\" secondAttribute=\"leading\" id=\"heW-be-7kt\"/>\n                                    <constraint firstItem=\"MSf-82-x0U\" firstAttribute=\"top\" secondItem=\"wGq-XQ-Lyz\" secondAttribute=\"top\" id=\"po8-mG-pzB\"/>\n                                </constraints>\n                            </customView>\n                            <customView id=\"XsG-4h-zWh\" userLabel=\"MainTableView\">\n                                <rect key=\"frame\" x=\"237\" y=\"0.0\" width=\"740\" height=\"476\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <subviews>\n                                    <scrollView focusRingType=\"none\" borderType=\"none\" autohidesScrollers=\"YES\" horizontalLineScroll=\"20\" horizontalPageScroll=\"10\" verticalLineScroll=\"20\" verticalPageScroll=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"3b6-BA-X5L\" userLabel=\"MainScroll\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"740\" height=\"476\"/>\n                                        <clipView key=\"contentView\" focusRingType=\"none\" id=\"kRO-aN-FFM\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"740\" height=\"476\"/>\n                                            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                                            <subviews>\n                                                <tableView focusRingType=\"none\" verticalHuggingPriority=\"750\" allowsExpansionToolTips=\"YES\" columnAutoresizingStyle=\"none\" alternatingRowBackgroundColors=\"YES\" autosaveName=\"InstanceTable\" rowHeight=\"18\" headerView=\"cDp-e2-1cA\" id=\"enp-HN-e6b\" customClass=\"RLMTableView\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"740\" height=\"453\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <size key=\"intercellSpacing\" width=\"10\" height=\"2\"/>\n                                                    <color key=\"backgroundColor\" name=\"controlBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                    <tableViewGridLines key=\"gridStyleMask\" vertical=\"YES\"/>\n                                                    <color key=\"gridColor\" name=\"gridColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                    <connections>\n                                                        <outlet property=\"dataSource\" destination=\"X01-Pz-1Ve\" id=\"GhO-Zd-xr8\"/>\n                                                        <outlet property=\"delegate\" destination=\"X01-Pz-1Ve\" id=\"FW0-Gv-Asq\"/>\n                                                    </connections>\n                                                </tableView>\n                                            </subviews>\n                                        </clipView>\n                                        <scroller key=\"horizontalScroller\" hidden=\"YES\" verticalHuggingPriority=\"750\" horizontal=\"YES\" id=\"4Ib-5w-NOS\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"548\" width=\"740\" height=\"16\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                        </scroller>\n                                        <scroller key=\"verticalScroller\" hidden=\"YES\" verticalHuggingPriority=\"750\" horizontal=\"NO\" id=\"PKq-wN-eoD\">\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                        </scroller>\n                                        <tableHeaderView key=\"headerView\" id=\"cDp-e2-1cA\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"740\" height=\"23\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                        </tableHeaderView>\n                                    </scrollView>\n                                </subviews>\n                                <constraints>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"3b6-BA-X5L\" secondAttribute=\"trailing\" id=\"MsK-Hb-mbv\"/>\n                                    <constraint firstItem=\"3b6-BA-X5L\" firstAttribute=\"top\" secondItem=\"XsG-4h-zWh\" secondAttribute=\"top\" id=\"Pzf-27-fXl\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"3b6-BA-X5L\" secondAttribute=\"bottom\" id=\"VzH-qT-268\"/>\n                                    <constraint firstItem=\"3b6-BA-X5L\" firstAttribute=\"leading\" secondItem=\"XsG-4h-zWh\" secondAttribute=\"leading\" id=\"tHS-lc-oSF\"/>\n                                </constraints>\n                            </customView>\n                        </subviews>\n                        <holdingPriorities>\n                            <real value=\"346\"/>\n                            <real value=\"250\"/>\n                        </holdingPriorities>\n                    </splitView>\n                </subviews>\n                <constraints>\n                    <constraint firstAttribute=\"bottom\" secondItem=\"IXc-8a-g01\" secondAttribute=\"bottom\" id=\"Izb-Io-zbG\"/>\n                    <constraint firstItem=\"IXc-8a-g01\" firstAttribute=\"leading\" secondItem=\"gIp-Ho-8D9\" secondAttribute=\"leading\" id=\"fNA-Fh-DsO\"/>\n                    <constraint firstItem=\"IXc-8a-g01\" firstAttribute=\"top\" secondItem=\"gIp-Ho-8D9\" secondAttribute=\"top\" id=\"jUk-Ng-34q\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"IXc-8a-g01\" secondAttribute=\"trailing\" id=\"sFX-QX-Q7C\"/>\n                </constraints>\n            </view>\n            <toolbar key=\"toolbar\" implicitIdentifier=\"C65F63A5-F554-46B8-9926-9CAAAC19813C\" autosavesConfiguration=\"NO\" displayMode=\"iconOnly\" sizeMode=\"small\" id=\"rfo-lS-fnD\">\n                <allowedToolbarItems>\n                    <toolbarItem implicitItemIdentifier=\"6A2680B3-CB3F-4B46-943B-6DB55B89691A\" label=\"\" paletteLabel=\"Navigation\" id=\"dAe-mG-eMX\">\n                        <nil key=\"toolTip\"/>\n                        <size key=\"minSize\" width=\"67\" height=\"28\"/>\n                        <size key=\"maxSize\" width=\"104\" height=\"28\"/>\n                        <segmentedControl key=\"view\" verticalHuggingPriority=\"750\" id=\"2Ep-Z1-kHF\">\n                            <rect key=\"frame\" x=\"0.0\" y=\"14\" width=\"67\" height=\"28\"/>\n                            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n                            <segmentedCell key=\"cell\" borderStyle=\"border\" alignment=\"left\" style=\"texturedSquare\" trackingMode=\"momentary\" id=\"8pQ-he-SG1\">\n                                <font key=\"font\" metaFont=\"system\"/>\n                                <segments>\n                                    <segment image=\"NSLeftFacingTriangleTemplate\" width=\"32\"/>\n                                    <segment image=\"NSRightFacingTriangleTemplate\" width=\"32\" tag=\"1\"/>\n                                </segments>\n                            </segmentedCell>\n                            <connections>\n                                <action selector=\"userClicksOnNavigationButtons:\" target=\"-2\" id=\"xPX-We-2xd\"/>\n                            </connections>\n                        </segmentedControl>\n                    </toolbarItem>\n                    <toolbarItem implicitItemIdentifier=\"AC5460F5-955D-48AD-8697-2FA153F25F71\" label=\"\" paletteLabel=\"Search\" id=\"iuT-AU-RcQ\">\n                        <nil key=\"toolTip\"/>\n                        <size key=\"minSize\" width=\"96\" height=\"22\"/>\n                        <size key=\"maxSize\" width=\"96\" height=\"22\"/>\n                        <searchField key=\"view\" wantsLayer=\"YES\" verticalHuggingPriority=\"750\" id=\"d5n-tM-xUt\">\n                            <rect key=\"frame\" x=\"0.0\" y=\"14\" width=\"96\" height=\"22\"/>\n                            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n                            <searchFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" selectable=\"YES\" editable=\"YES\" borderStyle=\"bezel\" usesSingleLineMode=\"YES\" bezelStyle=\"round\" id=\"xW4-0M-Izf\">\n                                <font key=\"font\" metaFont=\"system\"/>\n                                <color key=\"textColor\" name=\"controlTextColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                <connections>\n                                    <action selector=\"searchAction:\" target=\"-2\" id=\"hD2-Dg-6Pe\"/>\n                                </connections>\n                            </searchFieldCell>\n                        </searchField>\n                    </toolbarItem>\n                    <toolbarItem implicitItemIdentifier=\"NSToolbarFlexibleSpaceItem\" id=\"IBE-aS-65q\"/>\n                    <toolbarItem implicitItemIdentifier=\"B1EB8F69-D4C8-4B21-B606-A54812FDD83C\" explicitItemIdentifier=\"RealmLockItem\" label=\"Realm\" paletteLabel=\"Realm\" toolTip=\"Lock to prevent editing\" tag=\"1\" image=\"RealmUnlocked\" id=\"L8G-EJ-A1Z\">\n                        <connections>\n                            <action selector=\"userClickedLockRealm:\" target=\"-2\" id=\"4PX-6Z-zko\"/>\n                        </connections>\n                    </toolbarItem>\n                </allowedToolbarItems>\n                <defaultToolbarItems>\n                    <toolbarItem reference=\"dAe-mG-eMX\"/>\n                    <toolbarItem reference=\"IBE-aS-65q\"/>\n                    <toolbarItem reference=\"L8G-EJ-A1Z\"/>\n                    <toolbarItem reference=\"iuT-AU-RcQ\"/>\n                </defaultToolbarItems>\n            </toolbar>\n            <connections>\n                <outlet property=\"delegate\" destination=\"-2\" id=\"0bl-1N-x8E\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"484.5\" y=\"302\"/>\n        </window>\n        <customObject id=\"hSp-0t-Gbg\" customClass=\"RLMTypeOutlineViewController\">\n            <connections>\n                <outlet property=\"classesOutlineView\" destination=\"IMi-6Y-gQF\" id=\"inH-pi-Hwr\"/>\n                <outlet property=\"parentWindowController\" destination=\"-2\" id=\"UwQ-DI-ttX\"/>\n                <outlet property=\"view\" destination=\"IMi-6Y-gQF\" id=\"XQa-PV-Ysa\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"X01-Pz-1Ve\" customClass=\"RLMInstanceTableViewController\">\n            <connections>\n                <outlet property=\"parentWindowController\" destination=\"-2\" id=\"zrl-bi-GWW\"/>\n                <outlet property=\"view\" destination=\"enp-HN-e6b\" id=\"ve8-y2-M62\"/>\n            </connections>\n        </customObject>\n    </objects>\n    <resources>\n        <image name=\"NSLeftFacingTriangleTemplate\" width=\"9\" height=\"12\"/>\n        <image name=\"NSRightFacingTriangleTemplate\" width=\"9\" height=\"12\"/>\n        <image name=\"RealmUnlocked\" width=\"32\" height=\"32\"/>\n    </resources>\n</document>\n"
  },
  {
    "path": "RealmBrowser/Resources/UI/RLMExportIndicatorWindowController.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"8191\" systemVersion=\"15A284\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"8191\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMExportIndicatorWindowController\">\n            <connections>\n                <outlet property=\"progressIndicator\" destination=\"KjN-Ba-3Ww\" id=\"Awi-LW-H59\"/>\n                <outlet property=\"window\" destination=\"F0z-JX-Cv5\" id=\"gIp-Ho-8D9\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <window title=\"Window\" allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" oneShot=\"NO\" releasedWhenClosed=\"NO\" visibleAtLaunch=\"NO\" animationBehavior=\"default\" id=\"F0z-JX-Cv5\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <windowPositionMask key=\"initialPositionMask\" leftStrut=\"YES\" rightStrut=\"YES\" topStrut=\"YES\" bottomStrut=\"YES\"/>\n            <rect key=\"contentRect\" x=\"196\" y=\"240\" width=\"310\" height=\"120\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"2560\" height=\"1577\"/>\n            <view key=\"contentView\" id=\"se5-gp-TjO\">\n                <rect key=\"frame\" x=\"0.0\" y=\"-1\" width=\"310\" height=\"120\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <progressIndicator horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" maxValue=\"100\" bezeled=\"NO\" indeterminate=\"YES\" style=\"spinning\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"KjN-Ba-3Ww\">\n                        <rect key=\"frame\" x=\"139\" y=\"29\" width=\"32\" height=\"32\"/>\n                        <animations/>\n                    </progressIndicator>\n                    <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"yOQ-4Q-IJN\">\n                        <rect key=\"frame\" x=\"34\" y=\"78\" width=\"242\" height=\"17\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"height\" constant=\"17\" id=\"IXn-QO-QTp\"/>\n                            <constraint firstAttribute=\"width\" constant=\"238\" id=\"LrK-Ql-GaA\"/>\n                        </constraints>\n                        <animations/>\n                        <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" alignment=\"center\" title=\"Exporting copy of Realm file...\" id=\"k8g-HB-gsv\">\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                    </textField>\n                </subviews>\n                <constraints>\n                    <constraint firstAttribute=\"centerY\" secondItem=\"yOQ-4Q-IJN\" secondAttribute=\"centerY\" constant=\"26.5\" id=\"B8Z-pR-vnQ\"/>\n                    <constraint firstItem=\"yOQ-4Q-IJN\" firstAttribute=\"top\" secondItem=\"se5-gp-TjO\" secondAttribute=\"top\" constant=\"25\" id=\"G4G-eC-hEa\"/>\n                    <constraint firstAttribute=\"centerX\" secondItem=\"yOQ-4Q-IJN\" secondAttribute=\"centerX\" constant=\"0.5\" id=\"ZvA-N5-HOU\"/>\n                    <constraint firstItem=\"yOQ-4Q-IJN\" firstAttribute=\"top\" secondItem=\"KjN-Ba-3Ww\" secondAttribute=\"top\" constant=\"-34\" id=\"az6-1a-7JT\"/>\n                    <constraint firstAttribute=\"centerX\" secondItem=\"KjN-Ba-3Ww\" secondAttribute=\"centerX\" constant=\"0.5\" id=\"yK7-DQ-ITu\"/>\n                </constraints>\n                <animations/>\n            </view>\n            <connections>\n                <outlet property=\"delegate\" destination=\"-2\" id=\"0bl-1N-AYu\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"256\" y=\"282\"/>\n        </window>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowser/Resources/UI/RLMObjectLinkSelectionViewController.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15E65\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMObjectLinkSelectionViewController\">\n            <connections>\n                <outlet property=\"tableController\" destination=\"LEK-Pl-8tH\" id=\"7PX-Vb-byA\"/>\n                <outlet property=\"view\" destination=\"flu-HD-CAe\" id=\"Qu3-Lq-ORI\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customView appearanceType=\"aqua\" id=\"flu-HD-CAe\" userLabel=\"MainTableView\" propertyAccessControl=\"none\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"475\" height=\"445\"/>\n            <autoresizingMask key=\"autoresizingMask\"/>\n            <subviews>\n                <scrollView wantsLayer=\"YES\" focusRingType=\"none\" borderType=\"none\" autohidesScrollers=\"YES\" horizontalLineScroll=\"20\" horizontalPageScroll=\"10\" verticalLineScroll=\"20\" verticalPageScroll=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Y4e-Rd-QZZ\" userLabel=\"MainScroll\">\n                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"475\" height=\"445\"/>\n                    <clipView key=\"contentView\" focusRingType=\"none\" id=\"goJ-S0-94I\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"475\" height=\"445\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView focusRingType=\"none\" verticalHuggingPriority=\"750\" allowsExpansionToolTips=\"YES\" columnAutoresizingStyle=\"none\" alternatingRowBackgroundColors=\"YES\" columnReordering=\"NO\" multipleSelection=\"NO\" autosaveName=\"InstanceTable\" rowHeight=\"18\" headerView=\"AgY-7N-8os\" id=\"cgZ-x2-okk\" customClass=\"RLMTableView\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"475\" height=\"422\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <size key=\"intercellSpacing\" width=\"3\" height=\"2\"/>\n                                <color key=\"backgroundColor\" name=\"controlBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                <tableViewGridLines key=\"gridStyleMask\" vertical=\"YES\"/>\n                                <color key=\"gridColor\" name=\"gridColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                <connections>\n                                    <outlet property=\"dataSource\" destination=\"LEK-Pl-8tH\" id=\"dY8-5e-JNy\"/>\n                                    <outlet property=\"delegate\" destination=\"LEK-Pl-8tH\" id=\"qlP-cC-kqd\"/>\n                                </connections>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" name=\"controlBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </clipView>\n                    <constraints>\n                        <constraint firstAttribute=\"width\" constant=\"475\" id=\"ZaU-YO-2Uw\"/>\n                        <constraint firstAttribute=\"height\" constant=\"445\" id=\"bT3-ay-76Y\"/>\n                    </constraints>\n                    <scroller key=\"horizontalScroller\" hidden=\"YES\" verticalHuggingPriority=\"750\" horizontal=\"YES\" id=\"0Yg-ge-2GS\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"429\" width=\"475\" height=\"16\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </scroller>\n                    <scroller key=\"verticalScroller\" hidden=\"YES\" verticalHuggingPriority=\"750\" horizontal=\"NO\" id=\"QdJ-3D-J7b\">\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </scroller>\n                    <tableHeaderView key=\"headerView\" id=\"AgY-7N-8os\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"475\" height=\"23\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </tableHeaderView>\n                </scrollView>\n            </subviews>\n            <constraints>\n                <constraint firstAttribute=\"bottom\" secondItem=\"Y4e-Rd-QZZ\" secondAttribute=\"bottom\" id=\"SQd-rt-m5f\"/>\n                <constraint firstItem=\"Y4e-Rd-QZZ\" firstAttribute=\"top\" secondItem=\"flu-HD-CAe\" secondAttribute=\"top\" id=\"q28-tk-njs\"/>\n                <constraint firstAttribute=\"trailing\" secondItem=\"Y4e-Rd-QZZ\" secondAttribute=\"trailing\" id=\"qPg-Ao-l5G\"/>\n                <constraint firstItem=\"Y4e-Rd-QZZ\" firstAttribute=\"leading\" secondItem=\"flu-HD-CAe\" secondAttribute=\"leading\" id=\"zKU-p7-XNp\"/>\n            </constraints>\n            <point key=\"canvasLocation\" x=\"701.5\" y=\"360.5\"/>\n        </customView>\n        <viewController id=\"LEK-Pl-8tH\" userLabel=\"Popover View Controller\" customClass=\"RLMInstanceTableViewController\">\n            <connections>\n                <outlet property=\"view\" destination=\"cgZ-x2-okk\" id=\"dUu-yU-76i\"/>\n            </connections>\n        </viewController>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowser/Support/NSColor+ByteSizeFactory.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\n@interface NSColor (ByteSizeFactory)\n\n+ (NSColor *)linkColor;\n+ (NSColor *)colorWithByteRed:(NSUInteger)red green:(NSUInteger)green blue:(NSUInteger)blue alpha:(NSUInteger)alpha;\n+ (NSColor *)colorWithByteWhite:(NSUInteger)white alpha:(NSUInteger)alpha;\n+ (NSColor *)colorWithRGBAFloatValues:(CGFloat *)values;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Support/NSColor+ByteSizeFactory.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n/////////////////////////////////////////////////////////////////////////////\n\n#import \"NSColor+ByteSizeFactory.h\"\n\n@implementation NSColor (ByteSizeFactory)\n\n+ (NSColor *)linkColor\n{\n    return [NSColor colorWithByteRed:52 green:94 blue:242 alpha:255];\n}\n\n+ (NSColor *)colorWithByteRed:(NSUInteger)red green:(NSUInteger)green blue:(NSUInteger)blue alpha:(NSUInteger)alpha\n{\n    return [NSColor colorWithRed:(CGFloat)red/255.0f\n                           green:(CGFloat)green/255.0f\n                            blue:(CGFloat)blue/255.0f\n                           alpha:(CGFloat)alpha/255.0f];\n}\n\n+ (NSColor *)colorWithByteWhite:(NSUInteger)white alpha:(NSUInteger)alpha\n{\n    return [NSColor colorWithWhite:(CGFloat)white/255.0f\n                             alpha:(CGFloat)alpha/255.0f];\n}\n\n+ (NSColor *)colorWithRGBAFloatValues:(CGFloat *)values\n{\n    if (values == nil) {\n        return nil;\n    }\n    \n    return [NSColor colorWithRed:values[0] green:values[1] blue:values[2] alpha:values[3]];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Support/RLMBrowserConstants.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import <Foundation/Foundation.h>\n\nextern const NSUInteger kTopTipDelay;\nextern const NSUInteger kMaxFilesPerCategory;\nextern const NSInteger kMaxNumberOfFilesAtOnce;\nextern const CGFloat kMenuImageSize;\nextern const CGFloat kNilItemColor[];\n\nextern NSString * const kRealmURLScheme;\nextern NSString * const kSecureRealmURLScheme;\n\nextern NSString * const kRealmFileExtension;\nextern NSString * const kRealmUTIIdentifier;\nextern NSString * const kDeveloperFolder;\nextern NSString * const kSimulatorFolder;\nextern NSString * const kDesktopFolder;\nextern NSString * const kDownloadFolder;\nextern NSString * const kDocumentsFolder;"
  },
  {
    "path": "RealmBrowser/Support/RLMBrowserConstants.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMBrowserConstants.h\"\n\nconst NSUInteger    kTopTipDelay = 250;\nconst NSUInteger    kMaxFilesPerCategory = 7;\nconst CGFloat       kMenuImageSize = 16;\nconst NSInteger     kMaxNumberOfFilesAtOnce = 20;\nconst CGFloat       kNilItemColor[] = {0.0f, 0.0f, 0.0f, 0.3f};\n\nNSString * const kRealmURLScheme        = @\"realm\";\nNSString * const kSecureRealmURLScheme  = @\"realms\";\n\nNSString * const kRealmFileExtension    = @\"realm\";\nNSString * const kRealmUTIIdentifier    = @\"io.realm.realm\";\nNSString * const kDeveloperFolder       = @\"/Library/Developer\";\nNSString * const kSimulatorFolder       = @\"/Library/Application Support/iPhone Simulator\";\nNSString * const kDesktopFolder         = @\"/Desktop\";\nNSString * const kDownloadFolder        = @\"/Download\";\nNSString * const kDocumentsFolder       = @\"/Documents\";\n"
  },
  {
    "path": "RealmBrowser/Support/RLMDescriptions.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n@import Realm;\n\n@interface RLMDescriptions : NSObject\n\n-(NSString *)descriptionOfObject:(RLMObject *)object;\n-(NSString *)printablePropertyValue:(id)propertyValue ofType:(RLMProperty *)property;\n-(NSString *)tooltipForPropertyValue:(id)propertyValue ofType:(RLMProperty *)property;\n\n+(NSString *)typeNameOfProperty:(RLMProperty *)property;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Support/RLMDescriptions.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMDescriptions.h\"\n\n#import \"RLMRealmBrowserWindowController.h\"\n#import \"RLMArrayNavigationState.h\"\n#import \"RLMQueryNavigationState.h\"\n#import \"RLMArrayNode.h\"\n#import \"RLMRealmNode.h\"\n\n#import \"RLMBadgeTableCellView.h\"\n#import \"RLMBasicTableCellView.h\"\n#import \"RLMBoolTableCellView.h\"\n#import \"RLMNumberTableCellView.h\"\n#import \"RLMImageTableCellView.h\"\n\n#import \"RLMTableColumn.h\"\n\nconst NSUInteger kMaxNumberOfArrayEntriesInToolTip = 5;\nconst NSUInteger kMaxNumberOfStringCharsInObjectLink = 20;\nconst NSUInteger kMaxNumberOfStringCharsForTooltip = 300;\nconst NSUInteger kMaxNumberOfInlineStringCharsForTooltip = 20;\nconst NSUInteger kMaxNumberOfObjectCharsForTable = 200;\nconst NSUInteger kMaxDepthForTooltips = 2;\n\ntypedef NS_ENUM(int32_t, RLMDescriptionFormat) {\n    RLMDescriptionFormatEllipsis,\n    RLMDescriptionFormatFull,\n    RLMDescriptionFormatObject\n};\n\n@implementation RLMDescriptions {\n    NSByteCountFormatter *byteCountFormatter;\n    NSDateFormatter *dateFormatter;\n    NSNumberFormatter *integerFormatter;\n    NSNumberFormatter *floatingPointFormatter;\n    NSNumberFormatter *floatingPointTooltipFormatter;\n}\n\n- (instancetype)init\n{\n    self = [super init];\n    if (self) {\n        dateFormatter = [[NSDateFormatter alloc] init];\n        dateFormatter.dateStyle = NSDateFormatterMediumStyle;\n        dateFormatter.timeStyle = NSDateFormatterMediumStyle;\n        \n        byteCountFormatter = [[NSByteCountFormatter alloc] init];\n        \n        integerFormatter = [[NSNumberFormatter alloc] init];\n        integerFormatter.numberStyle = NSNumberFormatterDecimalStyle;\n\n        floatingPointFormatter = [[NSNumberFormatter alloc] init];\n        floatingPointFormatter.numberStyle = NSNumberFormatterDecimalStyle;\n        floatingPointFormatter.minimumFractionDigits = 3;\n        floatingPointFormatter.maximumFractionDigits = 3;\n\n        floatingPointTooltipFormatter = [[NSNumberFormatter alloc] init];\n        floatingPointTooltipFormatter.numberStyle = NSNumberFormatterDecimalStyle;\n        floatingPointTooltipFormatter.minimumFractionDigits = 0;\n        floatingPointTooltipFormatter.maximumFractionDigits = NSUIntegerMax;\n    }\n\n    return self;\n}\n\n-(NSString *)descriptionOfObject:(RLMObject *)object\n{\n    return [self descriptionOfObject:object format:RLMDescriptionFormatObject];\n}\n\n-(NSString *)descriptionOfObject:(RLMObject *)object format:(RLMDescriptionFormat)format\n{\n    if (object == nil) {\n        return @\"\";\n    }\n\n    if (format == RLMDescriptionFormatEllipsis) {\n        return [NSString stringWithFormat:@\"%@(...)\", object.objectSchema.className];\n    }\n\n    NSString *returnString = @\"(\";\n\n    for (RLMProperty *property in object.objectSchema.properties) {\n        id propertyValue = object[property.name];\n        NSString *propertyDescription = [self printablePropertyValue:propertyValue ofType:property\n                                                              format:RLMDescriptionFormatEllipsis];\n\n        if (returnString.length > kMaxNumberOfObjectCharsForTable - 4) {\n            returnString = [returnString stringByAppendingFormat:@\"...\"];\n            break;\n        }\n\n        returnString = [returnString stringByAppendingFormat:@\"%@, \", propertyDescription];\n    }\n\n    if ([returnString hasSuffix:@\", \"]) {\n        returnString = [returnString substringToIndex:returnString.length - 2];\n    }\n\n    return [returnString stringByAppendingString:@\")\"];\n}\n\n-(NSString *)printablePropertyValue:(id)propertyValue ofType:(RLMProperty *)property\n{\n    return [self printablePropertyValue:propertyValue ofType:property format:RLMDescriptionFormatFull];\n}\n\n-(NSString *)printablePropertyValue:(id)propertyValue ofType:(RLMProperty *)property format:(RLMDescriptionFormat)format\n{\n    if (!propertyValue) {\n        return @\"\";\n    }\n\n    if (property.array) {\n        RLMArray *referredArray = propertyValue;\n        if (!referredArray.objectClassName) {\n            return @\"<Array>\";\n        }\n        if (format == RLMDescriptionFormatEllipsis) {\n            return [NSString stringWithFormat:@\"%@[%lu]\", referredArray.objectClassName, referredArray.count];\n        }\n\n        return [NSString stringWithFormat:@\"%@\", referredArray.objectClassName];\n    }\n\n    switch (property.type) {\n        case RLMPropertyTypeInt:\n            return [integerFormatter stringFromNumber:propertyValue];\n            \n            // Intentional fallthrough\n        case RLMPropertyTypeFloat:\n        case RLMPropertyTypeDouble:\n            return [floatingPointFormatter stringFromNumber:propertyValue];\n            \n        case RLMPropertyTypeString: {\n            NSString *stringValue = propertyValue;\n            \n            if (format == RLMDescriptionFormatEllipsis && stringValue.length > kMaxNumberOfStringCharsInObjectLink) {\n                stringValue = [stringValue substringToIndex:kMaxNumberOfStringCharsInObjectLink - 3];\n                stringValue = [stringValue stringByAppendingString:@\"...\"];\n            }\n            \n            return stringValue;\n        }\n            \n        case RLMPropertyTypeBool:\n            return [propertyValue boolValue] ? @\"TRUE\" : @\"FALSE\";\n            \n        case RLMPropertyTypeDate:\n            return [dateFormatter stringFromDate:(NSDate *)propertyValue];\n            \n        case RLMPropertyTypeData: {\n            NSString *formattedSize = [byteCountFormatter stringFromByteCount:[(NSData *)propertyValue length]];\n            \n            return [NSString stringWithFormat:@\"<Data: %@>\", formattedSize];\n        }\n        \n        case RLMPropertyTypeAny:\n            return @\"<Any>\";\n        \n        case RLMPropertyTypeLinkingObjects:\n            return @\"<LinkingObjects>\";\n            \n        case RLMPropertyTypeObject:\n            return [self descriptionOfObject:propertyValue format:format];\n    }\n}\n\n+(NSString *)typeName:(RLMPropertyType)type property:(RLMProperty *)property\n{\n    switch (type) {\n        case RLMPropertyTypeInt:\n            return [NSString stringWithFormat:@\"Int%@\", property.optional ? @\" (Optional)\":@\"\"];\n        case RLMPropertyTypeFloat:\n            return [NSString stringWithFormat:@\"Float%@\", property.optional ? @\" (Optional)\":@\"\"];\n        case RLMPropertyTypeDouble:\n            return [NSString stringWithFormat:@\"Double%@\", property.optional ? @\" (Optional)\":@\"\"];\n        case RLMPropertyTypeDate:\n            return @\"Date\";\n        case RLMPropertyTypeBool:\n            return [NSString stringWithFormat:@\"Boolean%@\", property.optional ? @\" (Optional)\":@\"\"];\n        case RLMPropertyTypeString:\n            return @\"String\";\n        case RLMPropertyTypeData:\n            return @\"Data\";\n        case RLMPropertyTypeAny:\n            return @\"Any\";\n        case RLMPropertyTypeLinkingObjects:\n            return @\"LinkingObjects\";\n        case RLMPropertyTypeObject:\n            return [NSString stringWithFormat:@\"<%@>\", property.objectClassName];\n    }\n}\n\n+(NSString *)typeNameOfProperty:(RLMProperty *)property\n{\n    if (property.array) {\n        return [NSString stringWithFormat:@\"[%@]\", property.objectClassName ?: [self typeName:property.type property:property]];\n    }\n    return [self typeName:property.type property:property];\n}\n\n-(NSString *)tooltipForPropertyValue:(id)propertyValue ofType:(RLMProperty *)property\n{\n    if (!propertyValue || propertyValue == NSNull.null) {\n        return nil;\n    }\n\n    if (property.array) {\n        return [self tooltipForArray:propertyValue];\n    }\n    \n    switch (property.type) {\n        case RLMPropertyTypeString: {\n            NSUInteger chars = MIN(kMaxNumberOfStringCharsForTooltip, [(NSString *)propertyValue length]);\n            return [(NSString *)propertyValue substringToIndex:chars];\n        }\n            \n        case RLMPropertyTypeFloat:\n        case RLMPropertyTypeDouble:\n            return [floatingPointTooltipFormatter stringFromNumber:propertyValue];\n            \n        case RLMPropertyTypeObject:\n            return [self tooltipForObject:propertyValue];\n            \n        case RLMPropertyTypeLinkingObjects:\n        case RLMPropertyTypeAny:\n        case RLMPropertyTypeBool:\n        case RLMPropertyTypeData:\n        case RLMPropertyTypeDate:\n        case RLMPropertyTypeInt:\n            return nil;\n    }\n}\n\n- (NSString *)tooltipForObject:(RLMObject *)object\n{\n    return [self tooltipForObject:object withDepth:0];\n}\n\n- (NSString *)tooltipForObject:(RLMObject *)object withDepth:(NSUInteger)depth\n{\n    if (depth == kMaxDepthForTooltips) {\n        return [object.objectSchema.className stringByAppendingString:@\"[...]\"];\n    }\n    \n    NSMutableString *string = [NSMutableString stringWithFormat:@\"%@:\\n\", object.objectSchema.className];\n    NSString *tabs = [@\"\" stringByPaddingToLength:depth + 1 withString:@\"\\t\" startingAtIndex:0];\n    \n    for (RLMProperty *property in object.objectSchema.properties) {\n        id obj = object[property.name];\n        \n        NSString *sub;\n        if (property.array) {\n            sub = [self tooltipForArray:obj withDepth:kMaxDepthForTooltips];\n        }\n        else if (property.type == RLMPropertyTypeObject) {\n            sub = [self tooltipForObject:obj withDepth:depth + 1];\n        }\n        else {\n            sub = [self printablePropertyValue:obj ofType:property];\n\n            if (property.type == RLMPropertyTypeString && sub.length > kMaxNumberOfInlineStringCharsForTooltip) {\n                sub = [sub substringToIndex:kMaxNumberOfInlineStringCharsForTooltip];\n                sub = [sub stringByAppendingString:@\"...\"];\n            }\n        }\n        \n        [string appendFormat:@\"%@%@ = %@\\n\", tabs, property.name, sub];\n    }\n    \n    return string;\n}\n\n- (NSString *)tooltipForArray:(RLMArray *)array\n{\n    return [self tooltipForArray:array withDepth:0];\n}\n\n- (NSString *)tooltipForArray:(RLMArray *)array withDepth:(NSUInteger)depth\n{\n    if (!array.objectClassName) {\n        return nil;\n    }\n    if (depth == kMaxDepthForTooltips) {\n        return [NSString stringWithFormat:@\"<%@>[%lu]\", array.objectClassName, array.count];\n    }\n    \n    const NSUInteger maxObjects = 3;\n    NSString *tabs = [@\"\" stringByPaddingToLength:depth withString:@\"\\t\" startingAtIndex:0];\n    NSMutableString *string = [NSMutableString stringWithFormat:@\"%@<%@>[%lu]\", tabs, array.objectClassName, array.count];\n    \n    if (array.count == 0) {\n        return string;\n    }\n    [string appendString:@\":\\n\"];\n    \n    NSUInteger index = 0;\n    NSUInteger skipped = 0;\n    for (id obj in array) {\n        NSString *sub = [self tooltipForObject:obj withDepth:depth + 1];\n        [string appendFormat:@\"%@\\t[%lu] %@\\n\", tabs, index++, sub];\n        if (index >= maxObjects) {\n            skipped = array.count - maxObjects;\n            break;\n        }\n    }\n    \n    // Remove last comma and newline characters\n    if (array.count > 0) {\n        [string deleteCharactersInRange:NSMakeRange(string.length - 1, 1)];\n    }\n    if (skipped) {\n        [string appendFormat:@\"\\n\\t%@+%lu more\", tabs, skipped];\n    }\n    [string appendFormat:@\"\\n\"];\n    \n    return string;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Support/RLMModelExporter.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n\ntypedef NS_ENUM(NSInteger, RLMModelExporterLanguage) {\n    RLMModelExporterLanguageJava,\n    RLMModelExporterLanguageObjectiveC,\n    RLMModelExporterLanguageSwift,\n    RLMModelExporterLanguageJavaScript,\n    RLMModelExporterLanguageCSharp\n};\n\n@interface RLMModelExporter : NSObject\n\n+ (void)saveModelsForSchemas:(NSArray *)objectSchemas inLanguage:(RLMModelExporterLanguage)language window:(NSWindow *)window;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Support/RLMModelExporter.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMModelExporter.h\"\n\n@import AppSandboxFileAccess;\n@import Realm;\n@import Realm.Private;\n\n@implementation NSString (Indentation)\n\n- (NSString *)indentedBy:(NSInteger)indent {\n    if (indent <= 0) {\n        return self;\n    }\n\n    NSString *tmp = [self stringByReplacingOccurrencesOfString:@\"\\n\" withString:@\"\\n \"];\n\n    return [[@\" \" stringByAppendingString:tmp] indentedBy:indent - 1];\n}\n\n@end\n\n@implementation RLMModelExporter\n\n#pragma mark - Public methods\n\n+ (void)saveModelsForSchemas:(NSArray *)objectSchemas inLanguage:(RLMModelExporterLanguage)language window:(NSWindow *)window\n{\n    void(^saveMultipleFiles)(NSSavePanel *, void(^)()) = ^void(NSSavePanel *panel, void(^completionBlock)()) {\n        [panel beginSheetModalForWindow:window completionHandler:^(NSInteger result) {\n            if (result == NSFileHandlingPanelOKButton) {\n                [panel orderOut:self];\n                completionBlock(panel);\n            }\n        }];\n    };\n\n    void(^saveSingleFile)(NSArray *(^)(NSString *)) = ^void(NSArray *(^modelsWithFileName)(NSString *fileName)) {\n        NSSavePanel *panel = [NSSavePanel savePanel];\n        panel.prompt = @\"Save\";\n        panel.nameFieldStringValue = @\"RealmModels\";\n\n        saveMultipleFiles(panel, ^{\n            NSString *fileName = [[panel.URL lastPathComponent] stringByDeletingPathExtension];\n            [self saveModels:modelsWithFileName(fileName) toFolder:[panel.URL URLByDeletingLastPathComponent]];\n        });\n    };\n\n    switch (language) {\n        case RLMModelExporterLanguageJava:\n        {\n            NSOpenPanel *panel = [NSOpenPanel openPanel];\n            panel.prompt = @\"Select folder\";\n            panel.canCreateDirectories = YES;\n            panel.canChooseDirectories = YES;\n            panel.canChooseFiles = NO;\n\n            saveMultipleFiles(panel, ^{\n                [self saveModels:[self javaModelsOfSchemas:objectSchemas] toFolder:panel.URL];\n            });\n            break;\n        }\n        case RLMModelExporterLanguageObjectiveC:\n        {\n            saveSingleFile(^(NSString *fileName){\n                return [self objcModelsOfSchemas:objectSchemas withFileName:fileName];\n            });\n            break;\n        }\n        case RLMModelExporterLanguageSwift:\n        {\n            saveSingleFile(^(NSString *fileName){\n                return [self swiftModelsOfSchemas:objectSchemas withFileName:fileName];\n            });\n            break;\n        }\n        case RLMModelExporterLanguageJavaScript:\n        {\n            saveSingleFile(^(NSString *fileName){\n                return [self javaScriptModelsOfSchemas:objectSchemas withFileName:fileName];\n            });\n            break;\n        }\n        case RLMModelExporterLanguageCSharp:\n        {\n            saveSingleFile(^(NSString *fileName){\n                return [self cSharpModelsOfSchemas:objectSchemas withFileName:fileName];\n            });\n            break;\n        }\n    }\n}\n\n#pragma mark - Private methods - Helpers\n\n+ (void)saveModels:(NSArray *)models toFolder:(NSURL *)url\n{\n    AppSandboxFileAccess *fileAccess = [AppSandboxFileAccess fileAccess];\n    [fileAccess requestAccessPermissionsForFileURL:url persistPermission:YES withBlock:^(NSURL *securityScopedURL, NSData *bookmarkData) {\n        [securityScopedURL startAccessingSecurityScopedResource];\n\n        // A 'model' is an array with two strings, a filename plus the contents of that file\n        for (NSArray *model in models) {\n            NSURL *fileURL = [url URLByAppendingPathComponent:model[0]];\n            NSString *fileContents = model[1];\n\n            NSError *error;\n            BOOL success = [fileContents writeToURL:fileURL atomically:YES encoding:NSUTF8StringEncoding error:&error];\n\n            if (!success) {\n                NSLog(@\"Error writing file at %@\\n%@\", url, [error localizedFailureReason]);\n                [[NSApplication sharedApplication] presentError:error];\n            }\n        }\n\n        [securityScopedURL stopAccessingSecurityScopedResource];\n    }];\n}\n\n#pragma mark - Private methods - Java helpers\n\n+ (NSArray *)javaModelsOfSchemas:(NSArray *)schemas\n{\n    NSMutableArray *models = [NSMutableArray arrayWithCapacity:schemas.count];\n\n    for (RLMObjectSchema *schema in schemas) {\n        // imports\n        NSMutableOrderedSet *realmImports = [NSMutableOrderedSet orderedSetWithArray:@[@\"io.realm.RealmObject\"]];\n        NSMutableOrderedSet *objectImports = [NSMutableOrderedSet orderedSet];\n        for (RLMProperty *property in schema.properties) {\n            if (property.array) {\n                [realmImports addObject:@\"io.realm.RealmList\"];\n            }\n            if (property.type == RLMPropertyTypeObject) {\n                [objectImports addObject:property.objectClassName];\n            }\n            if (property.isPrimary) {\n                [realmImports addObject:@\"io.realm.annotations.PrimaryKey\"];\n            } else if (property.indexed) {\n                [realmImports addObject:@\"io.realm.annotations.Index\"];\n            }\n            if (!property.optional && [self javaPropertyTypeCanBeMarkedRequired:property.type]) {\n                [realmImports addObject:@\"io.realm.annotations.Required\"];\n            }\n        }\n\n        NSMutableString *model = [NSMutableString stringWithString:@\"package your.package.name.here;\\n\\n\"];\n        for (NSString *import in realmImports) {\n            [model appendFormat:@\"import %@;\\n\", import];\n        }\n        for (NSString *import in objectImports) {\n            [model appendFormat:@\"import %@;\\n\", import];\n        }\n        [model appendFormat:@\"\\npublic class %@ extends RealmObject {\\n\", schema.className];\n\n        // fields\n        for (RLMProperty *property in schema.properties) {\n            if (property.isPrimary) {\n                [model appendString:@\"    @PrimaryKey\\n\"];\n            } else if (property.indexed) {\n                [model appendString:@\"    @Index\\n\"];\n            }\n            if (!property.optional && [self javaPropertyTypeCanBeMarkedRequired:property.type]) {\n                [model appendString:@\"    @Required\\n\"];\n            }\n            [model appendFormat:@\"    private %@ %@;\\n\", [self javaNameForProperty:property], property.name];\n        }\n        [model appendFormat:@\"\\n\"];\n\n        // setters and getters\n        for (RLMProperty *property in schema.properties) {\n            NSString *javaNameForProperty = [self javaNameForProperty:property];\n            [model appendFormat:@\"    public %@ %@%@() { return %@; }\\n\\n\",\n             javaNameForProperty, (property.type == RLMPropertyTypeBool) ? @\"is\" : @\"get\",\n             [property.name capitalizedString], property.name];\n            [model appendFormat:@\"    public void set%@(%@ %@) { this.%@ = %@; } \\n\\n\",\n             [property.name capitalizedString], javaNameForProperty, property.name, property.name,\n             property.name\n             ];\n        }\n\n        [model appendFormat:@\"}\\n\"];\n\n        [models addObject:@[[schema.className stringByAppendingPathExtension:@\"java\"], model]];\n    }\n\n    return models;\n}\n\n+ (NSString *)javaNameForProperty:(RLMProperty *)property\n{\n    if (property.array) {\n        switch (property.type) {\n            case RLMPropertyTypeBool:\n                return @\"RealmList<Boolean>\";\n            case RLMPropertyTypeInt:\n                return @\"RealmList<Long>\";\n            case RLMPropertyTypeFloat:\n                return @\"RealmList<Float>\";\n            case RLMPropertyTypeDouble:\n                return @\"RealmList<Double>\";\n            case RLMPropertyTypeString:\n                return @\"RealmList<String>\";\n            case RLMPropertyTypeData:\n                return @\"RealmList<byte[]>\";\n            case RLMPropertyTypeDate:\n                return @\"RealmList<Date>\";\n            case RLMPropertyTypeObject:\n                return [NSString stringWithFormat:@\"RealmList<%@>\", property.objectClassName];\n            default:\n                return @\"Unsupported Type\";\n        }\n    }\n    switch (property.type) {\n        case RLMPropertyTypeBool:\n            return property.optional ? @\"Boolean\" : @\"boolean\";\n        case RLMPropertyTypeInt:\n            return property.optional ? @\"Long\" : @\"long\";\n        case RLMPropertyTypeFloat:\n            return property.optional ? @\"Float\" : @\"float\";\n        case RLMPropertyTypeDouble:\n            return property.optional ? @\"Double\" : @\"double\";\n        case RLMPropertyTypeString:\n            return @\"String\";\n        case RLMPropertyTypeData:\n            return @\"byte[]\";\n        case RLMPropertyTypeAny:\n            return @\"Any\";  // FIXME: we don't support it\n        case RLMPropertyTypeDate:\n            return @\"Date\";\n        case RLMPropertyTypeObject:\n            return property.objectClassName;\n        case RLMPropertyTypeLinkingObjects:\n            return @\"RealmList\";\n    }\n\n    return nil;\n}\n\n+ (BOOL)javaPropertyTypeCanBeMarkedRequired:(RLMPropertyType)type\n{\n    switch (type) {\n        case RLMPropertyTypeBool:\n        case RLMPropertyTypeInt:\n        case RLMPropertyTypeFloat:\n        case RLMPropertyTypeDouble:\n        case RLMPropertyTypeObject:\n            return NO;\n        case RLMPropertyTypeString:\n        case RLMPropertyTypeData:\n        case RLMPropertyTypeAny:\n        case RLMPropertyTypeDate:\n        case RLMPropertyTypeLinkingObjects:\n            return YES;\n    }\n\n    return NO;\n}\n\n#pragma mark - Private methods - Objective-C helpers\n\n+ (NSArray *)objcModelsOfSchemas:(NSArray *)schemas withFileName:(NSString *)fileName\n{\n    // Filename for h-file\n    NSString *hFilename = [fileName stringByAppendingPathExtension:@\"h\"];\n\n    // Contents of h-file\n    NSMutableString *hContents= [NSMutableString stringWithFormat:@\"#import <Foundation/Foundation.h>\\n#import <Realm/Realm.h>\\n\\n\"];\n    for (RLMObjectSchema *schema in schemas) {\n        [hContents appendFormat:@\"@interface %@ : RLMObject\\n@end\\n\\n\", schema.className];\n    }\n    [hContents appendString:@\"\\n\"];\n\n    for (RLMObjectSchema *schema in schemas) {\n        [hContents appendFormat:@\"RLM_ARRAY_TYPE(%@)\\n\", schema.className];\n    }\n    [hContents appendString:@\"\\n\\n\"];\n\n    [hContents appendString:@\"NS_ASSUME_NONNULL_BEGIN\\n\\n\"];\n\n    for (RLMObjectSchema *schema in schemas) {\n        [hContents appendFormat:@\"@interface %@()\\n\\n\", schema.className];\n        for (RLMProperty *property in schema.properties) {\n            [hContents appendFormat:@\"@property %@%@%@;\\n\", property.optional ? @\"(nullable) \" : @\"\", [self objcNameForProperty:property], property.name];\n        }\n        [hContents appendString:@\"\\n@end\\n\\n\"];\n    }\n\n    [hContents appendString:@\"NS_ASSUME_NONNULL_END\\n\"];\n\n    // An array with filename and contents for the h-file model\n    NSArray *hModel = @[hFilename, hContents];\n\n    // Contents of m-file\n    NSMutableString *mContents = [NSMutableString stringWithFormat:@\"#import \\\"%@\\\"\\n\\n\", hFilename];\n    for (RLMObjectSchema *schema in schemas) {\n        [mContents appendFormat:@\"@implementation %@\\n\", schema.className];\n\n        NSArray *requiredProperties = [[schema.properties filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(RLMProperty *property, __unused NSDictionary *bindings) {\n            return !property.optional && [self objcPropertyTypeIsOptionalByDefault:property.type];\n        }]] valueForKey:@\"name\"];\n        if (requiredProperties.count > 0) {\n            [mContents appendString:@\"\\n+ (NSArray<NSString *> *)requiredProperties {\\n    return @[\\n\"];\n            for (NSString *requiredProperty in requiredProperties) {\n                [mContents appendFormat:@\"        @\\\"%@\\\",\\n\", requiredProperty];\n            }\n            [mContents appendString:@\"    ];\\n}\\n\"];\n        }\n\n        NSString *primaryKey = [[[schema.properties filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@\"isPrimary == YES\"]] firstObject] name];\n        if (primaryKey) {\n            [mContents appendFormat:@\"\\n+ (NSString *)primaryKey {\\n    return @\\\"%@\\\";\\n}\\n\", primaryKey];\n        }\n\n        NSArray *indexedProperties = [[schema.properties filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@\"isPrimary == NO && indexed == YES\"]] valueForKey:@\"name\"];\n        if (indexedProperties.count > 0) {\n            [mContents appendString:@\"\\n+ (NSArray<NSString *> *)indexedProperties {\\n    return @[\\n\"];\n            for (NSString *indexedProperty in indexedProperties) {\n                [mContents appendFormat:@\"        @\\\"%@\\\",\\n\", indexedProperty];\n            }\n            [mContents appendString:@\"    ];\\n}\\n\"];\n        }\n\n        [mContents appendString:@\"\\n@end\\n\\n\\n\"];\n    }\n\n    // An array with filename and contents for the m-file model\n    NSArray *mModel = @[[fileName stringByAppendingPathExtension:@\"m\"], mContents];\n\n    // An aray with models for both files\n    return @[hModel, mModel];\n}\n\n+ (NSString *)objcNameForProperty:(RLMProperty *)property\n{\n    if (property.array) {\n        switch (property.type) {\n            case RLMPropertyTypeBool:\n                return @\"RLMArray<NSNumber *><RLMBool> *\";\n            case RLMPropertyTypeInt:\n                return @\"RLMArray<NSNumber *><RLMInt> *\";\n            case RLMPropertyTypeFloat:\n                return @\"RLMArray<NSNumber *><RLMFloat> *\";\n            case RLMPropertyTypeDouble:\n                return @\"RLMArray<NSNumber *><RLMDouble> *\";\n            case RLMPropertyTypeString:\n                return @\"RLMArray<NSString *><RLMString> *\";\n            case RLMPropertyTypeData:\n                return @\"RLMArray<NSData *><RLMData> *\";\n            case RLMPropertyTypeAny:\n                return @\"id \";\n            case RLMPropertyTypeDate:\n                return @\"RLMArray<NSDate *><RLMDate> *\";\n            case RLMPropertyTypeObject:\n                return [NSString stringWithFormat:@\"RLMArray<%@ *><%@> *\", property.objectClassName, property.objectClassName];\n            case RLMPropertyTypeLinkingObjects:\n                return @\"RLMLinkingObjects *\";\n        }\n    }\n    switch (property.type) {\n        case RLMPropertyTypeBool:\n            return property.optional ? @\"NSNumber<RLMBool> *\" : @\"BOOL \";\n        case RLMPropertyTypeInt:\n            return property.optional ? @\"NSNumber<RLMInt> *\" :  @\"NSInteger \";\n        case RLMPropertyTypeFloat:\n            return property.optional ? @\"NSNumber<RLMFloat> *\" : @\"float \";\n        case RLMPropertyTypeDouble:\n            return property.optional ? @\"NSNumber<RLMDouble> *\" : @\"double \";\n        case RLMPropertyTypeString:\n            return @\"NSString *\";\n        case RLMPropertyTypeData:\n            return @\"NSData *\";\n        case RLMPropertyTypeAny:\n            return @\"id \";\n        case RLMPropertyTypeDate:\n            return @\"NSDate *\";\n        case RLMPropertyTypeObject:\n            return [NSString stringWithFormat:@\"%@ *\", property.objectClassName];\n        case RLMPropertyTypeLinkingObjects:\n            return @\"RLMLinkingObjects *\";\n    }\n}\n\n+ (BOOL)objcPropertyTypeIsOptionalByDefault:(RLMPropertyType)type\n{\n    switch (type) {\n        case RLMPropertyTypeBool:\n        case RLMPropertyTypeInt:\n        case RLMPropertyTypeFloat:\n        case RLMPropertyTypeDouble:\n            return NO;\n        case RLMPropertyTypeString:\n        case RLMPropertyTypeData:\n        case RLMPropertyTypeAny:\n        case RLMPropertyTypeDate:\n        case RLMPropertyTypeObject:\n        case RLMPropertyTypeLinkingObjects:\n            return YES;\n    }\n\n    return NO;\n}\n\n#pragma mark - Private methods - Swift helpers\n\n+ (NSArray *)swiftModelsOfSchemas:(NSArray *)schemas withFileName:(NSString *)fileName\n{\n    NSMutableString *contents = [NSMutableString stringWithString:@\"import Foundation\\nimport RealmSwift\\n\\n\"];\n\n    for (RLMObjectSchema *schema in schemas) {\n        [contents appendFormat:@\"class %@: Object {\\n\", schema.className];\n        NSMutableArray<NSString *> *indexedProperties = [NSMutableArray array];\n        NSString *primaryKey = nil;\n\n        for (RLMProperty *property in schema.properties) {\n            [contents appendFormat:@\"  %@\\n\", [self swiftDefinitionForProperty:property]];\n            if (property.isPrimary) {\n                primaryKey = property.name;\n            } else if (property.indexed) {\n                [indexedProperties addObject:property.name];\n            }\n        }\n\n        if (primaryKey) {\n            [contents appendString:@\"\\n  override static func primaryKey() -> String? {\\n\"];\n            [contents appendFormat:@\"    return \\\"%@\\\"\\n\", primaryKey];\n            [contents appendString:@\"  }\\n\"];\n        }\n\n        if (indexedProperties.count > 0) {\n            [contents appendString:@\"\\n  override static func indexedProperties() -> [String] {\\n    return [\\n\"];\n            for (NSString *propertyName in indexedProperties) {\n                [contents appendFormat:@\"      \\\"%@\\\",\\n\", propertyName];\n            }\n            [contents appendString:@\"    ]\\n  }\\n\"];\n        }\n\n        [contents appendString:@\"}\\n\\n\"];\n    }\n\n    // An array of a single model array with filename and contents\n    return @[@[[fileName stringByAppendingPathExtension:@\"swift\"], contents]];\n}\n\n+ (NSString *)swiftDefinitionForProperty:(RLMProperty *)property\n{\n    NSString *(^namedProperty)(NSString *) = ^NSString *(NSString *formatString) {\n        return [NSString stringWithFormat:formatString, property.name];\n    };\n    NSString *(^objectClassProperty)(NSString *) = ^NSString *(NSString *formatString) {\n        return [NSString stringWithFormat:formatString, property.name, property.objectClassName];\n    };\n\n    if (property.array) {\n        NSString *type;\n        switch (property.type) {\n            case RLMPropertyTypeBool:   type = @\"Bool\"; break;\n            case RLMPropertyTypeInt:    type = @\"Int\"; break;\n            case RLMPropertyTypeFloat:  type = @\"Float\"; break;\n            case RLMPropertyTypeDouble: type = @\"Double\"; break;\n            case RLMPropertyTypeString: type = @\"String\"; break;\n            case RLMPropertyTypeData:   type = @\"NSData\"; break;\n            case RLMPropertyTypeDate:   type = @\"NSDate\"; break;\n            case RLMPropertyTypeObject: type = property.objectClassName;\n            case RLMPropertyTypeAny: return @\"/* Error! 'Any' properties are unsupported in Swift. */\";\n            case RLMPropertyTypeLinkingObjects: return @\"\";\n        }\n        return [NSString stringWithFormat:@\"let %@ = List<%@%s>()\", property.name, type,\n                property.optional && property.type != RLMPropertyTypeObject ? \"?\" : \"\"];\n    }\n\n    if (property.optional) {\n        switch (property.type) {\n            case RLMPropertyTypeBool:\n                return namedProperty(@\"let %@ = RealmOptional<Bool>()\");\n            case RLMPropertyTypeInt:\n                return namedProperty(@\"let %@ = RealmOptional<Int>()\");\n            case RLMPropertyTypeFloat:\n                return namedProperty(@\"let %@ = RealmOptional<Float>()\");\n            case RLMPropertyTypeDouble:\n                return namedProperty(@\"let %@ = RealmOptional<Double>()\");\n            case RLMPropertyTypeString:\n                return namedProperty(@\"dynamic var %@: String?\");\n            case RLMPropertyTypeData:\n                return namedProperty(@\"dynamic var %@: NSData?\");\n            case RLMPropertyTypeAny:\n                return @\"/* Error! 'Any' properties are unsupported in Swift. */\";\n            case RLMPropertyTypeDate:\n                return namedProperty(@\"dynamic var %@: NSDate?\");\n            case RLMPropertyTypeObject:\n                return objectClassProperty(@\"dynamic var %@: %@?\");\n            case RLMPropertyTypeLinkingObjects:\n                return @\"\";\n        }\n    }\n\n    switch (property.type) {\n        case RLMPropertyTypeBool:\n            return namedProperty(@\"dynamic var %@ = false\");\n        case RLMPropertyTypeInt:\n            return namedProperty(@\"dynamic var %@ = 0\");\n        case RLMPropertyTypeFloat:\n            return namedProperty(@\"dynamic var %@: Float = 0\");\n        case RLMPropertyTypeDouble:\n            return namedProperty(@\"dynamic var %@: Double = 0\");\n        case RLMPropertyTypeString:\n            return namedProperty(@\"dynamic var %@ = \\\"\\\"\");\n        case RLMPropertyTypeData:\n            return namedProperty(@\"dynamic var %@ = NSData()\");\n        case RLMPropertyTypeAny:\n            return @\"/* Error! 'Any' properties are unsupported in Swift. */\";\n        case RLMPropertyTypeDate:\n            return namedProperty(@\"dynamic var %@ = NSDate()\");\n        case RLMPropertyTypeObject:\n            return @\"/* Error! 'Object' properties should always be optional. Please report this by emailing help@realm.io. */\";\n        case RLMPropertyTypeLinkingObjects:\n            return @\"\";\n    }\n\n    return nil;\n}\n\n#pragma mark - Private methods - JavaScript helpers\n\n+ (NSArray *)javaScriptModelsOfSchemas:(NSArray *)schemas withFileName:(NSString *)fileName\n{\n    NSMutableString *contents = [NSMutableString string];\n    NSMutableString *exports = [NSMutableString stringWithString:@\"module.exports = {\\n\"];\n\n    for (RLMObjectSchema *schema in schemas) {\n        NSString *schemaName = [schema.className stringByAppendingString:@\"Schema\"];\n        [exports appendFormat:@\"  %@\", schemaName];\n        [exports appendFormat:@\"%@\", (schema != [schemas lastObject]) ? @\",\\n\" : @\"\\n\"];\n\n        [contents appendFormat:@\"const %@ = {\\n\", schemaName];\n        [contents appendFormat:@\"  name: '%@',\\n\", schema.className];\n        NSMutableString *properties = [NSMutableString stringWithString:@\"  properties: {\\n\"];\n        NSString *primaryKey = nil;\n\n        for (RLMProperty *property in schema.properties) {\n            if (property.isPrimary) {\n                primaryKey = property.name;\n            }\n            [properties appendString:[self javaScriptDefinitionForProperty:property]];\n            [properties appendFormat:@\"%@\", (property != [schema.properties lastObject]) ? @\",\\n\" : @\"\\n\"];\n\n        }\n\n        [properties appendString:@\"  }\\n\"];\n\n        if (primaryKey) {\n            [contents appendFormat:@\"  primaryKey: '%@',\\n\", primaryKey];\n        }\n\n        [contents appendString:properties];\n        [contents appendString:@\"};\\n\\n\"];\n    }\n\n    [exports appendString:@\"};\\n\"];\n    [contents appendString:exports];\n\n    // An array of a single model array with filename and contents\n    return @[@[[fileName stringByAppendingPathExtension:@\"js\"], contents]];\n}\n\n+ (NSString *)javaScriptDefinitionForProperty:(RLMProperty *)property\n{\n    NSMutableDictionary *props = [NSMutableDictionary dictionary];\n\n    switch (property.type) {\n        case RLMPropertyTypeBool:\n            props[@\"type\"] = @\"bool\";\n            break;\n        case RLMPropertyTypeInt:\n            props[@\"type\"] = @\"int\";\n            break;\n        case RLMPropertyTypeFloat:\n            props[@\"type\"] = @\"float\";\n            break;\n        case RLMPropertyTypeDouble:\n            props[@\"type\"] = @\"double\";\n            break;\n        case RLMPropertyTypeString:\n            props[@\"type\"] = @\"string\";\n            break;\n        case RLMPropertyTypeData:\n            props[@\"type\"] = @\"data\";\n            break;\n        case RLMPropertyTypeAny:\n            break;\n        case RLMPropertyTypeDate:\n            props[@\"type\"] = @\"date\";\n            break;\n        case RLMPropertyTypeObject:\n        case RLMPropertyTypeLinkingObjects:\n            props[@\"type\"] = property.objectClassName;\n            break;\n    }\n\n    if (property.array) {\n        props[@\"type\"] = [props[@\"type\"] stringByAppendingString:@\"[]\"];\n    }\n\n    if (property.indexed && !property.isPrimary) {\n        props[@\"indexed\"] = @\"true\";\n    }\n\n    if (property.optional) {\n        props[@\"optional\"] = @\"true\";\n    }\n\n    if ([props count] == 1) {\n        return [NSString stringWithFormat:@\"    %@: '%@'\", property.name, props[@\"type\"]];\n    }\n\n    NSMutableString *definition = [NSMutableString stringWithFormat:@\"    %@: {\", property.name];\n    NSInteger count = props.count, check = 0;\n    for (NSString *key in props) {\n        NSString *value = [NSString stringWithFormat:@\"'%@'\", props[key]];\n        if ([key isEqualToString:@\"indexed\"] || [key isEqualToString:@\"optional\"]) {\n            value = [props objectForKey:key];\n        }\n        [definition appendFormat:@\" %@: %@%@\", key, value, (++check == count) ? @\" }\" : @\", \"];\n    }\n\n    return definition;\n}\n\n#pragma mark - Private methods - C# helpers\n\n+ (NSArray *)cSharpModelsOfSchemas:(NSArray *)schemas withFileName:(NSString *)fileName {\n    NSMutableString *contents = [NSMutableString stringWithString:@\"using System;\\nusing System.Collections.Generic;\\nusing Realms;\\n\\n\"];\n\n    for (RLMObjectSchema *schema in schemas) {\n        [contents appendFormat:@\"public class %@ : RealmObject\\n{\\n\", schema.className];\n\n        for (RLMProperty *property in schema.properties) {\n            [contents appendFormat:@\"%@\\n\\n\", [[self cSharpDefinitionForProperty:property] indentedBy:4]];\n        }\n\n        // Delete extra newline\n        [contents deleteCharactersInRange:NSMakeRange(contents.length - 1, 1)];\n\n        [contents appendString:@\"}\\n\\n\"];\n    }\n\n    // Delete extra newline\n    [contents deleteCharactersInRange:NSMakeRange(contents.length - 1, 1)];\n\n    return @[@[[fileName stringByAppendingPathExtension:@\"cs\"], contents]];\n}\n\n+ (NSString *)cSharpDefinitionForProperty:(RLMProperty *)property {\n    NSMutableString *definition = [NSMutableString string];\n\n    BOOL(^typeOptionalByDefault)(RLMPropertyType) = ^BOOL(RLMPropertyType type) {\n        switch (type) {\n            case RLMPropertyTypeString:\n            case RLMPropertyTypeData:\n            case RLMPropertyTypeObject:\n                return true;\n            default:\n                return false;\n        }\n    };\n\n    NSString *(^valueType)(NSString *, BOOL) = ^NSString *(NSString *typename, BOOL optional) {\n        return [typename stringByAppendingString:optional ? @\"?\" : @\"\"];\n    };\n\n    if (property.isPrimary) {\n        [definition appendString:@\"[PrimaryKey]\\n\"];\n    }\n\n    if (property.type == RLMPropertyTypeLinkingObjects) {\n        [definition appendFormat:@\"[Backlink(nameof(%@.%@))]\\n\", property.objectClassName, property.linkOriginPropertyName];\n    }\n\n    if (!property.optional && typeOptionalByDefault(property.type)) {\n        [definition appendString:@\"[Required]\\n\"];\n    }\n\n    NSString *type;\n    NSString *access = @\"get; set;\";\n\n    switch (property.type) {\n        case RLMPropertyTypeBool:\n            type = valueType(@\"bool\", property.optional);\n            break;\n        case RLMPropertyTypeInt:\n            type = valueType(@\"long\", property.optional);\n            break;\n        case RLMPropertyTypeFloat:\n            type = valueType(@\"float\", property.optional);\n            break;\n        case RLMPropertyTypeDouble:\n            type = valueType(@\"double\", property.optional);\n            break;\n        case RLMPropertyTypeString:\n            type = @\"string\";\n            break;\n        case RLMPropertyTypeData:\n            type = @\"byte[]\";\n            break;\n        case RLMPropertyTypeAny:\n            break;\n        case RLMPropertyTypeDate:\n            type = valueType(@\"DateTimeOffset\", property.optional);\n            break;\n        case RLMPropertyTypeObject:\n            type = property.objectClassName;\n            break;\n        case RLMPropertyTypeLinkingObjects:\n            type = [NSString stringWithFormat:@\"IQueryable<%@>\", property.objectClassName];\n            access = @\"get;\";\n            break;\n    }\n    if (property.array && property.type != RLMPropertyTypeLinkingObjects) {\n        type = [NSString stringWithFormat:@\"IList<%@>\", type];\n        access = @\"get;\";\n    }\n\n    [definition appendFormat:@\"public %@ %@ { %@ }\", type, property.name, access];\n\n    return definition;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Support/RLMTestDataGenerator.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n\n@class RLMRealm;\n\n@interface RLMTestDataGenerator : NSObject\n\n+ (BOOL)createRealmAtUrl:(NSURL *)url withClassesNamed:(NSArray *)classNames objectCount:(NSUInteger)objectCount;\n+ (BOOL)createRealmAtUrl:(NSURL *)url withClassesNamed:(NSArray *)classNames objectCount:(NSUInteger)objectCount encryptionKey:(NSData *)encry;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Support/RLMTestDataGenerator.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTestDataGenerator.h\"\n\n@import Realm;\n@import Realm.Private;\n\nconst NSUInteger kMaxItemsInTestArray = 12;\n\n@interface RLMTestDataGenerator ()\n\n@property (nonatomic) NSArray *classNames;\n@property (nonatomic) NSDictionary *existingObjects;\n\n@end\n\n\n@implementation RLMTestDataGenerator\n\n// Creates a test realm at [url], filled with [objectCount] random objects of classes in [classNames]\n+(BOOL)createRealmAtUrl:(NSURL *)url withClassesNamed:(NSArray *)classNames objectCount:(NSUInteger)objectCount\n{\n    return [RLMTestDataGenerator createRealmAtUrl:url withClassesNamed:classNames objectCount:objectCount encryptionKey:nil];\n}\n\n+ (BOOL)createRealmAtUrl:(NSURL *)url withClassesNamed:(NSArray *)classNames\n             objectCount:(NSUInteger)objectCount encryptionKey:(NSData *)encryptionKey\n{\n    NSError *error;\n    RLMRealmConfiguration *configuration = [[RLMRealmConfiguration alloc] init];\n    configuration.fileURL = url;\n    configuration.readOnly = NO;\n    if (encryptionKey) {\n        configuration.encryptionKey = encryptionKey;\n    }\n    \n    RLMRealm *realm = [RLMRealm realmWithConfiguration:configuration error:&error];\n    \n    if (error) {\n        [[NSApplication sharedApplication] presentError:error];\n        return NO;\n    }\n    \n    RLMTestDataGenerator *generator = [[RLMTestDataGenerator alloc] initWithClassesNamed:classNames];\n    [generator populateRealm:realm withObjectCount:objectCount];\n    \n    return YES;\n}\n\n// Initializes the testDataGenerator and saves the desired [classNames]\n-(instancetype)initWithClassesNamed:(NSArray *)classNames\n{\n    self = [super init];\n    if (self) {\n        self.classNames = classNames;\n        \n        NSMutableDictionary *existingObjects = [NSMutableDictionary dictionary];\n        for (NSString *className in classNames) {\n            existingObjects[className] = [NSMutableArray array];\n        }\n        \n        self.existingObjects = existingObjects;\n    }\n    \n    return self;\n}\n\n// Fills the supplied [realm] with [objectCount] objects of types in self.classNames\n-(void)populateRealm:(RLMRealm *)realm withObjectCount:(NSUInteger)objectCount\n{\n    [realm beginWriteTransaction];\n    \n    for (NSString *className in self.classNames) {\n        Class class = NSClassFromString(className);\n        \n        for (NSUInteger index = 0; index < objectCount; index++) {\n            [self randomObjectOfClass:class inRealm:realm];\n        }\n    }\n    \n    [realm commitWriteTransaction];\n}\n\n// Creates a new random object of [class] and puts in realm\n-(RLMObject *)randomObjectOfClass:(Class)class inRealm:(RLMRealm *)realm\n{\n    return [self randomObjectOfClass:class inRealm:realm tryToReuse:NO];\n}\n\n// Creates a random object of [class] and puts in realm, possibly through [reuse] of existing objects of same class\n-(RLMObject *)randomObjectOfClass:(Class)class inRealm:(RLMRealm *)realm tryToReuse:(BOOL)reuse\n{\n    NSMutableArray *existingObjectsOfRequiredClass = self.existingObjects[class.className];\n    NSUInteger existingCount = existingObjectsOfRequiredClass.count;\n    \n    // If reuse is desired and there is something to reuse, return existing object\n    if (reuse && existingCount > 0) {\n        NSUInteger index = arc4random_uniform((u_int32_t)existingCount);\n        return existingObjectsOfRequiredClass[index];\n    }\n    \n    RLMObjectSchema *objectSchema = [realm.schema schemaForClassName:class.className];\n    \n    // Make array to keep property values\n    NSMutableArray *propertyValues = [NSMutableArray array];\n    \n    // Go through properties and fill with random values\n    for (RLMProperty *property in objectSchema.properties) {\n        if (property.array) {\n            NSMutableArray *testArray = [NSMutableArray array];\n            for (NSUInteger i = 0, count = arc4random_uniform(kMaxItemsInTestArray + 1); i < count; i++) {\n                [testArray addObject:[self randomValueOfType:property.type objectClassName:property.objectClassName inRealm:realm]];\n            }\n            [propertyValues addObject:testArray];\n            continue;\n        }\n        [propertyValues addObject:[self randomValueOfType:property.type objectClassName:property.objectClassName inRealm:realm]];\n    }\n\n    // Create an object from [propertyValues] and put in [realm]\n    RLMObject *newObject = [class createInRealm:realm withValue:propertyValues];\n    \n    // Add object to store of existing objects\n    [existingObjectsOfRequiredClass addObject:newObject];\n    \n    return newObject;\n}\n\n- (id)randomValueOfType:(RLMPropertyType)type  objectClassName:(NSString *)objectClassName inRealm:(RLMRealm *)realm\n{\n    switch (type) {\n        case RLMPropertyTypeBool:\n            return @([self randomBool]);\n        case RLMPropertyTypeInt:\n            return @([self randomInteger]);\n        case RLMPropertyTypeFloat:\n            return @([self randomFloat]);\n        case RLMPropertyTypeDouble:\n            return @([self randomDouble]);\n        case RLMPropertyTypeDate:\n            return [self randomDate];\n        case RLMPropertyTypeString:\n            return [self randomString];\n        case RLMPropertyTypeData:\n            return [self randomData];\n        case RLMPropertyTypeAny:\n            return [self randomAny];\n        case RLMPropertyTypeObject:\n            return [self randomObjectOfClass:NSClassFromString(objectClassName) inRealm:realm tryToReuse:YES];\n        case RLMPropertyTypeLinkingObjects:\n            return nil;\n    }\n}\n\n-(BOOL)randomBool\n{\n    return arc4random() % 2 == 0;\n}\n\n-(NSInteger)randomInteger\n{\n    NSUInteger type = arc4random_uniform(20);\n\n    switch (type) {\n        case 0:\n            return INTMAX_MIN;\n        case 1:\n            return INTMAX_MAX;\n        case 2:\n            return 0;\n        default:\n            return arc4random_uniform(9999999);\n    }\n}\n\n-(float)randomFloat\n{\n    NSUInteger type = arc4random_uniform(20);\n    \n    switch (type) {\n        case 0:\n            return FLT_MIN;\n        case 1:\n            return FLT_MAX;\n        case 2:\n            return 0;\n        default:\n            return arc4random_uniform(9999999)/9999.0f;\n    }\n}\n\n-(double)randomDouble\n{\n    NSUInteger type = arc4random_uniform(20);\n    \n    switch (type) {\n        case 0:\n            return DBL_MIN;\n        case 1:\n            return DBL_MAX;\n        case 2:\n            return 0;\n        default:\n            return arc4random_uniform(9999999)/9999.0;\n    }\n}\n\n-(NSDate *)randomDate\n{\n    return [[NSDate date] dateByAddingTimeInterval:-(double)arc4random_uniform(999999999)];\n}\n\n-(NSString *)randomString\n{\n    NSString *result = [[NSUUID UUID] UUIDString];\n\n    if (arc4random_uniform(100) == 0) {\n       result = [result stringByPaddingToLength:10000 withString: @\" bla\" startingAtIndex:0];\n    }\n    \n    return result;\n}\n\n-(NSData *)randomData\n{\n    return [[self randomString] dataUsingEncoding:NSUTF8StringEncoding];\n}\n\n-(id)randomAny\n{\n    switch (arc4random() % 3) {\n        case 0:\n            return [self randomString];\n        case 1:\n            return [self randomData];\n        default:\n            return [self randomDate];\n    }\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Support/RLMUtils.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import <Foundation/Foundation.h>\n\nNSString *RLMRealHomeDirectory();\n"
  },
  {
    "path": "RealmBrowser/Support/RLMUtils.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMUtils.h\"\n#include <pwd.h>\n\nNSString *RLMRealHomeDirectory() {\n    struct passwd *pw = getpwuid(getuid());\n    return @(pw->pw_dir);\n}\n"
  },
  {
    "path": "RealmBrowser/Support/TestClasses.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n@import Realm;\n\n@interface RealmTestClass0 : RLMObject\n\n@property NSInteger integerValue;\n@property NSString *stringValue;\n@property NSData *dataValue;\n\n@end\n\nRLM_ARRAY_TYPE(RealmTestClass0)\n\n@interface RealmTestClass1 : RLMObject\n\n@property NSInteger integerValue;\n@property BOOL boolValue;\n@property float floatValue;\n@property double doubleValue;\n@property NSString *stringValue;\n@property NSDate *dateValue;\n@property RLMArray<RealmTestClass0> *arrayReference;\n\n@end\n\n@interface RealmTestClass2 : RLMObject\n\n@property NSInteger integerValue;\n@property BOOL boolValue;\n@property RealmTestClass1 *objectReference;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Support/TestClasses.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"TestClasses.h\"\n\n@implementation RealmTestClass0\n\n@end\n\n@implementation RealmTestClass1\n\n@end\n\n@implementation RealmTestClass2\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Supporting Files/Realm Browser.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>com.apple.security.app-sandbox</key>\n\t<true/>\n\t<key>com.apple.security.files.user-selected.read-write</key>\n\t<true/>\n\t<key>com.apple.security.network.client</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "RealmBrowser/Supporting Files/RealmBrowser-Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDocumentTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeIconFile</key>\n\t\t\t<string>RealmFileIcon</string>\n\t\t\t<key>CFBundleTypeName</key>\n\t\t\t<string>Realm</string>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>LSItemContentTypes</key>\n\t\t\t<array>\n\t\t\t\t<string>io.realm.realm</string>\n\t\t\t</array>\n\t\t\t<key>NSDocumentClass</key>\n\t\t\t<string>RLMDocument</string>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIconFile</key>\n\t<string></string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>3.0.21</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLIconFile</key>\n\t\t\t<string>RealmFileIcon</string>\n\t\t\t<key>CFBundleURLName</key>\n\t\t\t<string>Realm Sync URL</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n\t\t\t\t<string>realm</string>\n\t\t\t</array>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLIconFile</key>\n\t\t\t<string>RealmFileIcon</string>\n\t\t\t<key>CFBundleURLName</key>\n\t\t\t<string>Secure Realm Sync URL</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n\t\t\t\t<string>realms</string>\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleVersion</key>\n\t<string>101</string>\n\t<key>LSApplicationCategoryType</key>\n\t<string>public.app-category.developer-tools</string>\n\t<key>LSMinimumSystemVersion</key>\n\t<string>${MACOSX_DEPLOYMENT_TARGET}</string>\n\t<key>NSAppTransportSecurity</key>\n\t<dict>\n\t\t<key>NSAllowsArbitraryLoads</key>\n\t\t<true/>\n\t</dict>\n\t<key>NSHumanReadableCopyright</key>\n\t<string>Copyright © 2014-2016 Realm inc. All rights reserved.</string>\n\t<key>NSMainNibFile</key>\n\t<string>MainMenu</string>\n\t<key>NSPrincipalClass</key>\n\t<string>BITCrashExceptionApplication</string>\n\t<key>UTExportedTypeDeclarations</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>UTTypeConformsTo</key>\n\t\t\t<array>\n\t\t\t\t<string>public.data</string>\n\t\t\t</array>\n\t\t\t<key>UTTypeDescription</key>\n\t\t\t<string>Realm</string>\n\t\t\t<key>UTTypeIconFile</key>\n\t\t\t<string>RealmFileIcon</string>\n\t\t\t<key>UTTypeIdentifier</key>\n\t\t\t<string>io.realm.realm</string>\n\t\t\t<key>UTTypeReferenceURL</key>\n\t\t\t<string>https://realm.io</string>\n\t\t\t<key>UTTypeTagSpecification</key>\n\t\t\t<dict>\n\t\t\t\t<key>public.filename-extension</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>realm</string>\n\t\t\t\t</array>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "RealmBrowser/Supporting Files/RealmBrowser-Prefix.pch",
    "content": "//\n//  Prefix header\n//\n//  The contents of this file are implicitly included at the beginning of every source file.\n//\n\n#ifdef __OBJC__\n    @import Cocoa;\n#endif\n"
  },
  {
    "path": "RealmBrowser/Supporting Files/en.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\n"
  },
  {
    "path": "RealmBrowser/Supporting Files/main.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\nint main(int argc, const char * argv[])\n{\n    return NSApplicationMain(argc, argv);\n}\n"
  },
  {
    "path": "RealmBrowser/Views/RLMBadgeTableCellView.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n#import \"RLMLinkTableCellView.h\"\n\n@interface RLMBadgeTableCellView : RLMLinkTableCellView\n\n@property (assign) IBOutlet NSButton *badge;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMBadgeTableCellView.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMBadgeTableCellView.h\"\n\n@implementation RLMBadgeTableCellView\n\n- (instancetype)initWithFrame:(NSRect)frameRect\n{\n    self = [super initWithFrame:frameRect];\n    \n    if (self == nil) {\n        return nil;\n    }\n\n    NSButton *button = [[NSButton alloc] initWithFrame:NSZeroRect];\n    button.translatesAutoresizingMaskIntoConstraints = NO;\n    button.buttonType = NSMomentaryPushInButton;\n    button.bezelStyle = NSInlineBezelStyle;\n\n    if ([button respondsToSelector:@selector(setLineBreakMode:)]) {\n        button.lineBreakMode = NSLineBreakByTruncatingTail;\n    }\n    \n    self.badge = button;\n    [self addSubview:button];\n    \n    // Remove all constraints from RLMLinkTableCellView\n    [self removeConstraints:self.constraints];\n\n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeLeading\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeLeading\n                                                    multiplier:1\n                                                      constant:0]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeTop\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeTop\n                                                    multiplier:1\n                                                      constant:0]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeBottom\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeBottom\n                                                    multiplier:1\n                                                      constant:0]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.badge\n                                                     attribute:NSLayoutAttributeLeading\n                                                     relatedBy:NSLayoutRelationGreaterThanOrEqual\n                                                        toItem:self.textField\n                                                     attribute:NSLayoutAttributeTrailing\n                                                    multiplier:1\n                                                      constant:4]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.badge\n                                                     attribute:NSLayoutAttributeTrailing\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeTrailing\n                                                    multiplier:1\n                                                      constant:0]];\n\n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.badge\n                                                     attribute:NSLayoutAttributeCenterY\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeCenterY\n                                                    multiplier:1\n                                                      constant:0]];\n\n    [self.badge setContentCompressionResistancePriority:NSLayoutPriorityRequired forOrientation:NSLayoutConstraintOrientationHorizontal];\n    \n    return self;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMBasicTableCellView.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTableCellView.h\"\n\n@interface RLMBasicTableCellView : RLMTableCellView\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMBasicTableCellView.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMBasicTableCellView.h\"\n\n@implementation RLMBasicTableCellView\n\n- (instancetype)initWithFrame:(NSRect)frameRect\n{\n    self = [super initWithFrame:frameRect];\n    \n    if (self == nil) {\n        return nil;\n    }\n    \n    NSTextField *textField = [[NSTextField alloc] initWithFrame:self.bounds];\n    textField.translatesAutoresizingMaskIntoConstraints = NO;\n    textField.bordered = NO;\n    textField.drawsBackground = NO;\n    textField.cell.sendsActionOnEndEditing = YES;\n\n    if ([NSFont respondsToSelector:@selector(monospacedDigitSystemFontOfSize:weight:)]) {\n        textField.font = [NSFont monospacedDigitSystemFontOfSize:12.0 weight:NSFontWeightRegular];\n    }\n    \n    if ([textField respondsToSelector:@selector(setLineBreakMode:)]) {\n        textField.lineBreakMode = NSLineBreakByTruncatingTail;\n    }\n        \n    self.textField = textField;\n    [self addSubview:textField];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeLeading\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeLeading\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeTrailing\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeTrailing\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeTop\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeTop\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeBottom\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeBottom\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n    \n    return self;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMBoolTableCellView.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTableCellView.h\"\n\n@interface RLMBoolTableCellView : RLMTableCellView\n\n@property (assign) IBOutlet NSButton *checkBox;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMBoolTableCellView.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMBoolTableCellView.h\"\n\n@implementation RLMBoolTableCellView\n\n- (instancetype)initWithFrame:(NSRect)frameRect\n{\n    self = [super initWithFrame:frameRect];\n    \n    if (self == nil) {\n        return nil;\n    }\n    \n    NSButton *button = [[NSButton alloc] initWithFrame:self.bounds];\n    button.translatesAutoresizingMaskIntoConstraints = NO;\n    button.title = @\"\";\n    button.buttonType = NSSwitchButton;\n    \n    self.checkBox = button;\n    [self addSubview:button];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.checkBox\n                                                     attribute:NSLayoutAttributeCenterX\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeCenterX\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.checkBox\n                                                     attribute:NSLayoutAttributeCenterY\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeCenterY\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n\n    return self;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMImageTableCellView.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n#import \"RLMTableCellView.h\"\n\n@interface RLMImageTableCellView : RLMTableCellView\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMImageTableCellView.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMImageTableCellView.h\"\n\n@implementation RLMImageTableCellView\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMLinkTableCellView.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMBasicTableCellView.h\"\n\n@interface RLMLinkTableCellView : RLMBasicTableCellView\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMLinkTableCellView.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMLinkTableCellView.h\"\n#import \"NSColor+ByteSizeFactory.h\"\n\n@implementation RLMLinkTableCellView\n\n- (void)setBackgroundStyle:(NSBackgroundStyle)backgroundStyle {\n    [super setBackgroundStyle:backgroundStyle];\n    self.textField.textColor = (backgroundStyle == NSBackgroundStyleLight ? [NSColor linkColor] : [NSColor whiteColor]);\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMNumberTableCellView.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n#import \"RLMTableCellView.h\"\n\n@interface RLMNumberTableCellView : RLMTableCellView\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMNumberTableCellView.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMNumberTableCellView.h\"\n\n@interface RLMNumberTextField : NSTextField\n\n@property (nonatomic, strong) NSNumberFormatter *numberFormatter;\n\n@end\n\n@implementation RLMNumberTextField\n\n- (instancetype)initWithFrame:(NSRect)frameRect {\n    if (self = [super initWithFrame:frameRect]) {\n        [self setupNumberFormatter];\n    }\n    \n    return self;\n}\n\n- (instancetype)initWithCoder:(NSCoder *)coder {\n    if (self = [super initWithCoder:coder]) {\n        [self setupNumberFormatter];\n    }\n    \n    return self;\n}\n\n- (void)setupNumberFormatter {\n    [super awakeFromNib];\n    \n    self.numberFormatter = [[NSNumberFormatter alloc] init];\n    self.numberFormatter.numberStyle = NSNumberFormatterDecimalStyle;\n    self.numberFormatter.maximumFractionDigits = UINT16_MAX;\n    \n    self.formatter = self.numberFormatter;\n}\n\n-(BOOL)becomeFirstResponder {\n    self.numberFormatter.hasThousandSeparators = NO;\n    \n    return [super becomeFirstResponder];\n}\n\n- (BOOL)resignFirstResponder {\n    self.numberFormatter.hasThousandSeparators = YES;\n    \n    return [super resignFirstResponder];\n}\n\n@end\n\n@implementation RLMNumberTableCellView\n\n- (instancetype)initWithFrame:(NSRect)frameRect\n{\n    self = [super initWithFrame:frameRect];\n    \n    if (self == nil) {\n        return nil;\n    }\n    \n    RLMNumberTextField *textField = [[RLMNumberTextField alloc] initWithFrame:self.bounds];\n    textField.translatesAutoresizingMaskIntoConstraints = NO;\n    textField.bordered = NO;\n    textField.drawsBackground = NO;\n    textField.alignment = NSRightTextAlignment;\n    textField.cell.sendsActionOnEndEditing = YES;\n    \n    if ([NSFont respondsToSelector:@selector(monospacedDigitSystemFontOfSize:weight:)]) {\n        textField.font = [NSFont monospacedDigitSystemFontOfSize:12.0 weight:NSFontWeightRegular];\n    }\n\n    if ([textField respondsToSelector:@selector(setUsesSingleLineMode:)]) {\n        textField.usesSingleLineMode = YES;\n    }\n    \n    if ([textField respondsToSelector:@selector(setLineBreakMode:)]) {\n        textField.lineBreakMode = NSLineBreakByTruncatingTail;\n    }\n    \n    self.textField = textField;\n    [self addSubview:textField];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeLeading\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeLeading\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeTrailing\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeTrailing\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n\n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeTop\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeTop\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.textField\n                                                     attribute:NSLayoutAttributeBottom\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeBottom\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n    \n    return self;\n}\n\n@end\n\n"
  },
  {
    "path": "RealmBrowser/Views/RLMOptionalBoolTableCellView.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTableCellView.h\"\n\n@interface RLMOptionalBoolTableCellView : RLMTableCellView\n\n@property (nonatomic, readonly) NSPopUpButton *popupControl;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMOptionalBoolTableCellView.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMOptionalBoolTableCellView.h\"\n#import \"RLMBrowserConstants.h\"\n#import \"NSColor+ByteSizeFactory.h\"\n\n@interface RLMOptionalBoolTableCellView ()\n\n@property (nonatomic, strong, readwrite) NSPopUpButton *popupControl;\n\n@end\n\n@implementation RLMOptionalBoolTableCellView\n\n- (instancetype)initWithFrame:(NSRect)frameRect\n{\n    self = [super initWithFrame:frameRect];\n    \n    if (self == nil) {\n        return nil;\n    }\n    \n    NSPopUpButton *popupButton = [[NSPopUpButton alloc] initWithFrame:self.bounds pullsDown:NO];\n    popupButton.translatesAutoresizingMaskIntoConstraints = NO;\n    [popupButton addItemsWithTitles:@[@\"nil\", @\"false\", @\"true\"]];\n    popupButton.bordered = NO;\n    self.popupControl = popupButton;\n    [self addSubview:popupButton];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.popupControl\n                                                     attribute:NSLayoutAttributeWidth\n                                                     relatedBy:NSLayoutRelationLessThanOrEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeWidth\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n    \n    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.popupControl\n                                                     attribute:NSLayoutAttributeCenterY\n                                                     relatedBy:NSLayoutRelationEqual\n                                                        toItem:self\n                                                     attribute:NSLayoutAttributeCenterY\n                                                    multiplier:1.0\n                                                      constant:0.0]];\n    \n    return self;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMSidebarTableCellView.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\n@interface RLMSidebarTableCellView : NSTableCellView\n\n@property (weak) IBOutlet NSButton *button;\n\n@end\n\n"
  },
  {
    "path": "RealmBrowser/Views/RLMSidebarTableCellView.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMSidebarTableCellView.h\"\n\n@implementation RLMSidebarTableCellView\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMTableCellView.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\n@interface RLMTableCellView : NSTableCellView\n\n@property (nonatomic, assign) BOOL optional;\n\n+ (instancetype)viewWithIdentifier:(NSString *)identifier;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMTableCellView.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTableCellView.h\"\n#import \"RLMBrowserConstants.h\"\n#import \"NSColor+ByteSizeFactory.h\"\n\n@interface RLMTableCellView ()\n\n@property (nonatomic, strong) NSAttributedString *highlightedPlaceholderString;\n@property (nonatomic, strong) NSAttributedString *defaultPlaceholderString;\n\n@end\n\n@implementation RLMTableCellView\n\n+ (instancetype)viewWithIdentifier:(NSString *)identifier\n{\n    RLMTableCellView *view = [[self alloc] initWithFrame:NSZeroRect];\n    view.identifier = identifier;\n    \n    return view;\n}\n\n- (instancetype)initWithFrame:(NSRect)frameRect\n{\n    if (self = [super initWithFrame:frameRect]) {\n        self.canDrawSubviewsIntoLayer = YES;\n        self.layerContentsRedrawPolicy = NSViewLayerContentsRedrawDuringViewResize;\n    }\n    \n    return self;\n}\n\n- (instancetype)initWithCoder:(NSCoder *)coder\n{\n    if (self = [super initWithCoder:coder]) {\n        self.canDrawSubviewsIntoLayer = YES;\n        self.layerContentsRedrawPolicy = NSViewLayerContentsRedrawDuringViewResize;\n    }\n    \n    return self;\n}\n\n- (NSSize)intrinsicContentSize\n{\n    // NSTextField's intrinsic width is always -1 for editable text fields. Temporarily disable editability so we can\n    // compute the intrinsic size.\n    BOOL editable = self.textField.editable;\n    self.textField.editable = NO;\n    NSSize size = self.textField.intrinsicContentSize;\n    self.textField.editable = editable;\n    return size;\n}\n\n- (void)setOptional:(BOOL)optional\n{\n    if (optional == _optional) {\n        return;\n    }\n    \n    _optional = optional;\n\n    [self configurePlaceholderStringHighlighted:NO];\n}\n\n- (void)setBackgroundStyle:(NSBackgroundStyle)backgroundStyle\n{\n    [super setBackgroundStyle:backgroundStyle];\n    [self configurePlaceholderStringHighlighted:(backgroundStyle == NSBackgroundStyleDark)];\n}\n\n- (void)configurePlaceholderStringHighlighted:(BOOL)highlighted\n{\n    if (!_optional || ![self.textField respondsToSelector:@selector(placeholderAttributedString)]) {\n        return;\n    }\n\n    if (self.highlightedPlaceholderString == nil || self.defaultPlaceholderString == nil) {\n        NSDictionary *highlightedAttributes = @{NSForegroundColorAttributeName:[NSColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f]};\n        self.highlightedPlaceholderString = [[NSAttributedString alloc] initWithString:@\"nil\" attributes:highlightedAttributes];\n        \n        NSDictionary *defaultAttributes = @{NSForegroundColorAttributeName:[NSColor colorWithRGBAFloatValues:(CGFloat *)kNilItemColor]};\n        self.defaultPlaceholderString = [[NSAttributedString alloc] initWithString:@\"nil\" attributes:defaultAttributes];\n        \n    }\n    \n    [[NSOperationQueue mainQueue] addOperationWithBlock:^{\n        if (highlighted && self.textField.placeholderAttributedString != self.highlightedPlaceholderString) {\n            self.textField.placeholderAttributedString = self.highlightedPlaceholderString;\n        }\n        else if (!highlighted && self.textField.placeholderAttributedString != self.defaultPlaceholderString) {\n            self.textField.placeholderAttributedString = self.defaultPlaceholderString;\n        }\n    }];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMTableHeaderCell.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\n@interface RLMTableHeaderCell : NSTableHeaderCell\n\n@property (nonatomic) NSString *firstLine;\n@property (nonatomic) NSString *secondLine;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMTableHeaderCell.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTableHeaderCell.h\"\n\n@implementation RLMTableHeaderCell\n\n- (void)drawWithFrame:(CGRect)cellFrame inView:(NSView *)view\n{\n    CGRect fillRect, borderRect;\n    CGRectDivide(cellFrame, &borderRect, &fillRect, 1.0, CGRectMaxYEdge);\n    \n    [[NSColor whiteColor] set];\n    NSRectFill(fillRect);\n    \n    [[NSColor grayColor] set];\n    NSRectFill(borderRect);\n    \n    [self drawInteriorWithFrame:cellFrame inView:view];\n}\n\n-(void)setFirstLine:(NSString *)firstLine\n{\n    _firstLine = firstLine;\n    [self updateStringValue];\n}\n\n-(void)setSecondLine:(NSString *)secondLine\n{\n    _secondLine = secondLine;\n    [self updateStringValue];\n}\n\n-(void)updateStringValue\n{\n    if (!self.firstLine || !self.secondLine) {\n        return;\n    }\n    \n    NSString *stringValue = [NSString stringWithFormat:@\"%@\\n%@\", self.firstLine, self.secondLine];\n    \n    NSMutableAttributedString *attributedStringValue = [[NSMutableAttributedString alloc] initWithString:stringValue];\n    NSRange firstStringRange = NSMakeRange(0, self.firstLine.length);\n    NSRange secondStringRange = NSMakeRange(stringValue.length - self.secondLine.length, self.secondLine.length);\n    \n    [attributedStringValue addAttribute:NSFontAttributeName value:[NSFont boldSystemFontOfSize:12.0] range:firstStringRange];\n    [attributedStringValue addAttribute:NSForegroundColorAttributeName value:[NSColor grayColor] range:secondStringRange];\n    \n    self.attributedStringValue = attributedStringValue;\n}\n\n@end\n\n\n\n\n"
  },
  {
    "path": "RealmBrowser/Views/RLMTableView.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\n#import \"RLMTypeNode.h\"\n\ntypedef struct {\n    NSInteger row;\n    NSInteger column;\n} RLMTableLocation;\n\n#define RLMTableLocationMake(r, c) (RLMTableLocation){(r), (c)};\n#define RLMTableLocationUndefined RLMTableLocationMake(-1, -1)\n#define RLMTableLocationIsUndefined(a) ((a) == RLMTableLocationUndefined)\n#define RLMTableLocationRowIsUndefined(a) ((a.row) == (-1))\n#define RLMTableLocationColumnIsUndefined(a) ((a.column) == (-1))\n#define RLMTableLocationEqual(a, b) ((a).row == (b).row) && ((a).column == (b).column)\n\n@class RLMTableView;\n\n@protocol RLMTableViewDataSource <NSTableViewDataSource>\n\n-(NSString *)headerToolTipForColumn:(RLMClassProperty *)propertyColumn;\n\n@end\n\n\n@protocol RLMTableViewDelegate <NSTableViewDelegate>\n\n// Asking the delegate about the state\n- (BOOL)realmIsLocked;\n\n- (BOOL)displaysArray;\n\n- (BOOL)isColumnObjectType:(NSInteger)column;\n\n// Asking the delegate about the contents\n- (BOOL)containsObjectInRows:(NSIndexSet *)rowIndexes column:(NSInteger)column;\n\n- (BOOL)containsArrayInRows:(NSIndexSet *)rowIndexes column:(NSInteger)column;\n\n// RLMObject operations (when showing class table)\n- (void)addNewObjects:(NSIndexSet *)rowIndexes;\n\n- (void)deleteObjects:(NSIndexSet *)rowIndexes;\n\n- (void)copyValueFromRow:(NSInteger)row column:(NSInteger)column;\n\n// RLMArray operations\n- (void)removeRows:(NSIndexSet *)rowIndexes;\n\n- (void)deleteRows:(NSIndexSet *)rowIndexes;\n\n- (void)addNewRows:(NSIndexSet *)rowIndexes;\n\n- (void)insertLinks:(NSIndexSet *)rowIndexes column:(NSInteger)columnIndex;\n\n// Operations on links in cells\n- (void)setObjectLinkAtRows:(NSIndexSet *)rowIndexes column:(NSInteger)columnIndex;\n\n- (void)removeObjectLinksAtRows:(NSIndexSet *)rowIndexes column:(NSInteger)columnIndex;\n\n- (void)removeArrayLinksAtRows:(NSIndexSet *)rowIndexes column:(NSInteger)columnIndex;\n\n// Opening an array in a new window\n- (void)openArrayInNewWindowAtRow:(NSInteger)row column:(NSInteger)columnIndex;\n\n@optional\n\n- (void)mouseDidEnterView:(RLMTableView *)view;\n\n- (void)mouseDidExitView:(RLMTableView *)view;\n\n- (void)mouseDidEnterCellAtLocation:(RLMTableLocation)location;\n\n- (void)mouseDidExitCellAtLocation:(RLMTableLocation)location;\n\n- (void)rightClickedHeaderColumn:(NSUInteger)column;\n\n- (void)rightClickedLocation:(RLMTableLocation)location;\n\n@end\n\n\n@interface RLMTableView : NSTableView\n\n@property (nonatomic, readonly) id<RLMTableViewDelegate> realmDelegate;\n@property (nonatomic, readonly) id<RLMTableViewDataSource> realmDataSource;\n\n- (void)scrollToRow:(NSInteger)rowIndex;\n\n- (void)setupColumnsWithType:(RLMTypeNode *)typeNode;\n\n- (void)makeColumnsFitContents;\n\n@end\n"
  },
  {
    "path": "RealmBrowser/Views/RLMTableView.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTableView.h\"\n#import \"RLMTableColumn.h\"\n#import \"RLMArrayNode.h\"\n#import \"RLMTableHeaderCell.h\"\n#import \"RLMDescriptions.h\"\n\nconst NSInteger NOT_A_COLUMN = -1;\n\n@interface RLMTableView()<NSMenuDelegate>\n\n@end\n\n@implementation RLMTableView {\n    NSTrackingArea *trackingArea;\n    RLMTableLocation currentMouseLocation;\n    RLMTableLocation previousMouseLocation;\n\n    NSMenuItem *clickLockItem;\n\n    NSMenuItem *deleteObjectItem;\n    NSMenuItem *copyValueItem;\n\n    NSMenuItem *removeFromArrayItem;\n    NSMenuItem *deleteRowItem;\n    NSMenuItem *insertIntoArrayItem;\n    NSMenuItem *insertLinkInArray;\n\n    NSMenuItem *setLinkToObjectItem;\n    NSMenuItem *removeLinkToObjectItem;\n    NSMenuItem *removeLinkToArrayItem;\n    \n    NSMenuItem *openArrayInNewWindowItem;\n}\n\n#pragma mark - NSObject Overrides\n\n- (void)awakeFromNib\n{\n    [super awakeFromNib];\n    \n    int options = NSTrackingActiveInKeyWindow | NSTrackingInVisibleRect | NSTrackingMouseEnteredAndExited\n    | NSTrackingMouseMoved | NSTrackingCursorUpdate;\n    trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds] options:options owner:self userInfo:nil];\n    [self addTrackingArea:trackingArea];\n    \n    currentMouseLocation = RLMTableLocationUndefined;\n    previousMouseLocation = RLMTableLocationUndefined;\n    \n    [self createContextMenuItems];\n    self.allowsColumnReordering = NO;\n}\n\n- (void)dealloc\n{\n    [self removeTrackingArea:trackingArea];\n}\n\n#pragma mark - Public methods - Accessors\n\n-(id<RLMTableViewDelegate>)realmDelegate\n{\n    return (id<RLMTableViewDelegate>)self.delegate;\n}\n\n-(id<RLMTableViewDataSource>)realmDataSource\n{\n    return (id<RLMTableViewDataSource>)self.dataSource;\n}\n\n#pragma mark - Private Methods - NSObject Overrides\n\nenum MenuTags {\n    MENU_CONTEXT_CLICK_LOCK_ICON_TO_EDIT = 99,\n    MENU_CONTEXT_DELETE_OBJECTS = 200,\n    MENU_CONTEXT_COPY_VALUE = 201,\n\n    MENU_CONTEXT_ARRAY_REMOVE_OBJECTS = 210,\n    MENU_CONTEXT_ARRAY_DELETE_OBJECTS = 211,\n    MENU_CONTEXT_ARRAY_ADD_NEW = 212,\n    MENU_CONTEXT_ARRAY_ADD_EXISTING = 213,\n    MENU_CONTEXT_ARRAY_CLEAR = 221,\n    MENU_CONTEXT_ARRAY_OPEN = 230,\n\n    MENU_CONTEXT_LINK_SET = 217,\n    MENU_CONTEXT_REMOVE_BACKLINKS = 220,\n};\n\n-(void)createContextMenuItems\n{\n    NSMenu *rightClickMenu = [[NSMenu alloc] initWithTitle:@\"Contextual Menu\"];\n    self.menu = rightClickMenu;\n    self.menu.delegate = self;\n    \n    // This single menu item alerts the user that the realm is locked for editing\n    clickLockItem = [[NSMenuItem alloc] initWithTitle:@\"Click lock icon to edit\"\n                                               action:nil\n                                        keyEquivalent:@\"\"];\n    clickLockItem.tag = MENU_CONTEXT_CLICK_LOCK_ICON_TO_EDIT;\n    \n    // Operations on objects in class tables\n    deleteObjectItem = [[NSMenuItem alloc] initWithTitle:@\"Delete objects\"\n                                                  action:@selector(deleteObjectsAction:)\n                                           keyEquivalent:@\"\"];\n    deleteObjectItem.tag = MENU_CONTEXT_DELETE_OBJECTS;\n    \n    copyValueItem = [[NSMenuItem alloc] initWithTitle:@\"Copy value\"\n                                                  action:@selector(copyValueAction:)\n                                           keyEquivalent:@\"\"];\n    copyValueItem.tag = MENU_CONTEXT_COPY_VALUE;\n\n    // Operations on objects in arrays\n    removeFromArrayItem = [[NSMenuItem alloc] initWithTitle:@\"Remove objects from array\"\n                                                     action:@selector(removeRowsFromArrayAction:)\n                                              keyEquivalent:@\"\"];\n    removeFromArrayItem.tag = MENU_CONTEXT_ARRAY_REMOVE_OBJECTS;\n    \n    deleteRowItem = [[NSMenuItem alloc] initWithTitle:@\"Remove objects from array and delete\"\n                                               action:@selector(deleteRowsFromArrayAction:)\n                                        keyEquivalent:@\"\"];\n    deleteRowItem.tag = MENU_CONTEXT_ARRAY_DELETE_OBJECTS;\n    \n    insertIntoArrayItem = [[NSMenuItem alloc] initWithTitle:@\"Add new objects to array\"\n                                                     action:@selector(addRowsToArrayAction:)\n                                              keyEquivalent:@\"\"];\n    insertIntoArrayItem.tag = MENU_CONTEXT_ARRAY_ADD_NEW;\n\n    insertLinkInArray = [[NSMenuItem alloc] initWithTitle:@\"Add existing object to array\"\n                                                     action:@selector(insertRowsToArrayAction:)\n                                              keyEquivalent:@\"\"];\n    insertLinkInArray.tag = MENU_CONTEXT_ARRAY_ADD_EXISTING;\n\n    // Operations on links in cells\n    setLinkToObjectItem = [[NSMenuItem alloc] initWithTitle:@\"Add link to object\"\n                                                     action:@selector(setObjectLinkAction:)\n                                              keyEquivalent:@\"\"];\n    setLinkToObjectItem.tag = MENU_CONTEXT_LINK_SET;\n    \n    removeLinkToObjectItem= [[NSMenuItem alloc] initWithTitle:@\"Remove link to object\"\n                                                       action:@selector(removeObjectLinksAction:)\n                                                keyEquivalent:@\"\"];\n    removeLinkToObjectItem.tag = MENU_CONTEXT_REMOVE_BACKLINKS;\n    \n    removeLinkToArrayItem = [[NSMenuItem alloc] initWithTitle:@\"Make array empty\"\n                                                       action:@selector(removeArrayLinksAction:)\n                                                keyEquivalent:@\"\"];\n    removeLinkToArrayItem.tag = MENU_CONTEXT_ARRAY_CLEAR;\n    \n    // Open array in new window\n    openArrayInNewWindowItem = [[NSMenuItem alloc] initWithTitle:@\"Open array in new window\"\n                                                          action:@selector(openArrayInNewWindowAction:)\n                                                   keyEquivalent:@\"\"];\n    openArrayInNewWindowItem.tag = MENU_CONTEXT_ARRAY_OPEN;\n}\n\n#pragma mark - NSMenu Delegate\n\n// Called on the context menu before displaying\n-(void)menuNeedsUpdate:(NSMenu *)menu\n{\n    [self.menu removeAllItems];\n    \n    BOOL actualColumn = self.clickedColumn != NOT_A_COLUMN;\n    \n    // Menu items that are independent on the realm lock\n    if (actualColumn && [self.realmDelegate containsArrayInRows:self.selectedRowIndexes column:self.clickedColumn]) {\n        [self.menu addItem:openArrayInNewWindowItem];\n        [self.menu addItem:insertLinkInArray];\n    }\n    \n    // If it is locked, show the unlock hint menu item and return\n    if (self.realmDelegate.realmIsLocked) {\n        [self.menu addItem:clickLockItem];\n        return;\n    }\n    \n    // Below, only menu items that do require editing\n    \n    if (self.realmDelegate.displaysArray) {\n        [self.menu addItem:insertIntoArrayItem];\n        [self.menu addItem:insertLinkInArray];\n    }\n    \n    if (actualColumn && [self.realmDelegate isColumnObjectType:self.clickedColumn]) {\n        [self.menu addItem:setLinkToObjectItem];\n    }\n    \n    if (self.selectedRowIndexes.count == 0) {\n        return;\n    }\n    \n    // Below, only menu items that make sense with a row selected\n    \n    if (self.realmDelegate.displaysArray) {\n        [self.menu addItem:removeFromArrayItem];\n        [self.menu addItem:deleteRowItem];\n    }\n    else {\n        [self.menu addItem:deleteObjectItem];\n        [self.menu addItem:copyValueItem];\n    }\n    \n    if (!actualColumn) {\n        return;\n    }\n    \n    // Below, only menu items that make sense when clicking in a column\n    \n    if ([self.realmDelegate containsObjectInRows:self.selectedRowIndexes column:self.clickedColumn]) {\n        [self.menu addItem:removeLinkToObjectItem];\n    }\n    else if ([self.realmDelegate containsArrayInRows:self.selectedRowIndexes column:self.clickedColumn]) {\n        [self.menu addItem:removeLinkToArrayItem];\n    }\n}\n\n#pragma mark - NSResponder Overrides\n\n- (void)cursorUpdate:(NSEvent *)event\n{\n    [self mouseMoved: event];\n    \n    // Note: This method is left mostly empty on purpose. It avoids cursor events to be passed on up\n    //       the responder chain where it potentially could reach a displayed tool-tip view, which\n    //       will undo any modification to the cursor image dome by the application. This \"fix\" is\n    //       in order to circumvent a bug in OS X version prior to 10.10 Yosemite not honouring\n    //       the NSTrackingActiveAlways option even when the cursorRect has been disabled.\n    //       IMPORTANT: Must NOT be deleted!!!\n}\n\n- (void)mouseMoved:(NSEvent *)event\n{\n    if (!self.delegate) {\n        return; // No delegate, no need to track the mouse.\n    }\n        \n    currentMouseLocation = [self currentLocationAtPoint:[event locationInWindow]];\n\n    if (RLMTableLocationEqual(previousMouseLocation, currentMouseLocation)) {\n        return;\n    }\n    else {\n        if ([self.delegate respondsToSelector:@selector(mouseDidExitCellAtLocation:)]) {\n            [(id<RLMTableViewDelegate>)self.delegate mouseDidExitCellAtLocation:previousMouseLocation];\n        }\n        \n        CGRect cellRect = [self rectOfLocation:previousMouseLocation];\n        [self setNeedsDisplayInRect:cellRect];\n        \n        previousMouseLocation = currentMouseLocation;\n        \n        if ([self.delegate respondsToSelector:@selector(mouseDidEnterCellAtLocation:)]) {\n            [(id<RLMTableViewDelegate>)self.delegate mouseDidEnterCellAtLocation:currentMouseLocation];\n        }\n    }\n    \n    CGRect cellRect = [self rectOfLocation:currentMouseLocation];\n    [self setNeedsDisplayInRect:cellRect];\n}\n\n-(void)rightMouseDown:(NSEvent *)theEvent\n{\n    RLMTableLocation location = [self currentLocationAtPoint:[theEvent locationInWindow]];\n    \n    if ([self.delegate respondsToSelector:@selector(rightClickedLocation:)]) {\n        [(id<RLMTableViewDelegate>)self.delegate rightClickedLocation:location];\n    }\n    [super rightMouseDown:theEvent];\n}\n\n- (void)mouseExited:(NSEvent *)theEvent\n{    \n    CGRect cellRect = [self rectOfLocation:currentMouseLocation];\n    [self setNeedsDisplayInRect:cellRect];\n    \n    currentMouseLocation = RLMTableLocationUndefined;\n    previousMouseLocation = RLMTableLocationUndefined;\n    \n    if ([self.delegate respondsToSelector:@selector(mouseDidExitView:)]) {\n        [(id<RLMTableViewDelegate>)self.delegate mouseDidExitView:self];\n    }\n}\n\n-(BOOL)validateMenuItem:(NSMenuItem *)menuItem\n{\n    BOOL nonemptySelection = self.selectedRowIndexes.count > 0;\n    BOOL multipleSelection = self.selectedRowIndexes.count > 1;\n    BOOL unlocked = !self.realmDelegate.realmIsLocked;\n    BOOL displaysArray = self.realmDelegate.displaysArray;\n\n    NSString *numberModifier = multipleSelection ? @\"s\" : @\"\";\n    \n    switch (menuItem.tag) {\n        case MENU_CONTEXT_CLICK_LOCK_ICON_TO_EDIT: // Context -> Click lock icon to edit\n            return NO;\n\n        case 100: // Edit -> Delete object\n        case MENU_CONTEXT_DELETE_OBJECTS: // Context -> Delete object\n            menuItem.title = [NSString stringWithFormat:@\"Delete object%@\", numberModifier];\n            return nonemptySelection && unlocked && !displaysArray;\n\n        case 101: // Edit -> Add object\n//        case 201: // Context -> Add object\n            menuItem.title = [NSString stringWithFormat:@\"Add new object%@\", numberModifier];\n            return unlocked && !displaysArray;\n            \n        case 110: // Edit -> Remove object from array\n        case MENU_CONTEXT_ARRAY_REMOVE_OBJECTS: // Context -> Remove object from array\n            menuItem.title = [NSString stringWithFormat:@\"Remove object%@ from array\", numberModifier];\n            return unlocked && nonemptySelection && displaysArray;\n\n        case 111: // Edit -> Remove object from array and delete\n        case MENU_CONTEXT_ARRAY_DELETE_OBJECTS: // Context -> Remove object from array and delete\n            menuItem.title = [NSString stringWithFormat:@\"Remove object%@ from array and delete\", numberModifier];\n            return unlocked && nonemptySelection && displaysArray;\n\n        case 112: // Edit -> Insert object into array\n        case MENU_CONTEXT_ARRAY_ADD_NEW: // Context -> Insert object into array\n            menuItem.title = [NSString stringWithFormat:@\"Add new object%@ to array\", numberModifier];\n            return unlocked && displaysArray;\n\n        case 113: // Edit -> Add existing object to array\n        case MENU_CONTEXT_ARRAY_ADD_EXISTING: // Context -> Add existing object to array\n            menuItem.title = [NSString stringWithFormat:@\"Add existing object%@ to array\", numberModifier];\n            return unlocked && displaysArray;\n            \n        case MENU_CONTEXT_REMOVE_BACKLINKS: // Context -> Remove links to object\n            menuItem.title = [NSString stringWithFormat:@\"Remove link%@ to object%@\", numberModifier, numberModifier];\n            return unlocked && nonemptySelection;\n\n        case MENU_CONTEXT_ARRAY_CLEAR: // Context -> Remove links to array\n            menuItem.title = [NSString stringWithFormat:@\"Make array%@ empty\", numberModifier];\n            return unlocked && nonemptySelection;\n\n        case MENU_CONTEXT_ARRAY_OPEN: // Context -> Open array in new window\n            menuItem.title = @\"Open array in new window\";\n            return YES;\n\n        default:\n            return YES;\n    }\n}\n\n#pragma mark - First Responder User Actions\n\n// Delete selected objects\n- (IBAction)deleteObjectsAction:(id)sender\n{\n    if (!self.realmDelegate.displaysArray && !self.realmDelegate.realmIsLocked) {\n        [self.realmDelegate deleteObjects:self.selectedRowIndexes];\n    }\n}\n\n// Copies the value from the cell that was right-clicked\n- (IBAction)copyValueAction:(id)sender\n{\n    [self.realmDelegate copyValueFromRow:self.clickedRow column:self.clickedColumn];\n}\n\n// Add objects of the current type, according to number of selected rows\n- (IBAction)addObjectsAction:(id)sender\n{\n    if (!self.realmDelegate.displaysArray && !self.realmDelegate.realmIsLocked) {\n        [self.realmDelegate addNewObjects:self.selectedRowIndexes];\n    }\n}\n\n// Remove selected objects from array, keeping the objects\n- (IBAction)removeRowsFromArrayAction:(id)sender\n{\n    if (self.realmDelegate.displaysArray && !self.realmDelegate.realmIsLocked) {\n        [self.realmDelegate removeRows:self.selectedRowIndexes];\n    }\n}\n\n// Remove selected objects from array and delete the objects\n- (IBAction)deleteRowsFromArrayAction:(id)sender\n{\n    if (self.realmDelegate.displaysArray && !self.realmDelegate.realmIsLocked) {\n        [self.realmDelegate deleteRows:self.selectedRowIndexes];\n    }\n}\n\n// Create and insert objects at the selected rows\n- (IBAction)addRowsToArrayAction:(id)sender\n{\n    if (self.realmDelegate.displaysArray && !self.realmDelegate.realmIsLocked) {\n        NSInteger index = self.selectedRowIndexes.count > 0 ? self.selectedRowIndexes.lastIndex + 1 : self.numberOfRows;\n\n        [self.realmDelegate addNewRows:[NSIndexSet indexSetWithIndex:index]];\n    }\n}\n\n// Insert link into array\n- (IBAction)insertRowsToArrayAction:(id)sender\n{\n    if (self.realmDelegate.displaysArray && !self.realmDelegate.realmIsLocked) {\n        NSInteger index = self.selectedRowIndexes.count > 0 ? self.selectedRowIndexes.lastIndex + 1 : self.numberOfRows;\n\n        [self.realmDelegate insertLinks:[NSIndexSet indexSetWithIndex:index] column:self.clickedColumn];\n    }\n}\n\n// Set object links in the clicked column to [NSNull null] at the selected rows\n- (IBAction)setObjectLinkAction:(id)sender\n{\n    if (!self.realmDelegate.realmIsLocked) {\n        [self.realmDelegate setObjectLinkAtRows:self.selectedRowIndexes column:self.clickedColumn];\n    }\n}\n\n// Set object links in the clicked column to [NSNull null] at the selected rows\n- (IBAction)removeObjectLinksAction:(id)sender\n{\n    if (!self.realmDelegate.realmIsLocked) {\n        [self.realmDelegate removeObjectLinksAtRows:self.selectedRowIndexes column:self.clickedColumn];\n    }\n}\n\n// Make array links in the clicked column, at selected rows, empty\n- (IBAction)removeArrayLinksAction:(id)sender\n{\n    if (!self.realmDelegate.realmIsLocked) {\n        [self.realmDelegate removeArrayLinksAtRows:self.selectedRowIndexes column:self.clickedColumn];\n    }\n}\n\n// Opens the array in the current cell in a new window\n- (IBAction)openArrayInNewWindowAction:(id)sender\n{\n    [self.realmDelegate openArrayInNewWindowAtRow:self.clickedRow column:self.clickedColumn];\n}\n\n#pragma mark - NSView Overrides\n\n- (void)updateTrackingAreas\n{\n    [super updateTrackingAreas];\n    \n    [self removeTrackingArea:trackingArea];\n    int opts = NSTrackingActiveInKeyWindow | NSTrackingInVisibleRect | NSTrackingMouseEnteredAndExited | NSTrackingMouseMoved;\n    trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds] options:opts owner:self userInfo:nil];\n    [self addTrackingArea:trackingArea];\n}\n\n#pragma mark - Public Methods\n\n- (void)scrollToRow:(NSInteger)rowIndex\n{\n    NSRect rowRect = [self rectOfRow:rowIndex];\n    NSPoint scrollOrigin = rowRect.origin;\n    NSClipView *clipView = (NSClipView *)[self superview];\n    scrollOrigin.y += MAX(0, round((NSHeight(rowRect) - NSHeight(clipView.frame))*0.5f));\n    NSScrollView *scrollView = (NSScrollView *)[clipView superview];\n    if ([scrollView respondsToSelector:@selector(flashScrollers)]){\n        [scrollView flashScrollers];\n    }\n    [[clipView animator] setBoundsOrigin:scrollOrigin];\n}\n\n- (void)setupColumnsWithType:(RLMTypeNode *)typeNode\n{\n    while (self.numberOfColumns > 0) {\n        [self removeTableColumn:[self.tableColumns lastObject]];\n    }\n    \n    [self reloadData];\n\n    NSRect frame = self.headerView.frame;\n    frame.size.height = 36;\n    self.headerView.frame = frame;\n\n    [self beginUpdates];\n    // If array, add extra first column with numbers\n    if ([typeNode isMemberOfClass:[RLMArrayNode class]]) {\n        RLMTableColumn *tableColumn = [[RLMTableColumn alloc] initWithIdentifier:@\"#\"];\n        tableColumn.propertyType = RLMPropertyTypeInt;\n        \n        RLMTableHeaderCell *headerCell = [[RLMTableHeaderCell alloc] init];\n        headerCell.wraps = YES;\n        headerCell.firstLine = @\"\";\n        headerCell.secondLine = @\"#\";\n\n        tableColumn.headerCell = headerCell;\n        tableColumn.headerToolTip = @\"Order of object within array\";\n        \n        [self addTableColumn:tableColumn];\n    }\n    \n    // ... and add new columns matching the structure of the new realm table.\n    NSArray *propertyColumns = typeNode.propertyColumns;\n\n    for (NSUInteger index = 0; index < propertyColumns.count; index++) {\n        RLMClassProperty *propertyColumn = propertyColumns[index];\n        RLMTableColumn *tableColumn = [[RLMTableColumn alloc] initWithIdentifier:propertyColumn.name];\n        \n        tableColumn.propertyType = propertyColumn.type;\n        \n        RLMTableHeaderCell *headerCell = [[RLMTableHeaderCell alloc] init];\n        headerCell.wraps = YES;\n        headerCell.firstLine = propertyColumn.name;\n        headerCell.secondLine = [NSString stringWithFormat:@\"%@%@\", [RLMDescriptions typeNameOfProperty:propertyColumn.property], propertyColumn.isPrimaryKey ? @\", Primary Key\" :@\"\"];\n        tableColumn.headerCell = headerCell;\n        tableColumn.minWidth = 26.0;\n        \n        tableColumn.headerToolTip = [self.realmDataSource headerToolTipForColumn:propertyColumn];\n        [self addTableColumn:tableColumn];\n    }\n    \n    [self endUpdates];\n\n    // FIXME: force layout subview to change header view height\n    [self.enclosingScrollView tile];\n}\n\n#pragma mark - Private Methods - Table Columns\n\n-(void)makeColumnsFitContents\n{\n    for (RLMTableColumn *column in self.tableColumns) {\n        column.width = [column sizeThatFitsWithLimit:YES];\n    }\n}\n\n#pragma mark - Private Methods - Cell geometry\n\n- (RLMTableLocation)currentLocationAtPoint:(NSPoint)point\n{\n    NSPoint localPointInTable = [self convertPoint:point fromView:nil];\n    \n    NSInteger row = [self rowAtPoint:localPointInTable];\n    NSInteger column = [self columnAtPoint:localPointInTable];\n    \n    NSPoint localPointInHeader = [self.headerView convertPoint:point fromView:nil];\n    if (NSPointInRect(localPointInHeader, self.headerView.bounds)) {\n        row = -2;\n        column = [self columnAtPoint:localPointInHeader];\n    }\n    \n    return RLMTableLocationMake(row, column);\n}\n\n- (CGRect)rectOfLocation:(RLMTableLocation)location\n{\n    CGRect rowRect = [self rectOfRow:location.row];\n    CGRect columnRect = [self rectOfColumn:location.column];\n    \n    return CGRectIntersection(rowRect, columnRect);\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowser.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t22096B2719911F7300233D77 /* RLMBadgeTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 22096B2619911F7300233D77 /* RLMBadgeTableCellView.m */; };\n\t\t220D382819B639D700F79496 /* RLMTestDataGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 220D382719B639D700F79496 /* RLMTestDataGenerator.m */; };\n\t\t221322FA19954AB100D25737 /* RLMImageTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 221322F919954AB100D25737 /* RLMImageTableCellView.m */; };\n\t\t221322FD19954B0A00D25737 /* RLMTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 221322FC19954B0A00D25737 /* RLMTableCellView.m */; };\n\t\t2215F6361D0011CD005A46F7 /* RealmFileIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 2215F6351D0011CD005A46F7 /* RealmFileIcon.icns */; };\n\t\t2234B66E1CF83F9600EAFDF0 /* RLMBrowserConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 2234B66D1CF83F9600EAFDF0 /* RLMBrowserConstants.m */; };\n\t\t2249D9B219A62EBD00A31104 /* RLMTableColumn.m in Sources */ = {isa = PBXBuildFile; fileRef = 2249D9B119A62EBD00A31104 /* RLMTableColumn.m */; };\n\t\t225443F519E3E6360045996B /* RLMTableHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 225443F419E3E6360045996B /* RLMTableHeaderCell.m */; };\n\t\t22565D6719C1BCF400C8C8EC /* RLMLinkTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 22565D6619C1BCF400C8C8EC /* RLMLinkTableCellView.m */; };\n\t\t228D1F871A1CAD660028562A /* RLMResultsNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 228D1F861A1CAD660028562A /* RLMResultsNode.m */; };\n\t\t22A55FEB19D18BA8009178BC /* RLMObjectNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 22A55FEA19D18BA8009178BC /* RLMObjectNode.m */; };\n\t\t22A55FF119D19842009178BC /* RLMDescriptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 22A55FF019D19842009178BC /* RLMDescriptions.m */; };\n\t\t22D28EA71993AAAB00497FD3 /* RLMNumberTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 22D28EA61993AAAB00497FD3 /* RLMNumberTableCellView.m */; };\n\t\t22D3AC8A19CC5D710042C1B2 /* RLMModelExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 22D3AC8919CC5D710042C1B2 /* RLMModelExporter.m */; };\n\t\t22DC87E81B9808790024BA34 /* RLMExportIndicatorWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22DC87E71B9808790024BA34 /* RLMExportIndicatorWindowController.xib */; };\n\t\t22E4737219924CF700EEF7C9 /* RLMBasicTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E4737119924CF700EEF7C9 /* RLMBasicTableCellView.m */; };\n\t\t22E473791992562400EEF7C9 /* RLMBoolTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E473781992562400EEF7C9 /* RLMBoolTableCellView.m */; };\n\t\t2CD855AECE4DBDF7F079C0FD /* Pods_RealmBrowser_RealmBrowserTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB46D9299721CA4725D511E6 /* Pods_RealmBrowser_RealmBrowserTests.framework */; };\n\t\t3615BDB6196FA8BF00E1AE3F /* RLMQueryNavigationState.m in Sources */ = {isa = PBXBuildFile; fileRef = 3615BDB5196FA8BF00E1AE3F /* RLMQueryNavigationState.m */; };\n\t\t36B669CB1B8B057F00F04AE1 /* RLMObjectLinkSelectionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 36B669CA1B8B057F00F04AE1 /* RLMObjectLinkSelectionViewController.xib */; };\n\t\t36B669CE1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 36B669CD1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.m */; };\n\t\t840F97C0192B7DCE006B591E /* RLMDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 840F97BF192B7DCE006B591E /* RLMDocument.m */; };\n\t\t84446534195891AA00CEEA5B /* RLMViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84446533195891AA00CEEA5B /* RLMViewController.m */; };\n\t\t844C34E3194859080027E902 /* TestClasses.m in Sources */ = {isa = PBXBuildFile; fileRef = 844C34E2194859080027E902 /* TestClasses.m */; };\n\t\t8457294D1962E3860076D4F1 /* RLMTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8457294C1962E3860076D4F1 /* RLMTableView.m */; };\n\t\t8474E2B419544D8000BCA755 /* RLMTypeOutlineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8474E2B319544D8000BCA755 /* RLMTypeOutlineViewController.m */; };\n\t\t8474E2BD195452BE00BCA755 /* RLMInstanceTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8474E2BC195452BE00BCA755 /* RLMInstanceTableViewController.m */; };\n\t\t84754ABE193CA4600093604E /* RLMRealmBrowserWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84754ABD193CA4600093604E /* RLMRealmBrowserWindowController.m */; };\n\t\t84925C61195AD5B000EE27B1 /* NSColor+ByteSizeFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 84925C60195AD5B000EE27B1 /* NSColor+ByteSizeFactory.m */; };\n\t\t84925C67195AE9AD00EE27B1 /* RLMSidebarTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84925C66195AE9AD00EE27B1 /* RLMSidebarTableCellView.m */; };\n\t\t84A34A4F192E19C5005D6CC4 /* RLMApplicationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A34A4E192E19C5005D6CC4 /* RLMApplicationDelegate.m */; };\n\t\t84AA41A91949C99800A50F03 /* RLMTypeNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 84AA41A81949C99800A50F03 /* RLMTypeNode.m */; };\n\t\t84AA41B01949CD7700A50F03 /* RLMArrayNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 84AA41AF1949CD7700A50F03 /* RLMArrayNode.m */; };\n\t\t84D7990B19388E8900FC76A0 /* RLMClassNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D7990519388E8900FC76A0 /* RLMClassNode.m */; };\n\t\t84D7990C19388E8900FC76A0 /* RLMClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D7990719388E8900FC76A0 /* RLMClassProperty.m */; };\n\t\t84D7990D19388E8900FC76A0 /* RLMRealmNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D7990919388E8900FC76A0 /* RLMRealmNode.m */; };\n\t\t84E0F9501921F3B900D6CA14 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E0F94F1921F3B900D6CA14 /* Cocoa.framework */; };\n\t\t84E0F95A1921F3B900D6CA14 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84E0F9581921F3B900D6CA14 /* InfoPlist.strings */; };\n\t\t84E0F95C1921F3B900D6CA14 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E0F95B1921F3B900D6CA14 /* main.m */; };\n\t\t84E0F9601921F3B900D6CA14 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 84E0F95E1921F3B900D6CA14 /* Credits.rtf */; };\n\t\t84E0F96B1921F3B900D6CA14 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 84E0F96A1921F3B900D6CA14 /* Images.xcassets */; };\n\t\t84E0F9731921F3B900D6CA14 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84E0F94F1921F3B900D6CA14 /* Cocoa.framework */; };\n\t\t84E0F97B1921F3B900D6CA14 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84E0F9791921F3B900D6CA14 /* InfoPlist.strings */; };\n\t\t84E0F97D1921F3B900D6CA14 /* RealmBrowserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E0F97C1921F3B900D6CA14 /* RealmBrowserTests.m */; };\n\t\t84E35A42196A9F3B007F0344 /* RLMNavigationState.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E35A41196A9F3B007F0344 /* RLMNavigationState.m */; };\n\t\t84E35A49196AD991007F0344 /* RLMNavigationStack.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E35A48196AD991007F0344 /* RLMNavigationStack.m */; };\n\t\t84E35A4D196B021B007F0344 /* RLMArrayNavigationState.m in Sources */ = {isa = PBXBuildFile; fileRef = 84E35A4C196B021B007F0344 /* RLMArrayNavigationState.m */; };\n\t\t9D25DD9EEFA4ED17DD9B0B58 /* Pods_RealmBrowser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A5C7B6B3C4F4B2895F8110D /* Pods_RealmBrowser.framework */; };\n\t\tC26CC7A01DB6497900EE549D /* RLMSyncUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = C26CC79F1DB6497900EE549D /* RLMSyncUtils.m */; };\n\t\tC27721DA1D92D6CA00DEBF75 /* RLMCloudKitCredentialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C27721D91D92D6CA00DEBF75 /* RLMCloudKitCredentialViewController.m */; };\n\t\tC27721DC1D92D6FE00DEBF75 /* CloudKitCredentialView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C27721DB1D92D6FE00DEBF75 /* CloudKitCredentialView.xib */; };\n\t\tC277A6E71D7D990E00DED239 /* FacebookCredentialView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C277A6E61D7D990E00DED239 /* FacebookCredentialView.xib */; };\n\t\tC277A6EA1D7D9A0100DED239 /* RLMFacebookCredentialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C277A6E91D7D9A0100DED239 /* RLMFacebookCredentialViewController.m */; };\n\t\tC277A6ED1D7EC03B00DED239 /* RLMGoogleCredentialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C277A6EC1D7EC03B00DED239 /* RLMGoogleCredentialViewController.m */; };\n\t\tC277A6EF1D7EC1AF00DED239 /* GoogleCredentialView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C277A6EE1D7EC1AF00DED239 /* GoogleCredentialView.xib */; };\n\t\tC27E173A1D5CC0EF0095259A /* RLMSyncServerBrowserWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C27E17391D5CC0EF0095259A /* RLMSyncServerBrowserWindowController.m */; };\n\t\tC27E173C1D5CC1070095259A /* SyncServerBrowserWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = C27E173B1D5CC1070095259A /* SyncServerBrowserWindow.xib */; };\n\t\tC2986A7D1D6C811E005A2CD6 /* EncryptionKeyWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2257869F1BD564F40012436A /* EncryptionKeyWindow.xib */; };\n\t\tC2986A7E1D6C8122005A2CD6 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84E0F9671921F3B900D6CA14 /* MainMenu.xib */; };\n\t\tC2986A7F1D6C8126005A2CD6 /* RLMDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84E0F9641921F3B900D6CA14 /* RLMDocument.xib */; };\n\t\tC2986A821D6C81C2005A2CD6 /* RLMUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = C2986A811D6C81C2005A2CD6 /* RLMUtils.m */; };\n\t\tC2986A871D6C823D005A2CD6 /* RLMEncryptionKeyWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2986A841D6C823D005A2CD6 /* RLMEncryptionKeyWindowController.m */; };\n\t\tC2986A881D6C823D005A2CD6 /* RLMExportIndicatorWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2986A861D6C823D005A2CD6 /* RLMExportIndicatorWindowController.m */; };\n\t\tC2986A8B1D6C8257005A2CD6 /* RLMOptionalBoolTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = C2986A8A1D6C8257005A2CD6 /* RLMOptionalBoolTableCellView.m */; };\n\t\tC29CC7B61D76D4E300186B29 /* RLMCredentialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C29CC7B51D76D4E300186B29 /* RLMCredentialViewController.m */; };\n\t\tC29CC7B91D76D55D00186B29 /* RLMAccessTokenCredentialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C29CC7B81D76D55D00186B29 /* RLMAccessTokenCredentialViewController.m */; };\n\t\tC29CC7BC1D76D8C100186B29 /* RLMUsernameCredentialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C29CC7BB1D76D8C100186B29 /* RLMUsernameCredentialViewController.m */; };\n\t\tC29CC7BF1D76DC5900186B29 /* AccessTokenCredentialView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C29CC7BE1D76DC5900186B29 /* AccessTokenCredentialView.xib */; };\n\t\tC29CC7C11D76DD4500186B29 /* UsernameCredentialView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C29CC7C01D76DD4500186B29 /* UsernameCredentialView.xib */; };\n\t\tC29CC7C31D76DE0900186B29 /* CredentialsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C29CC7C21D76DE0900186B29 /* CredentialsView.xib */; };\n\t\tC29CC7C61D76DE9600186B29 /* RLMCredentialsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C29CC7C51D76DE9600186B29 /* RLMCredentialsViewController.m */; };\n\t\tC29CC7CA1D76F57F00186B29 /* NSView+RLMExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = C29CC7C91D76F57F00186B29 /* NSView+RLMExtensions.m */; };\n\t\tC29CC7CD1D77097700186B29 /* RLMConnectionIndicatorWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C29CC7CC1D77097700186B29 /* RLMConnectionIndicatorWindowController.m */; };\n\t\tC29CC7CF1D770A4100186B29 /* ConnectionIndicatorWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = C29CC7CE1D770A4100186B29 /* ConnectionIndicatorWindow.xib */; };\n\t\tC29CC7D21D79CA5800186B29 /* RLMWelcomeWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C29CC7D11D79CA5800186B29 /* RLMWelcomeWindowController.m */; };\n\t\tC29CC7D41D79CA6D00186B29 /* WelcomeWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = C29CC7D31D79CA6D00186B29 /* WelcomeWindow.xib */; };\n\t\tC2AA0F631D634FBF00D5D7E6 /* RLMOpenSyncURLWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2AA0F621D634FBF00D5D7E6 /* RLMOpenSyncURLWindowController.m */; };\n\t\tC2AA0F671D634FDA00D5D7E6 /* RLMConnectToServerWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2AA0F651D634FDA00D5D7E6 /* RLMConnectToServerWindowController.m */; };\n\t\tC2B7CAC01D11A0C900049C32 /* ConnectToServerWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = C2B7CABF1D11A0C900049C32 /* ConnectToServerWindow.xib */; };\n\t\tC2CA58F01DAE3B6B0052BAAA /* RLMApplicationDelegate+CrashReporting.m in Sources */ = {isa = PBXBuildFile; fileRef = C2CA58EF1DAE3B6B0052BAAA /* RLMApplicationDelegate+CrashReporting.m */; };\n\t\tC2D302DC1D6DF63700E091DF /* RLMDocumentController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2D302DB1D6DF63700E091DF /* RLMDocumentController.m */; };\n\t\tC2D302E41D74528800E091DF /* RLMLoginWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2D302E31D74528800E091DF /* RLMLoginWindowController.m */; };\n\t\tC2D302E61D7455B600E091DF /* LoginWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = C2D302E51D7455B600E091DF /* LoginWindow.xib */; };\n\t\tC2D302E81D7478AC00E091DF /* OpenSyncURLWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = C2D302E71D7478AC00E091DF /* OpenSyncURLWindow.xib */; };\n\t\tC2D302EB1D747BF600E091DF /* RLMSyncURLValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = C2D302EA1D747BF600E091DF /* RLMSyncURLValueTransformer.m */; };\n\t\tC2D302EE1D75A2E100E091DF /* RLMWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2D302ED1D75A2E100E091DF /* RLMWindowController.m */; };\n\t\tDD2F4D631E9DCE10008EA2FB /* RLMKeychainInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2F4D621E9DCE10008EA2FB /* RLMKeychainInfo.m */; };\n\t\tDD2F4D661E9DD1E5008EA2FB /* RLMKeychainInfo+RLMSyncCredentials.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2F4D651E9DD1E5008EA2FB /* RLMKeychainInfo+RLMSyncCredentials.m */; };\n\t\tDD70EFFF1E9D9FC00074C115 /* RLMKeychainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = DD70EFFE1E9D9FC00074C115 /* RLMKeychainStore.m */; };\n\t\tE84EB8291A2FC38C00EB780E /* RLMTestObjects.m in Sources */ = {isa = PBXBuildFile; fileRef = E84EB8281A2FC38C00EB780E /* RLMTestObjects.m */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\tE84EB8221A2FB94E00EB780E /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 84E0F9441921F3B900D6CA14 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 84E0F94B1921F3B900D6CA14;\n\t\t\tremoteInfo = RealmBrowser;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXFileReference section */\n\t\t0A5C7B6B3C4F4B2895F8110D /* Pods_RealmBrowser.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RealmBrowser.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t22096B2519911F7300233D77 /* RLMBadgeTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMBadgeTableCellView.h; sourceTree = \"<group>\"; };\n\t\t22096B2619911F7300233D77 /* RLMBadgeTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMBadgeTableCellView.m; sourceTree = \"<group>\"; };\n\t\t220D382619B639D700F79496 /* RLMTestDataGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMTestDataGenerator.h; sourceTree = \"<group>\"; };\n\t\t220D382719B639D700F79496 /* RLMTestDataGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMTestDataGenerator.m; sourceTree = \"<group>\"; };\n\t\t221322F819954AB100D25737 /* RLMImageTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMImageTableCellView.h; sourceTree = \"<group>\"; };\n\t\t221322F919954AB100D25737 /* RLMImageTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMImageTableCellView.m; sourceTree = \"<group>\"; };\n\t\t221322FB19954B0A00D25737 /* RLMTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMTableCellView.h; sourceTree = \"<group>\"; };\n\t\t221322FC19954B0A00D25737 /* RLMTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMTableCellView.m; sourceTree = \"<group>\"; };\n\t\t2215F6351D0011CD005A46F7 /* RealmFileIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = RealmFileIcon.icns; sourceTree = \"<group>\"; };\n\t\t2234B66C1CF83F9600EAFDF0 /* RLMBrowserConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMBrowserConstants.h; sourceTree = \"<group>\"; };\n\t\t2234B66D1CF83F9600EAFDF0 /* RLMBrowserConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMBrowserConstants.m; sourceTree = \"<group>\"; };\n\t\t2249D9B019A62EBD00A31104 /* RLMTableColumn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMTableColumn.h; sourceTree = \"<group>\"; };\n\t\t2249D9B119A62EBD00A31104 /* RLMTableColumn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMTableColumn.m; sourceTree = \"<group>\"; };\n\t\t225443F319E3E6360045996B /* RLMTableHeaderCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMTableHeaderCell.h; sourceTree = \"<group>\"; };\n\t\t225443F419E3E6360045996B /* RLMTableHeaderCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMTableHeaderCell.m; sourceTree = \"<group>\"; };\n\t\t22565D6519C1BCF400C8C8EC /* RLMLinkTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMLinkTableCellView.h; sourceTree = \"<group>\"; };\n\t\t22565D6619C1BCF400C8C8EC /* RLMLinkTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMLinkTableCellView.m; sourceTree = \"<group>\"; };\n\t\t225786A01BD564F40012436A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/EncryptionKeyWindow.xib; sourceTree = \"<group>\"; };\n\t\t228D1F851A1CAD660028562A /* RLMResultsNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMResultsNode.h; sourceTree = \"<group>\"; };\n\t\t228D1F861A1CAD660028562A /* RLMResultsNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMResultsNode.m; sourceTree = \"<group>\"; };\n\t\t22A55FE919D18BA8009178BC /* RLMObjectNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMObjectNode.h; sourceTree = \"<group>\"; };\n\t\t22A55FEA19D18BA8009178BC /* RLMObjectNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMObjectNode.m; sourceTree = \"<group>\"; };\n\t\t22A55FEF19D19842009178BC /* RLMDescriptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMDescriptions.h; sourceTree = \"<group>\"; };\n\t\t22A55FF019D19842009178BC /* RLMDescriptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMDescriptions.m; sourceTree = \"<group>\"; };\n\t\t22D28EA51993AAAB00497FD3 /* RLMNumberTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMNumberTableCellView.h; sourceTree = \"<group>\"; };\n\t\t22D28EA61993AAAB00497FD3 /* RLMNumberTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMNumberTableCellView.m; sourceTree = \"<group>\"; };\n\t\t22D3AC8819CC5D710042C1B2 /* RLMModelExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMModelExporter.h; sourceTree = \"<group>\"; };\n\t\t22D3AC8919CC5D710042C1B2 /* RLMModelExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMModelExporter.m; sourceTree = \"<group>\"; };\n\t\t22D5FF911B0DBCC30090CFE6 /* Realm Browser.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = \"Realm Browser.entitlements\"; sourceTree = \"<group>\"; };\n\t\t22DC87E71B9808790024BA34 /* RLMExportIndicatorWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RLMExportIndicatorWindowController.xib; sourceTree = \"<group>\"; };\n\t\t22E4737019924CF700EEF7C9 /* RLMBasicTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMBasicTableCellView.h; sourceTree = \"<group>\"; };\n\t\t22E4737119924CF700EEF7C9 /* RLMBasicTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMBasicTableCellView.m; sourceTree = \"<group>\"; };\n\t\t22E473771992562400EEF7C9 /* RLMBoolTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMBoolTableCellView.h; sourceTree = \"<group>\"; };\n\t\t22E473781992562400EEF7C9 /* RLMBoolTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMBoolTableCellView.m; sourceTree = \"<group>\"; };\n\t\t3615BDB5196FA8BF00E1AE3F /* RLMQueryNavigationState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMQueryNavigationState.m; sourceTree = \"<group>\"; };\n\t\t3615BDB7196FA8E500E1AE3F /* RLMQueryNavigationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMQueryNavigationState.h; sourceTree = \"<group>\"; };\n\t\t36B669CA1B8B057F00F04AE1 /* RLMObjectLinkSelectionViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RLMObjectLinkSelectionViewController.xib; sourceTree = \"<group>\"; };\n\t\t36B669CC1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMObjectLinkSelectionViewController.h; sourceTree = \"<group>\"; };\n\t\t36B669CD1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMObjectLinkSelectionViewController.m; sourceTree = \"<group>\"; };\n\t\t54C9661677C2C808E8DCF296 /* Pods-RealmBrowser-RealmBrowserTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-RealmBrowser-RealmBrowserTests.debug.xcconfig\"; path = \"Pods/Target Support Files/Pods-RealmBrowser-RealmBrowserTests/Pods-RealmBrowser-RealmBrowserTests.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t670A2070878A7FF5E2CFC52A /* Pods-RealmBrowser.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-RealmBrowser.debug.xcconfig\"; path = \"Pods/Target Support Files/Pods-RealmBrowser/Pods-RealmBrowser.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t70C1960B2D4023A1B80EF2C1 /* Pods-RealmBrowser.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-RealmBrowser.release.xcconfig\"; path = \"Pods/Target Support Files/Pods-RealmBrowser/Pods-RealmBrowser.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t840F97BE192B7DCE006B591E /* RLMDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMDocument.h; sourceTree = \"<group>\"; };\n\t\t840F97BF192B7DCE006B591E /* RLMDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMDocument.m; sourceTree = \"<group>\"; };\n\t\t84446532195891AA00CEEA5B /* RLMViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMViewController.h; sourceTree = \"<group>\"; };\n\t\t84446533195891AA00CEEA5B /* RLMViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMViewController.m; sourceTree = \"<group>\"; };\n\t\t844C34E1194859080027E902 /* TestClasses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestClasses.h; sourceTree = \"<group>\"; };\n\t\t844C34E2194859080027E902 /* TestClasses.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestClasses.m; sourceTree = \"<group>\"; };\n\t\t8457294B1962E3860076D4F1 /* RLMTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMTableView.h; sourceTree = \"<group>\"; };\n\t\t8457294C1962E3860076D4F1 /* RLMTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMTableView.m; sourceTree = \"<group>\"; };\n\t\t8474E2B219544D8000BCA755 /* RLMTypeOutlineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMTypeOutlineViewController.h; sourceTree = \"<group>\"; };\n\t\t8474E2B319544D8000BCA755 /* RLMTypeOutlineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMTypeOutlineViewController.m; sourceTree = \"<group>\"; };\n\t\t8474E2BC195452BE00BCA755 /* RLMInstanceTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMInstanceTableViewController.m; sourceTree = \"<group>\"; };\n\t\t84754ABC193CA4600093604E /* RLMRealmBrowserWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMRealmBrowserWindowController.h; sourceTree = \"<group>\"; };\n\t\t84754ABD193CA4600093604E /* RLMRealmBrowserWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMRealmBrowserWindowController.m; sourceTree = \"<group>\"; };\n\t\t84925C5F195AD5B000EE27B1 /* NSColor+ByteSizeFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"NSColor+ByteSizeFactory.h\"; sourceTree = \"<group>\"; };\n\t\t84925C60195AD5B000EE27B1 /* NSColor+ByteSizeFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"NSColor+ByteSizeFactory.m\"; sourceTree = \"<group>\"; };\n\t\t84925C65195AE9AD00EE27B1 /* RLMSidebarTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMSidebarTableCellView.h; sourceTree = \"<group>\"; };\n\t\t84925C66195AE9AD00EE27B1 /* RLMSidebarTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMSidebarTableCellView.m; sourceTree = \"<group>\"; };\n\t\t84A34A4D192E19C5005D6CC4 /* RLMApplicationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMApplicationDelegate.h; sourceTree = \"<group>\"; };\n\t\t84A34A4E192E19C5005D6CC4 /* RLMApplicationDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = RLMApplicationDelegate.m; sourceTree = \"<group>\"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };\n\t\t84AA41A71949C99800A50F03 /* RLMTypeNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMTypeNode.h; sourceTree = \"<group>\"; };\n\t\t84AA41A81949C99800A50F03 /* RLMTypeNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMTypeNode.m; sourceTree = \"<group>\"; };\n\t\t84AA41AE1949CD7700A50F03 /* RLMArrayNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMArrayNode.h; sourceTree = \"<group>\"; };\n\t\t84AA41AF1949CD7700A50F03 /* RLMArrayNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMArrayNode.m; sourceTree = \"<group>\"; };\n\t\t84D7990419388E8900FC76A0 /* RLMClassNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMClassNode.h; sourceTree = \"<group>\"; };\n\t\t84D7990519388E8900FC76A0 /* RLMClassNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMClassNode.m; sourceTree = \"<group>\"; };\n\t\t84D7990619388E8900FC76A0 /* RLMClassProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMClassProperty.h; sourceTree = \"<group>\"; };\n\t\t84D7990719388E8900FC76A0 /* RLMClassProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMClassProperty.m; sourceTree = \"<group>\"; };\n\t\t84D7990819388E8900FC76A0 /* RLMRealmNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMRealmNode.h; sourceTree = \"<group>\"; };\n\t\t84D7990919388E8900FC76A0 /* RLMRealmNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMRealmNode.m; sourceTree = \"<group>\"; };\n\t\t84D7990A19388E8900FC76A0 /* RLMRealmOutlineNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMRealmOutlineNode.h; sourceTree = \"<group>\"; };\n\t\t84E0F94C1921F3B900D6CA14 /* Realm Browser.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"Realm Browser.app\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t84E0F94F1921F3B900D6CA14 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };\n\t\t84E0F9521921F3B900D6CA14 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };\n\t\t84E0F9541921F3B900D6CA14 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };\n\t\t84E0F9571921F3B900D6CA14 /* RealmBrowser-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = \"RealmBrowser-Info.plist\"; sourceTree = \"<group>\"; };\n\t\t84E0F9591921F3B900D6CA14 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = \"<group>\"; };\n\t\t84E0F95B1921F3B900D6CA14 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = \"<group>\"; };\n\t\t84E0F95D1921F3B900D6CA14 /* RealmBrowser-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = \"RealmBrowser-Prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t84E0F95F1921F3B900D6CA14 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = \"<group>\"; };\n\t\t84E0F9651921F3B900D6CA14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/RLMDocument.xib; sourceTree = \"<group>\"; };\n\t\t84E0F9681921F3B900D6CA14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = \"<group>\"; };\n\t\t84E0F96A1921F3B900D6CA14 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = \"<group>\"; };\n\t\t84E0F9701921F3B900D6CA14 /* RealmBrowserTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RealmBrowserTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t84E0F9781921F3B900D6CA14 /* RealmBrowserTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = \"RealmBrowserTests-Info.plist\"; sourceTree = \"<group>\"; };\n\t\t84E0F97A1921F3B900D6CA14 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = \"<group>\"; };\n\t\t84E0F97C1921F3B900D6CA14 /* RealmBrowserTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RealmBrowserTests.m; sourceTree = \"<group>\"; };\n\t\t84E35A40196A9F3B007F0344 /* RLMNavigationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMNavigationState.h; sourceTree = \"<group>\"; };\n\t\t84E35A41196A9F3B007F0344 /* RLMNavigationState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMNavigationState.m; sourceTree = \"<group>\"; };\n\t\t84E35A47196AD991007F0344 /* RLMNavigationStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMNavigationStack.h; sourceTree = \"<group>\"; };\n\t\t84E35A48196AD991007F0344 /* RLMNavigationStack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMNavigationStack.m; sourceTree = \"<group>\"; };\n\t\t84E35A4B196B021B007F0344 /* RLMArrayNavigationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMArrayNavigationState.h; sourceTree = \"<group>\"; };\n\t\t84E35A4C196B021B007F0344 /* RLMArrayNavigationState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMArrayNavigationState.m; sourceTree = \"<group>\"; };\n\t\tC26624291DA66378001102F4 /* RLMInstanceTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RLMInstanceTableViewController.h; sourceTree = \"<group>\"; };\n\t\tC26CC79E1DB6497900EE549D /* RLMSyncUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMSyncUtils.h; sourceTree = \"<group>\"; };\n\t\tC26CC79F1DB6497900EE549D /* RLMSyncUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMSyncUtils.m; sourceTree = \"<group>\"; };\n\t\tC27721D81D92D6CA00DEBF75 /* RLMCloudKitCredentialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMCloudKitCredentialViewController.h; sourceTree = \"<group>\"; };\n\t\tC27721D91D92D6CA00DEBF75 /* RLMCloudKitCredentialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMCloudKitCredentialViewController.m; sourceTree = \"<group>\"; };\n\t\tC27721DB1D92D6FE00DEBF75 /* CloudKitCredentialView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CloudKitCredentialView.xib; sourceTree = \"<group>\"; };\n\t\tC277A6E61D7D990E00DED239 /* FacebookCredentialView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FacebookCredentialView.xib; sourceTree = \"<group>\"; };\n\t\tC277A6E81D7D9A0100DED239 /* RLMFacebookCredentialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMFacebookCredentialViewController.h; sourceTree = \"<group>\"; };\n\t\tC277A6E91D7D9A0100DED239 /* RLMFacebookCredentialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMFacebookCredentialViewController.m; sourceTree = \"<group>\"; };\n\t\tC277A6EB1D7EC03B00DED239 /* RLMGoogleCredentialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMGoogleCredentialViewController.h; sourceTree = \"<group>\"; };\n\t\tC277A6EC1D7EC03B00DED239 /* RLMGoogleCredentialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMGoogleCredentialViewController.m; sourceTree = \"<group>\"; };\n\t\tC277A6EE1D7EC1AF00DED239 /* GoogleCredentialView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GoogleCredentialView.xib; sourceTree = \"<group>\"; };\n\t\tC27E17381D5CC0EF0095259A /* RLMSyncServerBrowserWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMSyncServerBrowserWindowController.h; sourceTree = \"<group>\"; };\n\t\tC27E17391D5CC0EF0095259A /* RLMSyncServerBrowserWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMSyncServerBrowserWindowController.m; sourceTree = \"<group>\"; };\n\t\tC27E173B1D5CC1070095259A /* SyncServerBrowserWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SyncServerBrowserWindow.xib; sourceTree = \"<group>\"; };\n\t\tC2986A801D6C81C2005A2CD6 /* RLMUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMUtils.h; sourceTree = \"<group>\"; };\n\t\tC2986A811D6C81C2005A2CD6 /* RLMUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMUtils.m; sourceTree = \"<group>\"; };\n\t\tC2986A831D6C823D005A2CD6 /* RLMEncryptionKeyWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMEncryptionKeyWindowController.h; sourceTree = \"<group>\"; };\n\t\tC2986A841D6C823D005A2CD6 /* RLMEncryptionKeyWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMEncryptionKeyWindowController.m; sourceTree = \"<group>\"; };\n\t\tC2986A851D6C823D005A2CD6 /* RLMExportIndicatorWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMExportIndicatorWindowController.h; sourceTree = \"<group>\"; };\n\t\tC2986A861D6C823D005A2CD6 /* RLMExportIndicatorWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMExportIndicatorWindowController.m; sourceTree = \"<group>\"; };\n\t\tC2986A891D6C8257005A2CD6 /* RLMOptionalBoolTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMOptionalBoolTableCellView.h; sourceTree = \"<group>\"; };\n\t\tC2986A8A1D6C8257005A2CD6 /* RLMOptionalBoolTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMOptionalBoolTableCellView.m; sourceTree = \"<group>\"; };\n\t\tC29CC7B41D76D4E300186B29 /* RLMCredentialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMCredentialViewController.h; sourceTree = \"<group>\"; };\n\t\tC29CC7B51D76D4E300186B29 /* RLMCredentialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMCredentialViewController.m; sourceTree = \"<group>\"; };\n\t\tC29CC7B71D76D55D00186B29 /* RLMAccessTokenCredentialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMAccessTokenCredentialViewController.h; sourceTree = \"<group>\"; };\n\t\tC29CC7B81D76D55D00186B29 /* RLMAccessTokenCredentialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMAccessTokenCredentialViewController.m; sourceTree = \"<group>\"; };\n\t\tC29CC7BA1D76D8C100186B29 /* RLMUsernameCredentialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMUsernameCredentialViewController.h; sourceTree = \"<group>\"; };\n\t\tC29CC7BB1D76D8C100186B29 /* RLMUsernameCredentialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMUsernameCredentialViewController.m; sourceTree = \"<group>\"; };\n\t\tC29CC7BD1D76DA8900186B29 /* RLMCredentialViewController+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = \"RLMCredentialViewController+Private.h\"; sourceTree = \"<group>\"; };\n\t\tC29CC7BE1D76DC5900186B29 /* AccessTokenCredentialView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AccessTokenCredentialView.xib; sourceTree = \"<group>\"; };\n\t\tC29CC7C01D76DD4500186B29 /* UsernameCredentialView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UsernameCredentialView.xib; sourceTree = \"<group>\"; };\n\t\tC29CC7C21D76DE0900186B29 /* CredentialsView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CredentialsView.xib; sourceTree = \"<group>\"; };\n\t\tC29CC7C41D76DE9600186B29 /* RLMCredentialsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMCredentialsViewController.h; sourceTree = \"<group>\"; };\n\t\tC29CC7C51D76DE9600186B29 /* RLMCredentialsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMCredentialsViewController.m; sourceTree = \"<group>\"; };\n\t\tC29CC7C81D76F57F00186B29 /* NSView+RLMExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"NSView+RLMExtensions.h\"; sourceTree = \"<group>\"; };\n\t\tC29CC7C91D76F57F00186B29 /* NSView+RLMExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"NSView+RLMExtensions.m\"; sourceTree = \"<group>\"; };\n\t\tC29CC7CB1D77097700186B29 /* RLMConnectionIndicatorWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMConnectionIndicatorWindowController.h; sourceTree = \"<group>\"; };\n\t\tC29CC7CC1D77097700186B29 /* RLMConnectionIndicatorWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMConnectionIndicatorWindowController.m; sourceTree = \"<group>\"; };\n\t\tC29CC7CE1D770A4100186B29 /* ConnectionIndicatorWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConnectionIndicatorWindow.xib; sourceTree = \"<group>\"; };\n\t\tC29CC7D01D79CA5800186B29 /* RLMWelcomeWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMWelcomeWindowController.h; sourceTree = \"<group>\"; };\n\t\tC29CC7D11D79CA5800186B29 /* RLMWelcomeWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMWelcomeWindowController.m; sourceTree = \"<group>\"; };\n\t\tC29CC7D31D79CA6D00186B29 /* WelcomeWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WelcomeWindow.xib; sourceTree = \"<group>\"; };\n\t\tC2AA0F611D634FBF00D5D7E6 /* RLMOpenSyncURLWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMOpenSyncURLWindowController.h; sourceTree = \"<group>\"; };\n\t\tC2AA0F621D634FBF00D5D7E6 /* RLMOpenSyncURLWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMOpenSyncURLWindowController.m; sourceTree = \"<group>\"; };\n\t\tC2AA0F641D634FDA00D5D7E6 /* RLMConnectToServerWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMConnectToServerWindowController.h; sourceTree = \"<group>\"; };\n\t\tC2AA0F651D634FDA00D5D7E6 /* RLMConnectToServerWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMConnectToServerWindowController.m; sourceTree = \"<group>\"; };\n\t\tC2B7CABF1D11A0C900049C32 /* ConnectToServerWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ConnectToServerWindow.xib; sourceTree = \"<group>\"; };\n\t\tC2CA58EE1DAE3B6B0052BAAA /* RLMApplicationDelegate+CrashReporting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"RLMApplicationDelegate+CrashReporting.h\"; sourceTree = \"<group>\"; };\n\t\tC2CA58EF1DAE3B6B0052BAAA /* RLMApplicationDelegate+CrashReporting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"RLMApplicationDelegate+CrashReporting.m\"; sourceTree = \"<group>\"; };\n\t\tC2D302DA1D6DF63700E091DF /* RLMDocumentController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMDocumentController.h; sourceTree = \"<group>\"; };\n\t\tC2D302DB1D6DF63700E091DF /* RLMDocumentController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMDocumentController.m; sourceTree = \"<group>\"; };\n\t\tC2D302E21D74528800E091DF /* RLMLoginWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMLoginWindowController.h; sourceTree = \"<group>\"; };\n\t\tC2D302E31D74528800E091DF /* RLMLoginWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMLoginWindowController.m; sourceTree = \"<group>\"; };\n\t\tC2D302E51D7455B600E091DF /* LoginWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoginWindow.xib; sourceTree = \"<group>\"; };\n\t\tC2D302E71D7478AC00E091DF /* OpenSyncURLWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OpenSyncURLWindow.xib; sourceTree = \"<group>\"; };\n\t\tC2D302E91D747BF600E091DF /* RLMSyncURLValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMSyncURLValueTransformer.h; sourceTree = \"<group>\"; };\n\t\tC2D302EA1D747BF600E091DF /* RLMSyncURLValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMSyncURLValueTransformer.m; sourceTree = \"<group>\"; };\n\t\tC2D302EC1D75A2E100E091DF /* RLMWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMWindowController.h; sourceTree = \"<group>\"; };\n\t\tC2D302ED1D75A2E100E091DF /* RLMWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMWindowController.m; sourceTree = \"<group>\"; };\n\t\tC686DBCA1CE3F34837DB465F /* Pods-RealmBrowser-RealmBrowserTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-RealmBrowser-RealmBrowserTests.release.xcconfig\"; path = \"Pods/Target Support Files/Pods-RealmBrowser-RealmBrowserTests/Pods-RealmBrowser-RealmBrowserTests.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\tDD2F4D611E9DCE10008EA2FB /* RLMKeychainInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMKeychainInfo.h; sourceTree = \"<group>\"; };\n\t\tDD2F4D621E9DCE10008EA2FB /* RLMKeychainInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMKeychainInfo.m; sourceTree = \"<group>\"; };\n\t\tDD2F4D641E9DD1E5008EA2FB /* RLMKeychainInfo+RLMSyncCredentials.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"RLMKeychainInfo+RLMSyncCredentials.h\"; sourceTree = \"<group>\"; };\n\t\tDD2F4D651E9DD1E5008EA2FB /* RLMKeychainInfo+RLMSyncCredentials.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"RLMKeychainInfo+RLMSyncCredentials.m\"; sourceTree = \"<group>\"; };\n\t\tDD70EFFD1E9D9FC00074C115 /* RLMKeychainStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMKeychainStore.h; sourceTree = \"<group>\"; };\n\t\tDD70EFFE1E9D9FC00074C115 /* RLMKeychainStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMKeychainStore.m; sourceTree = \"<group>\"; };\n\t\tE84EB8271A2FC38C00EB780E /* RLMTestObjects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RLMTestObjects.h; sourceTree = \"<group>\"; };\n\t\tE84EB8281A2FC38C00EB780E /* RLMTestObjects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RLMTestObjects.m; sourceTree = \"<group>\"; };\n\t\tEB46D9299721CA4725D511E6 /* Pods_RealmBrowser_RealmBrowserTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RealmBrowser_RealmBrowserTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t84E0F9491921F3B900D6CA14 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t84E0F9501921F3B900D6CA14 /* Cocoa.framework in Frameworks */,\n\t\t\t\t9D25DD9EEFA4ED17DD9B0B58 /* Pods_RealmBrowser.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t84E0F96D1921F3B900D6CA14 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t84E0F9731921F3B900D6CA14 /* Cocoa.framework in Frameworks */,\n\t\t\t\t2CD855AECE4DBDF7F079C0FD /* Pods_RealmBrowser_RealmBrowserTests.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t220A4F031C02E4DC00A32787 /* UI */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2257869F1BD564F40012436A /* EncryptionKeyWindow.xib */,\n\t\t\t\t84E0F9671921F3B900D6CA14 /* MainMenu.xib */,\n\t\t\t\t84E0F9641921F3B900D6CA14 /* RLMDocument.xib */,\n\t\t\t\t22DC87E71B9808790024BA34 /* RLMExportIndicatorWindowController.xib */,\n\t\t\t\t36B669CA1B8B057F00F04AE1 /* RLMObjectLinkSelectionViewController.xib */,\n\t\t\t);\n\t\t\tpath = UI;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t220A4F051C02E4FB00A32787 /* Documents */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F95E1921F3B900D6CA14 /* Credits.rtf */,\n\t\t\t);\n\t\t\tpath = Documents;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t220BCC431CED6134006432ED /* RealmBrowserSync */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC23F6A3D1D648AA3003C4E71 /* Library */,\n\t\t\t\t220BCC491CED6134006432ED /* Controllers */,\n\t\t\t\t220BCC531CED6134006432ED /* Resources */,\n\t\t\t);\n\t\t\tpath = RealmBrowserSync;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t220BCC491CED6134006432ED /* Controllers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC2AA0F641D634FDA00D5D7E6 /* RLMConnectToServerWindowController.h */,\n\t\t\t\tC2AA0F651D634FDA00D5D7E6 /* RLMConnectToServerWindowController.m */,\n\t\t\t\tC27E17381D5CC0EF0095259A /* RLMSyncServerBrowserWindowController.h */,\n\t\t\t\tC27E17391D5CC0EF0095259A /* RLMSyncServerBrowserWindowController.m */,\n\t\t\t\tC2AA0F611D634FBF00D5D7E6 /* RLMOpenSyncURLWindowController.h */,\n\t\t\t\tC2AA0F621D634FBF00D5D7E6 /* RLMOpenSyncURLWindowController.m */,\n\t\t\t\tC2D302E21D74528800E091DF /* RLMLoginWindowController.h */,\n\t\t\t\tC2D302E31D74528800E091DF /* RLMLoginWindowController.m */,\n\t\t\t\tC29CC7C41D76DE9600186B29 /* RLMCredentialsViewController.h */,\n\t\t\t\tC29CC7C51D76DE9600186B29 /* RLMCredentialsViewController.m */,\n\t\t\t\tC29CC7B41D76D4E300186B29 /* RLMCredentialViewController.h */,\n\t\t\t\tC29CC7BD1D76DA8900186B29 /* RLMCredentialViewController+Private.h */,\n\t\t\t\tC29CC7B51D76D4E300186B29 /* RLMCredentialViewController.m */,\n\t\t\t\tC29CC7B71D76D55D00186B29 /* RLMAccessTokenCredentialViewController.h */,\n\t\t\t\tC29CC7B81D76D55D00186B29 /* RLMAccessTokenCredentialViewController.m */,\n\t\t\t\tC29CC7BA1D76D8C100186B29 /* RLMUsernameCredentialViewController.h */,\n\t\t\t\tC29CC7BB1D76D8C100186B29 /* RLMUsernameCredentialViewController.m */,\n\t\t\t\tC277A6E81D7D9A0100DED239 /* RLMFacebookCredentialViewController.h */,\n\t\t\t\tC277A6E91D7D9A0100DED239 /* RLMFacebookCredentialViewController.m */,\n\t\t\t\tC277A6EB1D7EC03B00DED239 /* RLMGoogleCredentialViewController.h */,\n\t\t\t\tC277A6EC1D7EC03B00DED239 /* RLMGoogleCredentialViewController.m */,\n\t\t\t\tC27721D81D92D6CA00DEBF75 /* RLMCloudKitCredentialViewController.h */,\n\t\t\t\tC27721D91D92D6CA00DEBF75 /* RLMCloudKitCredentialViewController.m */,\n\t\t\t\tC29CC7CB1D77097700186B29 /* RLMConnectionIndicatorWindowController.h */,\n\t\t\t\tC29CC7CC1D77097700186B29 /* RLMConnectionIndicatorWindowController.m */,\n\t\t\t\tC29CC7D01D79CA5800186B29 /* RLMWelcomeWindowController.h */,\n\t\t\t\tC29CC7D11D79CA5800186B29 /* RLMWelcomeWindowController.m */,\n\t\t\t);\n\t\t\tpath = Controllers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t220BCC531CED6134006432ED /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC2D302E71D7478AC00E091DF /* OpenSyncURLWindow.xib */,\n\t\t\t\tC2B7CABF1D11A0C900049C32 /* ConnectToServerWindow.xib */,\n\t\t\t\tC27E173B1D5CC1070095259A /* SyncServerBrowserWindow.xib */,\n\t\t\t\tC2D302E51D7455B600E091DF /* LoginWindow.xib */,\n\t\t\t\tC29CC7C21D76DE0900186B29 /* CredentialsView.xib */,\n\t\t\t\tC29CC7BE1D76DC5900186B29 /* AccessTokenCredentialView.xib */,\n\t\t\t\tC29CC7C01D76DD4500186B29 /* UsernameCredentialView.xib */,\n\t\t\t\tC29CC7CE1D770A4100186B29 /* ConnectionIndicatorWindow.xib */,\n\t\t\t\tC277A6E61D7D990E00DED239 /* FacebookCredentialView.xib */,\n\t\t\t\tC277A6EE1D7EC1AF00DED239 /* GoogleCredentialView.xib */,\n\t\t\t\tC27721DB1D92D6FE00DEBF75 /* CloudKitCredentialView.xib */,\n\t\t\t\tC29CC7D31D79CA6D00186B29 /* WelcomeWindow.xib */,\n\t\t\t);\n\t\t\tpath = Resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t2215F6341D0011CD005A46F7 /* Icons */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2215F6351D0011CD005A46F7 /* RealmFileIcon.icns */,\n\t\t\t);\n\t\t\tpath = Icons;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t4F9A907EAEECE44CAB252DDA /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t670A2070878A7FF5E2CFC52A /* Pods-RealmBrowser.debug.xcconfig */,\n\t\t\t\t70C1960B2D4023A1B80EF2C1 /* Pods-RealmBrowser.release.xcconfig */,\n\t\t\t\t54C9661677C2C808E8DCF296 /* Pods-RealmBrowser-RealmBrowserTests.debug.xcconfig */,\n\t\t\t\tC686DBCA1CE3F34837DB465F /* Pods-RealmBrowser-RealmBrowserTests.release.xcconfig */,\n\t\t\t);\n\t\t\tname = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84BCA5FE1951BC99008FC850 /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2215F6341D0011CD005A46F7 /* Icons */,\n\t\t\t\t220A4F051C02E4FB00A32787 /* Documents */,\n\t\t\t\t220A4F031C02E4DC00A32787 /* UI */,\n\t\t\t\t84E0F96A1921F3B900D6CA14 /* Images.xcassets */,\n\t\t\t);\n\t\t\tpath = Resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F9431921F3B900D6CA14 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F9551921F3B900D6CA14 /* RealmBrowser */,\n\t\t\t\t220BCC431CED6134006432ED /* RealmBrowserSync */,\n\t\t\t\t84E0F9761921F3B900D6CA14 /* RealmBrowserTests */,\n\t\t\t\t84E0F94E1921F3B900D6CA14 /* Frameworks */,\n\t\t\t\t84E0F94D1921F3B900D6CA14 /* Products */,\n\t\t\t\t4F9A907EAEECE44CAB252DDA /* Pods */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F94D1921F3B900D6CA14 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F94C1921F3B900D6CA14 /* Realm Browser.app */,\n\t\t\t\t84E0F9701921F3B900D6CA14 /* RealmBrowserTests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F94E1921F3B900D6CA14 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F94F1921F3B900D6CA14 /* Cocoa.framework */,\n\t\t\t\t84E0F9521921F3B900D6CA14 /* AppKit.framework */,\n\t\t\t\t84E0F9541921F3B900D6CA14 /* Foundation.framework */,\n\t\t\t\t0A5C7B6B3C4F4B2895F8110D /* Pods_RealmBrowser.framework */,\n\t\t\t\tEB46D9299721CA4725D511E6 /* Pods_RealmBrowser_RealmBrowserTests.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F9551921F3B900D6CA14 /* RealmBrowser */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tE83626C41CE35C4300E9493D /* Application */,\n\t\t\t\tE83626C51CE35C6200E9493D /* Controllers */,\n\t\t\t\tE83626C61CE35C7300E9493D /* Models */,\n\t\t\t\tE83626C81CE35C8200E9493D /* Views */,\n\t\t\t\t84BCA5FE1951BC99008FC850 /* Resources */,\n\t\t\t\tE83626C71CE35C7C00E9493D /* Support */,\n\t\t\t\t84E0F9561921F3B900D6CA14 /* Supporting Files */,\n\t\t\t);\n\t\t\tpath = RealmBrowser;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F9561921F3B900D6CA14 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F9581921F3B900D6CA14 /* InfoPlist.strings */,\n\t\t\t\t22D5FF911B0DBCC30090CFE6 /* Realm Browser.entitlements */,\n\t\t\t\t84E0F9571921F3B900D6CA14 /* RealmBrowser-Info.plist */,\n\t\t\t\t84E0F95D1921F3B900D6CA14 /* RealmBrowser-Prefix.pch */,\n\t\t\t\t84E0F95B1921F3B900D6CA14 /* main.m */,\n\t\t\t);\n\t\t\tpath = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F9761921F3B900D6CA14 /* RealmBrowserTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F9771921F3B900D6CA14 /* Supporting Files */,\n\t\t\t\tE84EB8271A2FC38C00EB780E /* RLMTestObjects.h */,\n\t\t\t\tE84EB8281A2FC38C00EB780E /* RLMTestObjects.m */,\n\t\t\t\t84E0F97C1921F3B900D6CA14 /* RealmBrowserTests.m */,\n\t\t\t);\n\t\t\tpath = RealmBrowserTests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F9771921F3B900D6CA14 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F9791921F3B900D6CA14 /* InfoPlist.strings */,\n\t\t\t\t84E0F9781921F3B900D6CA14 /* RealmBrowserTests-Info.plist */,\n\t\t\t);\n\t\t\tpath = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC23F6A3D1D648AA3003C4E71 /* Library */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tDD2F4D601E9DCDFC008EA2FB /* Keychain */,\n\t\t\t\tC2D302E91D747BF600E091DF /* RLMSyncURLValueTransformer.h */,\n\t\t\t\tC2D302EA1D747BF600E091DF /* RLMSyncURLValueTransformer.m */,\n\t\t\t\tC2D302EC1D75A2E100E091DF /* RLMWindowController.h */,\n\t\t\t\tC2D302ED1D75A2E100E091DF /* RLMWindowController.m */,\n\t\t\t\tC29CC7C81D76F57F00186B29 /* NSView+RLMExtensions.h */,\n\t\t\t\tC29CC7C91D76F57F00186B29 /* NSView+RLMExtensions.m */,\n\t\t\t\tC26CC79E1DB6497900EE549D /* RLMSyncUtils.h */,\n\t\t\t\tC26CC79F1DB6497900EE549D /* RLMSyncUtils.m */,\n\t\t\t);\n\t\t\tpath = Library;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tDD2F4D601E9DCDFC008EA2FB /* Keychain */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tDD2F4D611E9DCE10008EA2FB /* RLMKeychainInfo.h */,\n\t\t\t\tDD2F4D621E9DCE10008EA2FB /* RLMKeychainInfo.m */,\n\t\t\t\tDD70EFFD1E9D9FC00074C115 /* RLMKeychainStore.h */,\n\t\t\t\tDD70EFFE1E9D9FC00074C115 /* RLMKeychainStore.m */,\n\t\t\t\tDD2F4D641E9DD1E5008EA2FB /* RLMKeychainInfo+RLMSyncCredentials.h */,\n\t\t\t\tDD2F4D651E9DD1E5008EA2FB /* RLMKeychainInfo+RLMSyncCredentials.m */,\n\t\t\t);\n\t\t\tname = Keychain;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE83626C41CE35C4300E9493D /* Application */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t84A34A4D192E19C5005D6CC4 /* RLMApplicationDelegate.h */,\n\t\t\t\t84A34A4E192E19C5005D6CC4 /* RLMApplicationDelegate.m */,\n\t\t\t\tC2CA58EE1DAE3B6B0052BAAA /* RLMApplicationDelegate+CrashReporting.h */,\n\t\t\t\tC2CA58EF1DAE3B6B0052BAAA /* RLMApplicationDelegate+CrashReporting.m */,\n\t\t\t);\n\t\t\tpath = Application;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE83626C51CE35C6200E9493D /* Controllers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC2D302DA1D6DF63700E091DF /* RLMDocumentController.h */,\n\t\t\t\tC2D302DB1D6DF63700E091DF /* RLMDocumentController.m */,\n\t\t\t\tC2986A831D6C823D005A2CD6 /* RLMEncryptionKeyWindowController.h */,\n\t\t\t\tC2986A841D6C823D005A2CD6 /* RLMEncryptionKeyWindowController.m */,\n\t\t\t\tC2986A851D6C823D005A2CD6 /* RLMExportIndicatorWindowController.h */,\n\t\t\t\tC2986A861D6C823D005A2CD6 /* RLMExportIndicatorWindowController.m */,\n\t\t\t\tC26624291DA66378001102F4 /* RLMInstanceTableViewController.h */,\n\t\t\t\t8474E2BC195452BE00BCA755 /* RLMInstanceTableViewController.m */,\n\t\t\t\t36B669CC1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.h */,\n\t\t\t\t36B669CD1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.m */,\n\t\t\t\t84754ABC193CA4600093604E /* RLMRealmBrowserWindowController.h */,\n\t\t\t\t84754ABD193CA4600093604E /* RLMRealmBrowserWindowController.m */,\n\t\t\t\t8474E2B219544D8000BCA755 /* RLMTypeOutlineViewController.h */,\n\t\t\t\t8474E2B319544D8000BCA755 /* RLMTypeOutlineViewController.m */,\n\t\t\t\t84446532195891AA00CEEA5B /* RLMViewController.h */,\n\t\t\t\t84446533195891AA00CEEA5B /* RLMViewController.m */,\n\t\t\t);\n\t\t\tpath = Controllers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE83626C61CE35C7300E9493D /* Models */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t84E35A4B196B021B007F0344 /* RLMArrayNavigationState.h */,\n\t\t\t\t84E35A4C196B021B007F0344 /* RLMArrayNavigationState.m */,\n\t\t\t\t84AA41AE1949CD7700A50F03 /* RLMArrayNode.h */,\n\t\t\t\t84AA41AF1949CD7700A50F03 /* RLMArrayNode.m */,\n\t\t\t\t84D7990419388E8900FC76A0 /* RLMClassNode.h */,\n\t\t\t\t84D7990519388E8900FC76A0 /* RLMClassNode.m */,\n\t\t\t\t84D7990619388E8900FC76A0 /* RLMClassProperty.h */,\n\t\t\t\t84D7990719388E8900FC76A0 /* RLMClassProperty.m */,\n\t\t\t\t840F97BE192B7DCE006B591E /* RLMDocument.h */,\n\t\t\t\t840F97BF192B7DCE006B591E /* RLMDocument.m */,\n\t\t\t\t84E35A47196AD991007F0344 /* RLMNavigationStack.h */,\n\t\t\t\t84E35A48196AD991007F0344 /* RLMNavigationStack.m */,\n\t\t\t\t84E35A40196A9F3B007F0344 /* RLMNavigationState.h */,\n\t\t\t\t84E35A41196A9F3B007F0344 /* RLMNavigationState.m */,\n\t\t\t\t22A55FE919D18BA8009178BC /* RLMObjectNode.h */,\n\t\t\t\t22A55FEA19D18BA8009178BC /* RLMObjectNode.m */,\n\t\t\t\t3615BDB7196FA8E500E1AE3F /* RLMQueryNavigationState.h */,\n\t\t\t\t3615BDB5196FA8BF00E1AE3F /* RLMQueryNavigationState.m */,\n\t\t\t\t84D7990819388E8900FC76A0 /* RLMRealmNode.h */,\n\t\t\t\t84D7990919388E8900FC76A0 /* RLMRealmNode.m */,\n\t\t\t\t84D7990A19388E8900FC76A0 /* RLMRealmOutlineNode.h */,\n\t\t\t\t228D1F851A1CAD660028562A /* RLMResultsNode.h */,\n\t\t\t\t228D1F861A1CAD660028562A /* RLMResultsNode.m */,\n\t\t\t\t2249D9B019A62EBD00A31104 /* RLMTableColumn.h */,\n\t\t\t\t2249D9B119A62EBD00A31104 /* RLMTableColumn.m */,\n\t\t\t\t84AA41A71949C99800A50F03 /* RLMTypeNode.h */,\n\t\t\t\t84AA41A81949C99800A50F03 /* RLMTypeNode.m */,\n\t\t\t);\n\t\t\tpath = Models;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE83626C71CE35C7C00E9493D /* Support */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2234B66C1CF83F9600EAFDF0 /* RLMBrowserConstants.h */,\n\t\t\t\t2234B66D1CF83F9600EAFDF0 /* RLMBrowserConstants.m */,\n\t\t\t\t84925C5F195AD5B000EE27B1 /* NSColor+ByteSizeFactory.h */,\n\t\t\t\t84925C60195AD5B000EE27B1 /* NSColor+ByteSizeFactory.m */,\n\t\t\t\t22A55FEF19D19842009178BC /* RLMDescriptions.h */,\n\t\t\t\t22A55FF019D19842009178BC /* RLMDescriptions.m */,\n\t\t\t\t22D3AC8819CC5D710042C1B2 /* RLMModelExporter.h */,\n\t\t\t\t22D3AC8919CC5D710042C1B2 /* RLMModelExporter.m */,\n\t\t\t\t220D382619B639D700F79496 /* RLMTestDataGenerator.h */,\n\t\t\t\t220D382719B639D700F79496 /* RLMTestDataGenerator.m */,\n\t\t\t\tC2986A801D6C81C2005A2CD6 /* RLMUtils.h */,\n\t\t\t\tC2986A811D6C81C2005A2CD6 /* RLMUtils.m */,\n\t\t\t\t844C34E1194859080027E902 /* TestClasses.h */,\n\t\t\t\t844C34E2194859080027E902 /* TestClasses.m */,\n\t\t\t);\n\t\t\tpath = Support;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE83626C81CE35C8200E9493D /* Views */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t22096B2519911F7300233D77 /* RLMBadgeTableCellView.h */,\n\t\t\t\t22096B2619911F7300233D77 /* RLMBadgeTableCellView.m */,\n\t\t\t\t22E4737019924CF700EEF7C9 /* RLMBasicTableCellView.h */,\n\t\t\t\t22E4737119924CF700EEF7C9 /* RLMBasicTableCellView.m */,\n\t\t\t\t22E473771992562400EEF7C9 /* RLMBoolTableCellView.h */,\n\t\t\t\t22E473781992562400EEF7C9 /* RLMBoolTableCellView.m */,\n\t\t\t\t221322F819954AB100D25737 /* RLMImageTableCellView.h */,\n\t\t\t\t221322F919954AB100D25737 /* RLMImageTableCellView.m */,\n\t\t\t\t22565D6519C1BCF400C8C8EC /* RLMLinkTableCellView.h */,\n\t\t\t\t22565D6619C1BCF400C8C8EC /* RLMLinkTableCellView.m */,\n\t\t\t\t22D28EA51993AAAB00497FD3 /* RLMNumberTableCellView.h */,\n\t\t\t\t22D28EA61993AAAB00497FD3 /* RLMNumberTableCellView.m */,\n\t\t\t\tC2986A891D6C8257005A2CD6 /* RLMOptionalBoolTableCellView.h */,\n\t\t\t\tC2986A8A1D6C8257005A2CD6 /* RLMOptionalBoolTableCellView.m */,\n\t\t\t\t84925C65195AE9AD00EE27B1 /* RLMSidebarTableCellView.h */,\n\t\t\t\t84925C66195AE9AD00EE27B1 /* RLMSidebarTableCellView.m */,\n\t\t\t\t221322FB19954B0A00D25737 /* RLMTableCellView.h */,\n\t\t\t\t221322FC19954B0A00D25737 /* RLMTableCellView.m */,\n\t\t\t\t225443F319E3E6360045996B /* RLMTableHeaderCell.h */,\n\t\t\t\t225443F419E3E6360045996B /* RLMTableHeaderCell.m */,\n\t\t\t\t8457294B1962E3860076D4F1 /* RLMTableView.h */,\n\t\t\t\t8457294C1962E3860076D4F1 /* RLMTableView.m */,\n\t\t\t);\n\t\t\tpath = Views;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t84E0F94B1921F3B900D6CA14 /* RealmBrowser */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 84E0F9801921F3B900D6CA14 /* Build configuration list for PBXNativeTarget \"RealmBrowser\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t0C91DB9FF41AFE33C1A2D3B5 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t84E0F9481921F3B900D6CA14 /* Sources */,\n\t\t\t\t84E0F94A1921F3B900D6CA14 /* Resources */,\n\t\t\t\t84E0F9491921F3B900D6CA14 /* Frameworks */,\n\t\t\t\t23AE60F23DDCF9B53FC5CA2A /* [CP] Embed Pods Frameworks */,\n\t\t\t\tB1C10875F4E36EA6AD8A048C /* [CP] Copy Pods Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = RealmBrowser;\n\t\t\tproductName = RealmVisualEditor;\n\t\t\tproductReference = 84E0F94C1921F3B900D6CA14 /* Realm Browser.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n\t\t84E0F96F1921F3B900D6CA14 /* RealmBrowserTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 84E0F9831921F3B900D6CA14 /* Build configuration list for PBXNativeTarget \"RealmBrowserTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t17F608046AD67CB7E4F89028 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t84E0F96C1921F3B900D6CA14 /* Sources */,\n\t\t\t\t84E0F96D1921F3B900D6CA14 /* Frameworks */,\n\t\t\t\t84E0F96E1921F3B900D6CA14 /* Resources */,\n\t\t\t\t6776AB2FA4A26847E0FE07D5 /* [CP] Embed Pods Frameworks */,\n\t\t\t\tA733078B58459912617FD77E /* [CP] Copy Pods Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\tE84EB8231A2FB94E00EB780E /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = RealmBrowserTests;\n\t\t\tproductName = RealmVisualEditorTests;\n\t\t\tproductReference = 84E0F9701921F3B900D6CA14 /* RealmBrowserTests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t84E0F9441921F3B900D6CA14 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tCLASSPREFIX = RLM;\n\t\t\t\tLastUpgradeCheck = 0830;\n\t\t\t\tORGANIZATIONNAME = \"Realm inc.\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t84E0F94B1921F3B900D6CA14 = {\n\t\t\t\t\t\tLastSwiftMigration = 0800;\n\t\t\t\t\t\tSystemCapabilities = {\n\t\t\t\t\t\t\tcom.apple.Sandbox = {\n\t\t\t\t\t\t\t\tenabled = 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\t84E0F96F1921F3B900D6CA14 = {\n\t\t\t\t\t\tLastSwiftMigration = 0800;\n\t\t\t\t\t\tTestTargetID = 84E0F94B1921F3B900D6CA14;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 84E0F9471921F3B900D6CA14 /* Build configuration list for PBXProject \"RealmBrowser\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 84E0F9431921F3B900D6CA14;\n\t\t\tproductRefGroup = 84E0F94D1921F3B900D6CA14 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t84E0F94B1921F3B900D6CA14 /* RealmBrowser */,\n\t\t\t\t84E0F96F1921F3B900D6CA14 /* RealmBrowserTests */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t84E0F94A1921F3B900D6CA14 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t84E0F95A1921F3B900D6CA14 /* InfoPlist.strings in Resources */,\n\t\t\t\tC2986A7E1D6C8122005A2CD6 /* MainMenu.xib in Resources */,\n\t\t\t\t84E0F96B1921F3B900D6CA14 /* Images.xcassets in Resources */,\n\t\t\t\tC29CC7CF1D770A4100186B29 /* ConnectionIndicatorWindow.xib in Resources */,\n\t\t\t\tC29CC7BF1D76DC5900186B29 /* AccessTokenCredentialView.xib in Resources */,\n\t\t\t\tC27721DC1D92D6FE00DEBF75 /* CloudKitCredentialView.xib in Resources */,\n\t\t\t\tC2986A7F1D6C8126005A2CD6 /* RLMDocument.xib in Resources */,\n\t\t\t\tC27E173C1D5CC1070095259A /* SyncServerBrowserWindow.xib in Resources */,\n\t\t\t\tC29CC7C11D76DD4500186B29 /* UsernameCredentialView.xib in Resources */,\n\t\t\t\tC29CC7D41D79CA6D00186B29 /* WelcomeWindow.xib in Resources */,\n\t\t\t\tC2986A7D1D6C811E005A2CD6 /* EncryptionKeyWindow.xib in Resources */,\n\t\t\t\tC2B7CAC01D11A0C900049C32 /* ConnectToServerWindow.xib in Resources */,\n\t\t\t\t2215F6361D0011CD005A46F7 /* RealmFileIcon.icns in Resources */,\n\t\t\t\tC277A6E71D7D990E00DED239 /* FacebookCredentialView.xib in Resources */,\n\t\t\t\t84E0F9601921F3B900D6CA14 /* Credits.rtf in Resources */,\n\t\t\t\t22DC87E81B9808790024BA34 /* RLMExportIndicatorWindowController.xib in Resources */,\n\t\t\t\t36B669CB1B8B057F00F04AE1 /* RLMObjectLinkSelectionViewController.xib in Resources */,\n\t\t\t\tC277A6EF1D7EC1AF00DED239 /* GoogleCredentialView.xib in Resources */,\n\t\t\t\tC29CC7C31D76DE0900186B29 /* CredentialsView.xib in Resources */,\n\t\t\t\tC2D302E61D7455B600E091DF /* LoginWindow.xib in Resources */,\n\t\t\t\tC2D302E81D7478AC00E091DF /* OpenSyncURLWindow.xib in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t84E0F96E1921F3B900D6CA14 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t84E0F97B1921F3B900D6CA14 /* InfoPlist.strings in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t0C91DB9FF41AFE33C1A2D3B5 /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-RealmBrowser-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t17F608046AD67CB7E4F89028 /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-RealmBrowser-RealmBrowserTests-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t23AE60F23DDCF9B53FC5CA2A /* [CP] Embed Pods Frameworks */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${SRCROOT}/Pods/Target Support Files/Pods-RealmBrowser/Pods-RealmBrowser-frameworks.sh\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/AppSandboxFileAccess/AppSandboxFileAccess.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/CSwiftV/CSwiftV.framework\",\n\t\t\t\t\"${PODS_ROOT}/HockeySDK-Mac/HockeySDK-Mac/HockeySDK.framework\",\n\t\t\t\t\"${PODS_ROOT}/HockeySDK-Mac/HockeySDK-Mac/HockeySDK.framework.dSYM\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/PathKit/PathKit.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/Realm/Realm.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/RealmConverter/RealmConverter.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/TGSpreadsheetWriter/TGSpreadsheetWriter.framework\",\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputPaths = (\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppSandboxFileAccess.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CSwiftV.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HockeySDK.framework\",\n\t\t\t\t\"${DWARF_DSYM_FOLDER_PATH}/HockeySDK.framework.dSYM\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PathKit.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmConverter.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSZipArchive.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TGSpreadsheetWriter.framework\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Target Support Files/Pods-RealmBrowser/Pods-RealmBrowser-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t6776AB2FA4A26847E0FE07D5 /* [CP] Embed Pods Frameworks */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${SRCROOT}/Pods/Target Support Files/Pods-RealmBrowser-RealmBrowserTests/Pods-RealmBrowser-RealmBrowserTests-frameworks.sh\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/AppSandboxFileAccess/AppSandboxFileAccess.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/CSwiftV/CSwiftV.framework\",\n\t\t\t\t\"${PODS_ROOT}/HockeySDK-Mac/HockeySDK-Mac/HockeySDK.framework\",\n\t\t\t\t\"${PODS_ROOT}/HockeySDK-Mac/HockeySDK-Mac/HockeySDK.framework.dSYM\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/PathKit/PathKit.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/Realm/Realm.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/RealmConverter/RealmConverter.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework\",\n\t\t\t\t\"${BUILT_PRODUCTS_DIR}/TGSpreadsheetWriter/TGSpreadsheetWriter.framework\",\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputPaths = (\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppSandboxFileAccess.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CSwiftV.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HockeySDK.framework\",\n\t\t\t\t\"${DWARF_DSYM_FOLDER_PATH}/HockeySDK.framework.dSYM\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PathKit.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmConverter.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSZipArchive.framework\",\n\t\t\t\t\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TGSpreadsheetWriter.framework\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Target Support Files/Pods-RealmBrowser-RealmBrowserTests/Pods-RealmBrowser-RealmBrowserTests-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tA733078B58459912617FD77E /* [CP] Copy Pods Resources */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${SRCROOT}/Pods/Target Support Files/Pods-RealmBrowser-RealmBrowserTests/Pods-RealmBrowser-RealmBrowserTests-resources.sh\",\n\t\t\t\t\"${PODS_ROOT}/HockeySDK-Mac/HockeySDK-Mac/HockeySDK.framework\",\n\t\t\t);\n\t\t\tname = \"[CP] Copy Pods Resources\";\n\t\t\toutputPaths = (\n\t\t\t\t\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/HockeySDK.framework\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Target Support Files/Pods-RealmBrowser-RealmBrowserTests/Pods-RealmBrowser-RealmBrowserTests-resources.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tB1C10875F4E36EA6AD8A048C /* [CP] Copy Pods Resources */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${SRCROOT}/Pods/Target Support Files/Pods-RealmBrowser/Pods-RealmBrowser-resources.sh\",\n\t\t\t\t\"${PODS_ROOT}/HockeySDK-Mac/HockeySDK-Mac/HockeySDK.framework\",\n\t\t\t);\n\t\t\tname = \"[CP] Copy Pods Resources\";\n\t\t\toutputPaths = (\n\t\t\t\t\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/HockeySDK.framework\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Target Support Files/Pods-RealmBrowser/Pods-RealmBrowser-resources.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t84E0F9481921F3B900D6CA14 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t22A55FEB19D18BA8009178BC /* RLMObjectNode.m in Sources */,\n\t\t\t\tC27E173A1D5CC0EF0095259A /* RLMSyncServerBrowserWindowController.m in Sources */,\n\t\t\t\tC2986A881D6C823D005A2CD6 /* RLMExportIndicatorWindowController.m in Sources */,\n\t\t\t\t840F97C0192B7DCE006B591E /* RLMDocument.m in Sources */,\n\t\t\t\t84AA41B01949CD7700A50F03 /* RLMArrayNode.m in Sources */,\n\t\t\t\t22E4737219924CF700EEF7C9 /* RLMBasicTableCellView.m in Sources */,\n\t\t\t\t22E473791992562400EEF7C9 /* RLMBoolTableCellView.m in Sources */,\n\t\t\t\t2234B66E1CF83F9600EAFDF0 /* RLMBrowserConstants.m in Sources */,\n\t\t\t\tC2986A8B1D6C8257005A2CD6 /* RLMOptionalBoolTableCellView.m in Sources */,\n\t\t\t\tC29CC7D21D79CA5800186B29 /* RLMWelcomeWindowController.m in Sources */,\n\t\t\t\t8474E2BD195452BE00BCA755 /* RLMInstanceTableViewController.m in Sources */,\n\t\t\t\tC29CC7B91D76D55D00186B29 /* RLMAccessTokenCredentialViewController.m in Sources */,\n\t\t\t\t84754ABE193CA4600093604E /* RLMRealmBrowserWindowController.m in Sources */,\n\t\t\t\tC2AA0F671D634FDA00D5D7E6 /* RLMConnectToServerWindowController.m in Sources */,\n\t\t\t\t225443F519E3E6360045996B /* RLMTableHeaderCell.m in Sources */,\n\t\t\t\t22D3AC8A19CC5D710042C1B2 /* RLMModelExporter.m in Sources */,\n\t\t\t\t84E0F95C1921F3B900D6CA14 /* main.m in Sources */,\n\t\t\t\t84925C61195AD5B000EE27B1 /* NSColor+ByteSizeFactory.m in Sources */,\n\t\t\t\tC29CC7C61D76DE9600186B29 /* RLMCredentialsViewController.m in Sources */,\n\t\t\t\tC2986A871D6C823D005A2CD6 /* RLMEncryptionKeyWindowController.m in Sources */,\n\t\t\t\tC2D302EB1D747BF600E091DF /* RLMSyncURLValueTransformer.m in Sources */,\n\t\t\t\tC2986A821D6C81C2005A2CD6 /* RLMUtils.m in Sources */,\n\t\t\t\t844C34E3194859080027E902 /* TestClasses.m in Sources */,\n\t\t\t\tC29CC7B61D76D4E300186B29 /* RLMCredentialViewController.m in Sources */,\n\t\t\t\tC27721DA1D92D6CA00DEBF75 /* RLMCloudKitCredentialViewController.m in Sources */,\n\t\t\t\tC2CA58F01DAE3B6B0052BAAA /* RLMApplicationDelegate+CrashReporting.m in Sources */,\n\t\t\t\t84E35A4D196B021B007F0344 /* RLMArrayNavigationState.m in Sources */,\n\t\t\t\tC2D302EE1D75A2E100E091DF /* RLMWindowController.m in Sources */,\n\t\t\t\tDD2F4D661E9DD1E5008EA2FB /* RLMKeychainInfo+RLMSyncCredentials.m in Sources */,\n\t\t\t\t84446534195891AA00CEEA5B /* RLMViewController.m in Sources */,\n\t\t\t\tC29CC7CA1D76F57F00186B29 /* NSView+RLMExtensions.m in Sources */,\n\t\t\t\t84D7990C19388E8900FC76A0 /* RLMClassProperty.m in Sources */,\n\t\t\t\t221322FD19954B0A00D25737 /* RLMTableCellView.m in Sources */,\n\t\t\t\t22096B2719911F7300233D77 /* RLMBadgeTableCellView.m in Sources */,\n\t\t\t\t228D1F871A1CAD660028562A /* RLMResultsNode.m in Sources */,\n\t\t\t\t8457294D1962E3860076D4F1 /* RLMTableView.m in Sources */,\n\t\t\t\t22A55FF119D19842009178BC /* RLMDescriptions.m in Sources */,\n\t\t\t\tC2AA0F631D634FBF00D5D7E6 /* RLMOpenSyncURLWindowController.m in Sources */,\n\t\t\t\t84E35A49196AD991007F0344 /* RLMNavigationStack.m in Sources */,\n\t\t\t\tC2D302E41D74528800E091DF /* RLMLoginWindowController.m in Sources */,\n\t\t\t\t36B669CE1B8B096A00F04AE1 /* RLMObjectLinkSelectionViewController.m in Sources */,\n\t\t\t\tC29CC7BC1D76D8C100186B29 /* RLMUsernameCredentialViewController.m in Sources */,\n\t\t\t\t84925C67195AE9AD00EE27B1 /* RLMSidebarTableCellView.m in Sources */,\n\t\t\t\t84D7990B19388E8900FC76A0 /* RLMClassNode.m in Sources */,\n\t\t\t\t84AA41A91949C99800A50F03 /* RLMTypeNode.m in Sources */,\n\t\t\t\t22D28EA71993AAAB00497FD3 /* RLMNumberTableCellView.m in Sources */,\n\t\t\t\t3615BDB6196FA8BF00E1AE3F /* RLMQueryNavigationState.m in Sources */,\n\t\t\t\tC2D302DC1D6DF63700E091DF /* RLMDocumentController.m in Sources */,\n\t\t\t\tC29CC7CD1D77097700186B29 /* RLMConnectionIndicatorWindowController.m in Sources */,\n\t\t\t\t84A34A4F192E19C5005D6CC4 /* RLMApplicationDelegate.m in Sources */,\n\t\t\t\tC26CC7A01DB6497900EE549D /* RLMSyncUtils.m in Sources */,\n\t\t\t\t8474E2B419544D8000BCA755 /* RLMTypeOutlineViewController.m in Sources */,\n\t\t\t\t2249D9B219A62EBD00A31104 /* RLMTableColumn.m in Sources */,\n\t\t\t\tDD2F4D631E9DCE10008EA2FB /* RLMKeychainInfo.m in Sources */,\n\t\t\t\tC277A6EA1D7D9A0100DED239 /* RLMFacebookCredentialViewController.m in Sources */,\n\t\t\t\t220D382819B639D700F79496 /* RLMTestDataGenerator.m in Sources */,\n\t\t\t\t84E35A42196A9F3B007F0344 /* RLMNavigationState.m in Sources */,\n\t\t\t\tC277A6ED1D7EC03B00DED239 /* RLMGoogleCredentialViewController.m in Sources */,\n\t\t\t\t84D7990D19388E8900FC76A0 /* RLMRealmNode.m in Sources */,\n\t\t\t\t22565D6719C1BCF400C8C8EC /* RLMLinkTableCellView.m in Sources */,\n\t\t\t\tDD70EFFF1E9D9FC00074C115 /* RLMKeychainStore.m in Sources */,\n\t\t\t\t221322FA19954AB100D25737 /* RLMImageTableCellView.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t84E0F96C1921F3B900D6CA14 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tE84EB8291A2FC38C00EB780E /* RLMTestObjects.m in Sources */,\n\t\t\t\t84E0F97D1921F3B900D6CA14 /* RealmBrowserTests.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\tE84EB8231A2FB94E00EB780E /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 84E0F94B1921F3B900D6CA14 /* RealmBrowser */;\n\t\t\ttargetProxy = E84EB8221A2FB94E00EB780E /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin PBXVariantGroup section */\n\t\t2257869F1BD564F40012436A /* EncryptionKeyWindow.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t225786A01BD564F40012436A /* Base */,\n\t\t\t);\n\t\t\tname = EncryptionKeyWindow.xib;\n\t\t\tpath = .;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F9581921F3B900D6CA14 /* InfoPlist.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F9591921F3B900D6CA14 /* en */,\n\t\t\t);\n\t\t\tname = InfoPlist.strings;\n\t\t\tpath = .;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F95E1921F3B900D6CA14 /* Credits.rtf */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F95F1921F3B900D6CA14 /* en */,\n\t\t\t);\n\t\t\tname = Credits.rtf;\n\t\t\tpath = .;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F9641921F3B900D6CA14 /* RLMDocument.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F9651921F3B900D6CA14 /* Base */,\n\t\t\t);\n\t\t\tname = RLMDocument.xib;\n\t\t\tpath = .;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F9671921F3B900D6CA14 /* MainMenu.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F9681921F3B900D6CA14 /* Base */,\n\t\t\t);\n\t\t\tname = MainMenu.xib;\n\t\t\tpath = .;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t84E0F9791921F3B900D6CA14 /* InfoPlist.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t84E0F97A1921F3B900D6CA14 /* en */,\n\t\t\t);\n\t\t\tname = InfoPlist.strings;\n\t\t\tpath = .;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t84E0F97E1921F3B900D6CA14 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"Mac Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_ENABLE_OBJC_EXCEPTIONS = YES;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = NO;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.9;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tOTHER_CODE_SIGN_FLAGS = \"--deep\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t84E0F97F1921F3B900D6CA14 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"3rd Party Mac Developer Application\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_ENABLE_OBJC_EXCEPTIONS = YES;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.9;\n\t\t\t\tOTHER_CODE_SIGN_FLAGS = \"--deep\";\n\t\t\t\tSDKROOT = macosx;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t84E0F9811921F3B900D6CA14 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 670A2070878A7FF5E2CFC52A /* Pods-RealmBrowser.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = \"RealmBrowser/Supporting Files/Realm Browser.entitlements\";\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = 97;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = \"RealmBrowser/Supporting Files/RealmBrowser-Prefix.pch\";\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = \"RealmBrowser/Supporting Files/RealmBrowser-Info.plist\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/../Frameworks\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.9;\n\t\t\t\tOTHER_CFLAGS = \"$(inherited)\";\n\t\t\t\tOTHER_CODE_SIGN_FLAGS = \"--deep\";\n\t\t\t\tOTHER_LDFLAGS = \"$(inherited)\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = io.realm.realmbrowser;\n\t\t\t\tPRODUCT_NAME = \"Realm Browser\";\n\t\t\t\tPROVISIONING_PROFILE = \"\";\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tWRAPPER_EXTENSION = app;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t84E0F9821921F3B900D6CA14 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 70C1960B2D4023A1B80EF2C1 /* Pods-RealmBrowser.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = \"RealmBrowser/Supporting Files/Realm Browser.entitlements\";\n\t\t\t\tCODE_SIGN_IDENTITY = \"-\";\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tCURRENT_PROJECT_VERSION = 97;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = \"RealmBrowser/Supporting Files/RealmBrowser-Prefix.pch\";\n\t\t\t\tHEADER_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = \"RealmBrowser/Supporting Files/RealmBrowser-Info.plist\";\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/../Frameworks\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.9;\n\t\t\t\tOTHER_CODE_SIGN_FLAGS = \"--deep\";\n\t\t\t\tOTHER_LDFLAGS = \"$(inherited)\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = io.realm.realmbrowser;\n\t\t\t\tPRODUCT_NAME = \"Realm Browser\";\n\t\t\t\tPROVISIONING_PROFILE = \"\";\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tWRAPPER_EXTENSION = app;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t84E0F9841921F3B900D6CA14 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 54C9661677C2C808E8DCF296 /* Pods-RealmBrowser-RealmBrowserTests.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(BUILT_PRODUCTS_DIR)/Realm Browser.app/Contents/MacOS/Realm Browser\";\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)\",\n\t\t\t\t);\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = \"\";\n\t\t\t\tINFOPLIST_FILE = \"RealmBrowserTests/Supporting Files/RealmBrowserTests-Info.plist\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"io.realm.${PRODUCT_NAME:rfc1034identifier}\";\n\t\t\t\tPRODUCT_NAME = RealmBrowserTests;\n\t\t\t\tTEST_HOST = \"$(BUNDLE_LOADER)\";\n\t\t\t\tWRAPPER_EXTENSION = xctest;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t84E0F9851921F3B900D6CA14 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = C686DBCA1CE3F34837DB465F /* Pods-RealmBrowser-RealmBrowserTests.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(BUILT_PRODUCTS_DIR)/Realm Browser.app/Contents/MacOS/Realm Browser\";\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(PROJECT_DIR)\",\n\t\t\t\t);\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = \"\";\n\t\t\t\tINFOPLIST_FILE = \"RealmBrowserTests/Supporting Files/RealmBrowserTests-Info.plist\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"io.realm.${PRODUCT_NAME:rfc1034identifier}\";\n\t\t\t\tPRODUCT_NAME = RealmBrowserTests;\n\t\t\t\tTEST_HOST = \"$(BUNDLE_LOADER)\";\n\t\t\t\tWRAPPER_EXTENSION = xctest;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t84E0F9471921F3B900D6CA14 /* Build configuration list for PBXProject \"RealmBrowser\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t84E0F97E1921F3B900D6CA14 /* Debug */,\n\t\t\t\t84E0F97F1921F3B900D6CA14 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t84E0F9801921F3B900D6CA14 /* Build configuration list for PBXNativeTarget \"RealmBrowser\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t84E0F9811921F3B900D6CA14 /* Debug */,\n\t\t\t\t84E0F9821921F3B900D6CA14 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t84E0F9831921F3B900D6CA14 /* Build configuration list for PBXNativeTarget \"RealmBrowserTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t84E0F9841921F3B900D6CA14 /* Debug */,\n\t\t\t\t84E0F9851921F3B900D6CA14 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 84E0F9441921F3B900D6CA14 /* Project object */;\n}\n"
  },
  {
    "path": "RealmBrowser.xcodeproj/xcshareddata/xcschemes/Realm Browser.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"0830\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"84E0F94B1921F3B900D6CA14\"\n               BuildableName = \"Realm Browser.app\"\n               BlueprintName = \"RealmBrowser\"\n               ReferencedContainer = \"container:RealmBrowser.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"\"\n      selectedLauncherIdentifier = \"Xcode.IDEFoundation.Launcher.PosixSpawn\"\n      shouldUseLaunchSchemeArgsEnv = \"NO\">\n      <Testables>\n         <TestableReference\n            skipped = \"NO\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"84E0F96F1921F3B900D6CA14\"\n               BuildableName = \"RealmBrowserTests.xctest\"\n               BlueprintName = \"RealmBrowserTests\"\n               ReferencedContainer = \"container:RealmBrowser.xcodeproj\">\n            </BuildableReference>\n         </TestableReference>\n      </Testables>\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"84E0F94B1921F3B900D6CA14\"\n            BuildableName = \"Realm Browser.app\"\n            BlueprintName = \"RealmBrowser\"\n            ReferencedContainer = \"container:RealmBrowser.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <EnvironmentVariables>\n         <EnvironmentVariable\n            key = \"TESTING\"\n            value = \"1\"\n            isEnabled = \"YES\">\n         </EnvironmentVariable>\n      </EnvironmentVariables>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"84E0F94B1921F3B900D6CA14\"\n            BuildableName = \"Realm Browser.app\"\n            BlueprintName = \"RealmBrowser\"\n            ReferencedContainer = \"container:RealmBrowser.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"84E0F94B1921F3B900D6CA14\"\n            BuildableName = \"Realm Browser.app\"\n            BlueprintName = \"RealmBrowser\"\n            ReferencedContainer = \"container:RealmBrowser.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMAccessTokenCredentialViewController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMCredentialViewController.h\"\n\n@interface RLMAccessTokenCredentialViewController : RLMCredentialViewController\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMAccessTokenCredentialViewController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMAccessTokenCredentialViewController.h\"\n#import \"RLMCredentialViewController+Private.h\"\n\n@interface RLMAccessTokenCredentialViewController ()\n\n@property (nonatomic, weak) IBOutlet NSTextField *tokenTextField;\n\n@end\n\n@implementation RLMAccessTokenCredentialViewController\n\n- (NSString *)title {\n    return @\"Access Token\";\n}\n\n- (NSArray *)textFieldsForCredentials {\n    return @[self.tokenTextField];\n}\n\n- (RLMSyncCredentials *)credentials {\n    NSString *token = self.tokenTextField.stringValue;\n\n    if (token.length > 0) {\n        // FIXME: remove after it's possible to pass nil identity to create credential\n        NSString *identity = [NSUUID UUID].UUIDString;\n\n        return [RLMSyncCredentials credentialsWithAccessToken:token identity:identity];\n    }\n\n    return nil;\n}\n\n- (void)setCredentials:(RLMSyncCredentials *)credentials {\n    self.tokenTextField.stringValue = credentials.token;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMCloudKitCredentialViewController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMCredentialViewController.h\"\n\n@interface RLMCloudKitCredentialViewController : RLMCredentialViewController\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMCloudKitCredentialViewController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMCloudKitCredentialViewController.h\"\n#import \"RLMCredentialViewController+Private.h\"\n\n@interface RLMCloudKitCredentialViewController ()\n\n@property (nonatomic, weak) IBOutlet NSTextField *tokenTextField;\n\n@end\n\n@implementation RLMCloudKitCredentialViewController\n\n- (NSString *)title {\n    return @\"CloudKit\";\n}\n\n- (NSArray *)textFieldsForCredentials {\n    return @[self.tokenTextField];\n}\n\n- (RLMSyncCredentials *)credentials {\n    NSString *token = self.tokenTextField.stringValue;\n\n    if (token.length > 0) {\n        return [[RLMSyncCredentials alloc] initWithCustomToken:token provider:RLMIdentityProviderCloudKit userInfo:nil];\n    }\n\n    return nil;\n}\n\n- (void)setCredentials:(RLMSyncCredentials *)credentials {\n    self.tokenTextField.stringValue = credentials.token;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMConnectToServerWindowController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Realm;\n#import \"RLMWindowController.h\"\n\n@interface RLMConnectToServerWindowController : RLMWindowController\n\n@property (nonatomic, copy) NSURL *serverURL;\n@property (nonatomic, strong, readonly) RLMSyncCredentials *credentials;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMConnectToServerWindowController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMBrowserConstants.h\"\n#import \"RLMConnectToServerWindowController.h\"\n#import \"RLMCredentialsViewController.h\"\n#import \"NSView+RLMExtensions.h\"\n\n#import \"RLMKeychainStore.h\"\n#import \"RLMKeychainInfo.h\"\n#import \"RLMKeychainInfo+RLMSyncCredentials.h\"\n\nstatic NSString * const serverURLKey = @\"ServerURL\";\nstatic NSString * const adminAccessTokenKey = @\"AdminAccessToken\";\n\nNSString * const RLMConnectToServerWindowControllerErrorDomain = @\"io.realm.realmbrowser.sync-connect-to-server-window\";\n\n@interface RLMConnectToServerWindowController ()<RLMCredentialsViewControllerDelegate>\n\n@property (nonatomic, weak) IBOutlet NSTextField *serverURLTextField;\n@property (nonatomic, weak) IBOutlet NSView *credentialsContainerView;\n@property (nonatomic, weak) IBOutlet NSButton *saveCredentialsCheckBox;\n@property (nonatomic, weak) IBOutlet NSButton *connectButton;\n\n@property (nonatomic, readonly) BOOL shouldSaveCredentials;\n@property (nonatomic, strong) RLMKeychainStore *keychainStore;\n@property (nonatomic, strong) RLMCredentialsViewController *credentialsViewController;\n\n@end\n\n@implementation RLMConnectToServerWindowController\n\n- (void)windowDidLoad {\n    [super windowDidLoad];\n    \n    self.credentialsViewController = [[RLMCredentialsViewController alloc] init];\n    self.credentialsViewController.delegate = self;\n\n    [self.credentialsContainerView addContentSubview:self.credentialsViewController.view];\n    \n    if (self.serverURL == nil && self.credentials == nil) {\n        [self loadRecentCredentials];\n    }\n}\n\n- (BOOL)validateCredentials:(NSError *__autoreleasing *)error {\n    __autoreleasing NSError *localError;\n    if (error == nil) {\n        error = &localError;\n    }\n\n    if (!(([self.serverURL.scheme isEqualToString:kRealmURLScheme] || [self.serverURL.scheme isEqualToString:kSecureRealmURLScheme]) && self.serverURL.host.length > 0 && self.serverURL.path.length < 2)) {\n        *error = [self errorWithCode:0 description:@\"Invalid Object Server URL\" recoverySuggestion:@\"Provide a valid URL in format:\\n'realm://HOST_NAME:PORT_NUMBER'.\"];\n        return NO;\n    }\n\n    return self.credentials != nil;\n}\n\n- (void)setServerURL:(NSURL *)url {\n    if ([url isEqualTo:self.serverURL]) {\n        return;\n    }\n\n    _serverURL = [url copy];\n\n    [self loadKeychainCredentials];\n    [self updateUI];\n}\n\n- (RLMSyncCredentials *)credentials {\n    return self.credentialsViewController.credentials;\n}\n\n- (void)setCredentials:(RLMSyncCredentials *)credentials {\n    self.credentialsViewController.credentials = credentials;\n\n    [self updateUI];\n}\n\n- (void)updateUI {\n    self.connectButton.enabled = self.serverURL && self.credentials;\n}\n\n#pragma mark - RLMCredentialsViewControllerDelegate\n\n- (BOOL)credentialsViewController:(RLMCredentialsViewController *)controller shoudShowCredentialsViewForIdentityProvider:(RLMIdentityProvider)provider {\n    return provider == RLMIdentityProviderAccessToken || provider == RLMIdentityProviderUsernamePassword;\n}\n\n- (NSString *)credentialsViewController:(RLMCredentialsViewController *)controller labelForIdentityProvider:(RLMIdentityProvider)provider {\n    if (provider == RLMIdentityProviderAccessToken) {\n        return @\"Admin Access Token\";\n    } else if (provider == RLMIdentityProviderUsernamePassword) {\n        return @\"Admin Username\";\n    }\n\n    return nil;\n}\n\n- (void)credentialsViewControllerDidChangeCredentials:(RLMCredentialsViewController *)controller {\n    [self updateUI];\n}\n\n#pragma mark - Actions\n\n- (IBAction)connect:(id)sender {\n    NSError *error = nil;\n\n    if (![self validateCredentials:&error]) {\n        [NSApp presentError:error modalForWindow:self.window delegate:nil didPresentSelector:nil contextInfo:nil];\n        return;\n    }\n\n    [self saveRecentCredentials];\n    [self closeWithReturnCode:NSModalResponseOK];\n}\n\n- (IBAction)cancel:(id)sender {\n    [self closeWithReturnCode:NSModalResponseCancel];\n}\n\n#pragma mark - Private\n\n- (BOOL)shouldSaveCredentials\n{\n    return self.saveCredentialsCheckBox.state == NSOnState;\n}\n\n- (RLMKeychainStore *)keychainStore\n{\n    if (!_keychainStore) _keychainStore = [RLMKeychainStore new];\n    \n    return _keychainStore;\n}\n\n- (void)loadRecentCredentials {\n    self.serverURL = [[NSUserDefaults standardUserDefaults] URLForKey:serverURLKey];\n    \n    [self loadKeychainCredentials];\n}\n\n- (void)loadKeychainCredentials {\n    RLMKeychainInfo *info = [self.keychainStore savedCredentialsForServer:self.serverURL];\n    RLMSyncCredentials *savedCredentials = info.credentials;\n    \n    self.credentials = savedCredentials;\n}\n\n- (void)saveRecentCredentials {\n    if (!self.serverURL) {\n        return;\n    }\n\n    [[NSUserDefaults standardUserDefaults] setURL:self.serverURL forKey:serverURLKey];\n    \n    if (!self.shouldSaveCredentials) return;\n    \n    [self.keychainStore saveCredentials:self.credentials forServer:self.serverURL];\n}\n\n- (NSError *)errorWithCode:(NSInteger)code description:(NSString *)description recoverySuggestion:(NSString *)recoverySuggestion {\n    NSDictionary *userInfo = @{\n        NSLocalizedDescriptionKey: description,\n        NSLocalizedRecoverySuggestionErrorKey: recoverySuggestion\n    };\n\n    return [NSError errorWithDomain:RLMConnectToServerWindowControllerErrorDomain code:code userInfo:userInfo];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMConnectionIndicatorWindowController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMWindowController.h\"\n\n@interface RLMConnectionIndicatorWindowController : RLMWindowController\n\n@property (nonatomic, copy) NSString *message;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMConnectionIndicatorWindowController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMConnectionIndicatorWindowController.h\"\n\n@interface RLMConnectionIndicatorWindowController ()\n\n@property (nonatomic, weak) IBOutlet NSTextField *messageLabel;\n@property (nonatomic, weak) IBOutlet NSProgressIndicator *progressIndicator;\n\n@end\n\n@implementation RLMConnectionIndicatorWindowController\n\n- (void)showWindow:(id)sender {\n    [super showWindow:sender];\n\n    [self.progressIndicator startAnimation:nil];\n}\n\n- (NSString *)message {\n    return self.messageLabel.stringValue;\n}\n\n- (void)setMessage:(NSString *)message {\n    self.messageLabel.stringValue = message;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMCredentialViewController+Private.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@interface RLMCredentialViewController ()<NSTextFieldDelegate>\n\n+ (NSString *)defaultNibName;\n\n- (NSArray *)textFieldsForCredentials;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMCredentialViewController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n@import Realm;\n\n@interface RLMCredentialViewController : NSViewController\n\n@property (nonatomic, strong) RLMSyncCredentials *credentials;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMCredentialViewController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMCredentialViewController.h\"\n#import \"RLMCredentialViewController+Private.h\"\n\nstatic NSString * const RLMCredentialViewControllerClassPrefix = @\"RLM\";\nstatic NSString * const RLMCredentialViewControllerClassSyffix = @\"Controller\";\n\n@implementation RLMCredentialViewController\n\n+ (NSString *)defaultNibName {\n    NSString* nibName = NSStringFromClass(self);\n\n    if ([nibName hasPrefix:RLMCredentialViewControllerClassPrefix]) {\n        nibName = [nibName substringFromIndex:RLMCredentialViewControllerClassPrefix.length];\n    }\n\n    if ([nibName hasSuffix:RLMCredentialViewControllerClassSyffix]) {\n        nibName = [nibName substringToIndex:nibName.length - RLMCredentialViewControllerClassSyffix.length];\n    }\n\n    return nibName;\n}\n\n- (instancetype)init {\n    return [self initWithNibName:[self.class defaultNibName] bundle:nil];\n}\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n\n    for (NSTextField *textField in [self textFieldsForCredentials]) {\n        textField.delegate = self;\n    }\n}\n\n- (NSArray *)textFieldsForCredentials {\n    return nil;\n}\n\n#pragma mark - NSTextFieldDelegate\n\n- (void)controlTextDidChange:(NSNotification *)obj {\n    // Trigger KVO notification for credential\n    [self willChangeValueForKey:@\"credentials\"];\n    [self didChangeValueForKey:@\"credentials\"];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMCredentialsViewController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n@import Realm;\n\nextern RLMIdentityProvider const RLMIdentityProviderAccessToken;\n\n@class RLMCredentialsViewController;\n\n@protocol RLMCredentialsViewControllerDelegate<NSObject>\n@optional\n- (BOOL)credentialsViewController:(RLMCredentialsViewController *)controller shoudShowCredentialsViewForIdentityProvider:(RLMIdentityProvider)provider;\n- (NSString *)credentialsViewController:(RLMCredentialsViewController *)controller labelForIdentityProvider:(RLMIdentityProvider)provider;\n- (void)credentialsViewControllerDidChangeCredentials:(RLMCredentialsViewController *)controller;\n\n@end\n\n@interface RLMCredentialsViewController : NSViewController\n\n@property (nonatomic, weak) id<RLMCredentialsViewControllerDelegate> delegate;\n@property (nonatomic, strong) RLMSyncCredentials *credentials;\n\n- (void)reloadCredentialViews;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMCredentialsViewController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMCredentialsViewController.h\"\n\n#import \"RLMUsernameCredentialViewController.h\"\n#import \"RLMFacebookCredentialViewController.h\"\n#import \"RLMGoogleCredentialViewController.h\"\n#import \"RLMCloudKitCredentialViewController.h\"\n#import \"RLMAccessTokenCredentialViewController.h\"\n\nRLMIdentityProvider const RLMIdentityProviderAccessToken = @\"_access_token\";\n\n@interface RLMCredentialsViewController ()<NSTabViewDelegate>\n\n@property (nonatomic, weak) IBOutlet NSTabView *tabView;\n\n@end\n\n@implementation RLMCredentialsViewController\n\n+ (NSArray *)supportedIdentityProviders {\n    return @[\n        RLMIdentityProviderUsernamePassword,\n        RLMIdentityProviderFacebook,\n        RLMIdentityProviderGoogle,\n        RLMIdentityProviderCloudKit,\n        RLMIdentityProviderAccessToken\n    ];\n}\n\n+ (Class)credentialViewControllerClassForIdentityProvider:(RLMIdentityProvider)provider {\n    NSDictionary *classByProvider = @{\n        RLMIdentityProviderUsernamePassword: [RLMUsernameCredentialViewController class],\n        RLMIdentityProviderFacebook: [RLMFacebookCredentialViewController class],\n        RLMIdentityProviderGoogle: [RLMGoogleCredentialViewController class],\n        RLMIdentityProviderCloudKit: [RLMCloudKitCredentialViewController class],\n        RLMIdentityProviderAccessToken: [RLMAccessTokenCredentialViewController class],\n    };\n\n    return classByProvider[provider];\n}\n\n- (instancetype)init {\n    return [super initWithNibName:@\"CredentialsView\" bundle:nil];\n}\n\n- (void)dealloc {\n    [self.selectedCredentialViewController removeObserver:self forKeyPath:@\"credentials\"];\n}\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    self.tabView.delegate = self;\n    [self reloadCredentialViews];\n}\n\n- (void)reloadCredentialViews {\n    for (NSTabViewItem *item in self.tabView.tabViewItems) {\n        [self.tabView removeTabViewItem:item];\n    }\n\n    for (RLMIdentityProvider provider in [self.class supportedIdentityProviders]) {\n        if ([self.delegate respondsToSelector:@selector(credentialsViewController:shoudShowCredentialsViewForIdentityProvider:)]) {\n            if (![self.delegate credentialsViewController:self shoudShowCredentialsViewForIdentityProvider:provider]) {\n                continue;\n            }\n        }\n\n        Class viewControllerClass = [self.class credentialViewControllerClassForIdentityProvider:provider];\n\n        RLMCredentialViewController *credentialController = [[viewControllerClass alloc] init];\n\n        NSTabViewItem *item = [NSTabViewItem tabViewItemWithViewController:credentialController];\n        item.identifier = provider;\n\n        if ([self.delegate respondsToSelector:@selector(credentialsViewController:labelForIdentityProvider:)]) {\n            item.label = [self.delegate credentialsViewController:self labelForIdentityProvider:provider] ?: item.label;\n        }\n\n        [self.tabView addTabViewItem:item];\n    }\n}\n\n- (RLMSyncCredentials *)credentials {\n    return self.selectedCredentialViewController.credentials;\n}\n\n- (void)setCredentials:(RLMSyncCredentials *)credentials {\n    if (![[self.class supportedIdentityProviders] containsObject:credentials.provider]) {\n        return;\n    }\n\n    // Force load view if it's not loaded yet\n    [self view];\n\n    [self.tabView selectTabViewItemWithIdentifier:credentials.provider];\n    [self.view layoutSubtreeIfNeeded];\n\n    self.selectedCredentialViewController.credentials = credentials;\n}\n\n- (RLMCredentialViewController *)selectedCredentialViewController {\n    return (RLMCredentialViewController *)self.tabView.selectedTabViewItem.viewController;\n}\n\n#pragma mark - NSTabViewDelegate\n\n- (void)tabView:(NSTabView *)tabView willSelectTabViewItem:(NSTabViewItem *)tabViewItem {\n    [self.selectedCredentialViewController removeObserver:self forKeyPath:@\"credentials\"];\n}\n\n- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem {\n    [self.selectedCredentialViewController addObserver:self forKeyPath:@\"credentials\" options:NSKeyValueObservingOptionInitial context:nil];\n}\n\n#pragma make - KVO\n\n- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context {\n    if (object == self.selectedCredentialViewController) {\n        if ([self.delegate respondsToSelector:@selector(credentialsViewControllerDidChangeCredentials:)]) {\n            [self.delegate credentialsViewControllerDidChangeCredentials:self];\n        }\n    } else {\n        [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];\n    }\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMFacebookCredentialViewController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMCredentialViewController.h\"\n\n@interface RLMFacebookCredentialViewController : RLMCredentialViewController\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMFacebookCredentialViewController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMFacebookCredentialViewController.h\"\n#import \"RLMCredentialViewController+Private.h\"\n\n@interface RLMFacebookCredentialViewController ()\n\n@property (nonatomic, weak) IBOutlet NSTextField *tokenTextField;\n\n@end\n\n@implementation RLMFacebookCredentialViewController\n\n- (NSString *)title {\n    return @\"Facebook\";\n}\n\n- (NSArray *)textFieldsForCredentials {\n    return @[self.tokenTextField];\n}\n\n- (RLMSyncCredentials *)credentials {\n    NSString *token = self.tokenTextField.stringValue;\n\n    if (token.length > 0) {\n        return [RLMSyncCredentials credentialsWithFacebookToken:token];\n    }\n\n    return nil;\n}\n\n- (void)setCredentials:(RLMSyncCredentials *)credentials {\n    self.tokenTextField.stringValue = credentials.token;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMGoogleCredentialViewController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMCredentialViewController.h\"\n\n@interface RLMGoogleCredentialViewController : RLMCredentialViewController\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMGoogleCredentialViewController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMGoogleCredentialViewController.h\"\n#import \"RLMCredentialViewController+Private.h\"\n\n@interface RLMGoogleCredentialViewController ()\n\n@property (nonatomic, weak) IBOutlet NSTextField *tokenTextField;\n\n@end\n\n@implementation RLMGoogleCredentialViewController\n\n- (NSString *)title {\n    return @\"Google\";\n}\n\n- (NSArray *)textFieldsForCredentials {\n    return @[self.tokenTextField];\n}\n\n- (RLMSyncCredentials *)credentials {\n    NSString *token = self.tokenTextField.stringValue;\n\n    if (token.length > 0) {\n        return [[RLMSyncCredentials alloc] initWithCustomToken:token provider:RLMIdentityProviderGoogle userInfo:nil];\n    }\n\n    return nil;\n}\n\n- (void)setCredentials:(RLMSyncCredentials *)credentials {\n    self.tokenTextField.stringValue = credentials.token;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMLoginWindowController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Realm;\n\n#import \"RLMWindowController.h\"\n\n@interface RLMLoginWindowController : RLMWindowController\n\n@property (nonatomic, copy) NSString *message;\n@property (nonatomic, strong) RLMSyncCredentials *credentials;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMLoginWindowController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMLoginWindowController.h\"\n#import \"RLMCredentialsViewController.h\"\n#import \"NSView+RLMExtensions.h\"\n\n@interface RLMLoginWindowController ()<RLMCredentialsViewControllerDelegate>\n\n@property (nonatomic, weak) IBOutlet NSTextField *messageLabel;\n@property (nonatomic, weak) IBOutlet NSView *credentialsContainerView;\n@property (nonatomic, weak) IBOutlet NSButton *okButton;\n\n@property (nonatomic, strong) RLMCredentialsViewController *credentialsViewController;\n\n@end\n\n@implementation RLMLoginWindowController\n\n- (instancetype)init {\n    self = [super init];\n\n    if (self != nil) {\n        self.credentialsViewController = [[RLMCredentialsViewController alloc] init];\n        self.credentialsViewController.delegate = self;\n    }\n\n    return self;\n}\n\n- (void)windowDidLoad {\n    [super windowDidLoad];\n\n    [self.credentialsContainerView addContentSubview:self.credentialsViewController.view];\n\n    [self updateUI];\n}\n\n- (void)updateUI {\n    self.okButton.enabled = self.credentials != nil;\n}\n\n- (NSString *)message {\n    return self.messageLabel.stringValue;\n}\n\n- (void)setMessage:(NSString *)message {\n    self.messageLabel.stringValue = message;\n}\n\n- (RLMSyncCredentials *)credentials {\n    return self.credentialsViewController.credentials;\n}\n\n- (void)setCredentials:(RLMSyncCredentials *)credentials {\n    self.credentialsViewController.credentials = credentials;\n\n    [self updateUI];\n}\n\n- (IBAction)ok:(id)sender {\n    if (self.credentials != nil) {\n        [self closeWithReturnCode:NSModalResponseOK];\n    }\n}\n\n- (IBAction)cancel:(id)sender {\n    [self closeWithReturnCode:NSModalResponseCancel];\n}\n\n#pragma mark - RLMCredentialsViewControllerDelegate\n\n- (void)credentialsViewControllerDidChangeCredentials:(RLMCredentialsViewController *)controller {\n    [self updateUI];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMOpenSyncURLWindowController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Realm;\n\n#import \"RLMWindowController.h\"\n\n@interface RLMOpenSyncURLWindowController : RLMWindowController\n\n@property (nonatomic, copy) NSURL *url;\n@property (nonatomic, strong, readonly) RLMSyncCredentials *credentials;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMOpenSyncURLWindowController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMOpenSyncURLWindowController.h\"\n#import \"RLMCredentialsViewController.h\"\n#import \"NSView+RLMExtensions.h\"\n#import \"RLMBrowserConstants.h\"\n\nstatic NSString * const urlKey = @\"URL\";\n\nNSString * const RLMOpenSyncURLWindowControllerErrorDomain = @\"io.realm.realmbrowser.sync-open-sync-url-window\";\n\n@interface RLMOpenSyncURLWindowController ()<RLMCredentialsViewControllerDelegate>\n\n@property (nonatomic, weak) IBOutlet NSTextField *urlTextField;\n@property (nonatomic, weak) IBOutlet NSView *credentialsContainerView;\n\n@property (nonatomic, weak) IBOutlet NSButton *openButton;\n\n@property (nonatomic, strong) RLMCredentialsViewController *credentialsViewController;\n\n@end\n\n@implementation RLMOpenSyncURLWindowController\n\n- (void)windowDidLoad {\n    [super windowDidLoad];\n\n    if (self.url == nil) {\n        [self loadRecentURL];\n    }\n\n    self.credentialsViewController = [[RLMCredentialsViewController alloc] init];\n    self.credentialsViewController.delegate = self;\n\n    [self.credentialsContainerView addContentSubview:self.credentialsViewController.view];\n}\n\n- (BOOL)validateCredentials:(NSError *__autoreleasing *)error {\n    __autoreleasing NSError *localError;\n    if (error == nil) {\n        error = &localError;\n    }\n\n    if (!(([self.url.scheme isEqualToString:kRealmURLScheme] || [self.url.scheme isEqualToString:kSecureRealmURLScheme]) && self.url.host.length > 0 && self.url.path.length > 1)) {\n        *error = [self errorWithCode:0 description:@\"Invalid Object Server URL\" recoverySuggestion:@\"Provide a valid URL\"];\n        return NO;\n    }\n\n    return self.credentials != nil;\n}\n\n- (void)setUrl:(NSURL *)url {\n    if ([url isEqualTo:self.url]) {\n        return;\n    }\n\n    _url = [url copy];\n\n    [self updateUI];\n}\n\n- (RLMSyncCredentials *)credentials {\n    return self.credentialsViewController.credentials;\n}\n\n- (void)updateUI {\n    self.openButton.enabled = [self validateCredentials:nil];\n}\n\n#pragma mark - Actions\n\n- (IBAction)open:(id)sender {\n    [self seaveRecentURL];\n    [self closeWithReturnCode:NSModalResponseOK];\n}\n\n- (IBAction)cancel:(id)sender {\n    [self closeWithReturnCode:NSModalResponseCancel];\n}\n\n#pragma mark - RLMCredentialsViewControllerDelegate\n\n- (void)credentialsViewControllerDidChangeCredentials:(RLMCredentialsViewController *)controller {\n    [self updateUI];\n}\n\n#pragma mark - Private\n\n- (void)loadRecentURL {\n    self.url = [[NSUserDefaults standardUserDefaults] URLForKey:urlKey];\n}\n\n- (void)seaveRecentURL {\n    [[NSUserDefaults standardUserDefaults] setURL:self.url forKey:urlKey];\n}\n\n- (NSError *)errorWithCode:(NSInteger)code description:(NSString *)description recoverySuggestion:(NSString *)recoverySuggestion {\n    NSDictionary *userInfo = @{\n        NSLocalizedDescriptionKey: description,\n        NSLocalizedRecoverySuggestionErrorKey: recoverySuggestion\n    };\n\n    return [NSError errorWithDomain:RLMOpenSyncURLWindowControllerErrorDomain code:code userInfo:userInfo];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMSyncServerBrowserWindowController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Realm;\n\n#import \"RLMWindowController.h\"\n\n@interface RLMSyncServerBrowserWindowController : RLMWindowController\n\n@property (nonatomic, copy) void (^onSelectURL)(NSURL *);\n@property (nonatomic, readonly) NSURL *selectedURL;\n\n- (instancetype)initWithServerURL:(NSURL *)serverURL user:(RLMSyncUser *)user;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMSyncServerBrowserWindowController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Realm.Dynamic;\n@import Realm.Private;\n\n#import \"RLMSyncServerBrowserWindowController.h\"\n\nstatic NSString * const RLMAdminRealmServerPath = @\"__admin\";\nstatic NSString * const RLMAdminRealmRealmFileClassName = @\"RealmFile\";\nstatic NSString * const RLMAdminRealmRealmFilesDefaultPredicate = @\"(path != '/__admin') AND \\\n                                                                     NOT (path ENDSWITH '__permission') AND \\\n                                                                     NOT (path ENDSWITH '__management')\";\n\n@interface RLMSyncServerBrowserWindowController ()<NSSearchFieldDelegate, NSTableViewDataSource, NSTableViewDelegate>\n\n@property (nonatomic, weak) IBOutlet NSTextField *titleLabel;\n@property (nonatomic, weak) IBOutlet NSSearchField *searchField;\n@property (nonatomic, weak) IBOutlet NSProgressIndicator *progressIndicator;\n@property (nonatomic, weak) IBOutlet NSTableView *tableView;\n\n@property (nonatomic, strong) NSURL *serverURL;\n@property (nonatomic, strong) RLMSyncUser *user;\n@property (nonatomic, strong) RLMNotificationToken *notificationToken;\n\n@property (nonatomic, strong) RLMResults *serverRealmFiles;\n@property (nonatomic, strong) RLMResults *filteredServerRealmFiles;\n@property (nonatomic, strong) NSURL *selectedURL;\n\n@end\n\n@implementation RLMSyncServerBrowserWindowController\n\n- (instancetype)initWithServerURL:(NSURL *)serverURL user:(RLMSyncUser *)user {\n    self = [super init];\n\n    if (self != nil) {\n        self.serverURL = serverURL;\n        self.user = user;\n    }\n\n    return self;\n}\n\n- (void)dealloc {\n    [self.notificationToken invalidate];\n}\n\n- (void)windowDidLoad {\n    [super windowDidLoad];\n\n    if ([self.window respondsToSelector:@selector(titleVisibility)]) {\n        self.window.titleVisibility = NSWindowTitleHidden;\n    }\n\n    self.titleLabel.stringValue = self.serverURL.absoluteString;\n    self.tableView.target = self;\n    self.tableView.doubleAction = @selector(tableViewDoubleAction:);\n    self.tableView.hidden = YES;\n    self.searchField.enabled = NO;\n}\n\n- (void)showWindow:(id)sender {\n    [super showWindow:sender];\n\n    NSURL *adminRealmURL = [self.serverURL URLByAppendingPathComponent:RLMAdminRealmServerPath];\n\n    RLMRealmConfiguration *configuration = [[RLMRealmConfiguration alloc] init];\n    configuration.dynamic = YES;\n    configuration.syncConfiguration = [[RLMSyncConfiguration alloc] initWithUser:self.user realmURL:adminRealmURL];\n    configuration.syncConfiguration.enableSSLValidation = NO;\n\n    __weak typeof(self) weakSelf = self;\n    [RLMRealm asyncOpenWithConfiguration:configuration callbackQueue:dispatch_get_main_queue() callback:^(RLMRealm *realm, NSError *error) {\n        if (!weakSelf || !weakSelf.window.isVisible) {\n            // A window has been closed before realm is loaded\n            return;\n        } else if (error) {\n            [[NSAlert alertWithError:error] beginSheetModalForWindow:weakSelf.window completionHandler:^(NSModalResponse returnCode) {\n                [weakSelf close];\n            }];\n        } else {\n            [weakSelf didOpenAdminRealm:realm];\n        }\n    }];\n\n    [self.progressIndicator startAnimation:nil];\n}\n\n- (void)didOpenAdminRealm:(RLMRealm *)realm {\n    self.serverRealmFiles = [realm objects:RLMAdminRealmRealmFileClassName where:RLMAdminRealmRealmFilesDefaultPredicate];\n    self.filteredServerRealmFiles = self.serverRealmFiles;\n\n    __weak typeof(self) weekSelf = self;\n    self.notificationToken = [self.serverRealmFiles addNotificationBlock:^(RLMResults *results, RLMCollectionChange *change, NSError *error) {\n        [weekSelf.tableView reloadData];\n    }];\n\n    [self.progressIndicator removeFromSuperview];\n    self.tableView.hidden = NO;\n    self.searchField.enabled = YES;\n}\n\n#pragma mark - Actions\n\n- (void)tableViewDoubleAction:(id)sender {\n    if (self.tableView.clickedRow == self.tableView.selectedRow) {\n        if (self.onSelectURL) {\n            self.onSelectURL(self.selectedURL);\n        }\n    }\n}\n\n- (void)keyDown:(NSEvent *)event {\n    unichar key = [event.charactersIgnoringModifiers characterAtIndex:0];\n\n    if (key == NSCarriageReturnCharacter) {\n        if (self.onSelectURL) {\n            self.onSelectURL(self.selectedURL);\n        }\n    } else {\n        [super keyDown:event];\n    }\n}\n\n- (void)cancel:(id)sender {\n    [self closeWithReturnCode:NSModalResponseCancel];\n}\n\n#pragma mark - NSSearchFieldDelegate\n\n- (void)controlTextDidChange:(NSNotification *)obj {\n    self.filteredServerRealmFiles = [self.serverRealmFiles objectsWhere:@\"path CONTAINS %@\", self.searchField.stringValue];\n    [self.tableView reloadData];\n}\n\n- (void)searchFieldDidEndSearching:(NSSearchField *)sender {\n    self.filteredServerRealmFiles = self.serverRealmFiles;\n    [self.tableView reloadData];\n}\n\n#pragma mark - NSTableViewDataSource\n\n- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView {\n    return self.filteredServerRealmFiles.count;\n}\n\n#pragma mark - NSTableViewDelegate\n\n- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {\n    NSTableCellView *cellView = [tableView makeViewWithIdentifier:@\"PathCell\" owner:self];\n\n    cellView.textField.stringValue = self.filteredServerRealmFiles[row][@\"path\"];\n\n    return cellView;\n}\n\n- (void)tableViewSelectionDidChange:(NSNotification *)notification {\n    if (self.tableView.selectedRow >= 0) {\n        NSString *realmPath = [self.filteredServerRealmFiles[self.tableView.selectedRow] valueForKey:@\"path\"];\n        self.selectedURL = [[NSURL alloc] initWithString:realmPath relativeToURL:self.serverURL];\n    } else {\n        self.selectedURL = nil;\n    }\n}\n\n@end\n\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMUsernameCredentialViewController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMCredentialViewController.h\"\n\n@interface RLMUsernameCredentialViewController : RLMCredentialViewController\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMUsernameCredentialViewController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMUsernameCredentialViewController.h\"\n#import \"RLMCredentialViewController+Private.h\"\n\nextern NSString *const kRLMSyncPasswordKey;\n\n@interface RLMUsernameCredentialViewController ()\n\n@property (nonatomic, weak) IBOutlet NSTextField *usernameTextField;\n@property (nonatomic, weak) IBOutlet NSTextField *passwordTextField;\n\n@end\n\n@implementation RLMUsernameCredentialViewController\n\n- (NSString *)title {\n    return @\"Username\";\n}\n\n- (NSArray *)textFieldsForCredentials {\n    return @[self.usernameTextField, self.passwordTextField];\n}\n\n- (RLMSyncCredentials *)credentials {\n    NSString *username = self.usernameTextField.stringValue;\n    NSString *password = self.passwordTextField.stringValue;\n\n    if (username.length > 0 && password.length > 0) {\n        return [RLMSyncCredentials credentialsWithUsername:username password:password register:NO];\n    }\n\n    return nil;\n}\n\n- (void)setCredentials:(RLMSyncCredentials *)credentials {\n    self.usernameTextField.stringValue = credentials.token;\n    \n    NSString *password = [credentials.userInfo objectForKey:kRLMSyncPasswordKey];\n    if (password) self.passwordTextField.stringValue = password;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMWelcomeWindowController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMWindowController.h\"\n\n@interface RLMWelcomeWindowController : RLMWindowController\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Controllers/RLMWelcomeWindowController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMWelcomeWindowController.h\"\n#import \"RLMApplicationDelegate.h\"\n\n@interface RLMWelcomeWindowController ()\n\n@property (nonatomic, weak) IBOutlet NSTextField *versionLabel;\n\n@end\n\n@implementation RLMWelcomeWindowController\n\n- (void)windowDidLoad {\n    [super windowDidLoad];\n\n    self.window.backgroundColor = [NSColor whiteColor];\n    self.window.titlebarAppearsTransparent = YES;\n    self.window.movableByWindowBackground = YES;\n\n    [[self.window standardWindowButton:NSWindowMiniaturizeButton] setHidden:YES];\n    [[self.window standardWindowButton:NSWindowZoomButton] setHidden:YES];\n\n    self.versionLabel.stringValue = [[NSBundle mainBundle] objectForInfoDictionaryKey:@\"CFBundleShortVersionString\"];\n}\n\n- (IBAction)openRealmFile:(id)sender {\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [[NSDocumentController sharedDocumentController] openDocument:sender];\n    });\n\n    [self close];\n}\n\n- (IBAction)openRealmURL:(id)sender {\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [(RLMApplicationDelegate *)NSApp.delegate openSyncURL:sender];\n    });\n\n    [self close];\n}\n\n- (IBAction)connecToServer:(id)sender {\n    [self close];\n\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [(RLMApplicationDelegate *)NSApp.delegate connectToSyncServer:sender];\n    });\n}\n\n- (void)cancel:(id)sender {\n    [self close];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/NSView+RLMExtensions.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import <Cocoa/Cocoa.h>\n\n@interface NSView (RLMExtensions)\n\n- (void)addContentSubview:(NSView *)contentSubview;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/NSView+RLMExtensions.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"NSView+RLMExtensions.h\"\n\n@implementation NSView (RLMExtensions)\n\n- (void)addContentSubview:(NSView *)contentSubview {\n    contentSubview.translatesAutoresizingMaskIntoConstraints = NO;\n\n    NSDictionary *views = NSDictionaryOfVariableBindings(contentSubview);\n\n    [self addSubview:contentSubview];\n\n    [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@\"H:|[contentSubview]|\" options:0 metrics:nil views:views]];\n    [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@\"V:|[contentSubview]|\" options:0 metrics:nil views:views]];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMKeychainInfo+RLMSyncCredentials.h",
    "content": "//\n//  RLMKeychainInfo+RLMSyncCredentials.h\n//  RealmBrowser\n//\n//  Created by Guilherme Rambo on 12/04/17.\n//  Copyright © 2017 Realm inc. All rights reserved.\n//\n\n#import \"RLMKeychainInfo.h\"\n\n@import Realm;\n\n@interface RLMKeychainInfo (RLMSyncCredentials)\n\n@property (nonatomic, readonly) RLMSyncCredentials *credentials;\n\n+ (RLMSyncCredentials *)emptyCredentialsWithProvider:(RLMIdentityProvider)provider;\n- (BOOL)isEqualToCredentials:(RLMSyncCredentials *)credentials;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMKeychainInfo+RLMSyncCredentials.m",
    "content": "//\n//  RLMKeychainInfo+RLMSyncCredentials.m\n//  RealmBrowser\n//\n//  Created by Guilherme Rambo on 12/04/17.\n//  Copyright © 2017 Realm inc. All rights reserved.\n//\n\n#import \"RLMKeychainInfo+RLMSyncCredentials.h\"\n\n@implementation RLMKeychainInfo (RLMSyncCredentials)\n\n- (RLMSyncCredentials *)credentials\n{\n    if ([self.provider isEqualToString:RLMIdentityProviderUsernamePassword]) {\n        return [RLMSyncCredentials credentialsWithUsername:self.token password:self.password register:NO];\n    } else if ([self.provider isEqualToString:RLMIdentityProviderGoogle]) {\n        return [RLMSyncCredentials credentialsWithGoogleToken:self.token];\n    } else if ([self.provider isEqualToString:RLMIdentityProviderCloudKit]) {\n        return [RLMSyncCredentials credentialsWithCloudKitToken:self.token];\n    } else if ([self.provider isEqualToString:RLMIdentityProviderFacebook]) {\n        return [RLMSyncCredentials credentialsWithFacebookToken:self.token];\n    } else {\n        return [RLMSyncCredentials credentialsWithAccessToken:self.token identity:[NSUUID UUID].UUIDString];\n    }\n}\n\n+ (RLMSyncCredentials *)emptyCredentialsWithProvider:(RLMIdentityProvider)provider\n{\n    if ([provider isEqualToString:RLMIdentityProviderUsernamePassword]) {\n        return [RLMSyncCredentials credentialsWithUsername:@\"\" password:@\"\" register:NO];\n    } else if ([provider isEqualToString:RLMIdentityProviderGoogle]) {\n        return [RLMSyncCredentials credentialsWithGoogleToken:@\"\"];\n    } else if ([provider isEqualToString:RLMIdentityProviderCloudKit]) {\n        return [RLMSyncCredentials credentialsWithCloudKitToken:@\"\"];\n    } else if ([provider isEqualToString:RLMIdentityProviderFacebook]) {\n        return [RLMSyncCredentials credentialsWithFacebookToken:@\"\"];\n    } else {\n        return [RLMSyncCredentials credentialsWithAccessToken:@\"\" identity:[NSUUID UUID].UUIDString];\n    }\n}\n\n- (BOOL)isEqualToCredentials:(RLMSyncCredentials *)credentials\n{\n    return [credentials.provider isEqualToString:self.provider]\n            && [credentials.token isEqualToString:self.token]\n            && [credentials.userInfo[@\"password\"] isEqualToString:self.password];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMKeychainInfo.h",
    "content": "//\n//  RLMKeychainInfo.h\n//  RealmBrowser\n//\n//  Created by Guilherme Rambo on 11/04/17.\n//  Copyright © 2017 Realm inc. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface RLMKeychainInfo : NSObject\n\n@property (nonatomic, copy) NSString *provider;\n@property (nonatomic, copy) NSString *token;\n@property (nonatomic, copy) NSString *password;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMKeychainInfo.m",
    "content": "//\n//  RLMKeychainInfo.m\n//  RealmBrowser\n//\n//  Created by Guilherme Rambo on 11/04/17.\n//  Copyright © 2017 Realm inc. All rights reserved.\n//\n\n#import \"RLMKeychainInfo.h\"\n\n@implementation RLMKeychainInfo\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMKeychainStore.h",
    "content": "//\n//  RLMKeychainStore.h\n//  RealmBrowser\n//\n//  Created by Guilherme Rambo on 11/04/17.\n//  Copyright © 2017 Realm inc. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@class RLMSyncCredentials, RLMKeychainInfo;\n\n@interface RLMKeychainStore : NSObject\n\n- (void)saveCredentials:(RLMSyncCredentials *)credentials forServer:(NSURL *)serverURL;\n- (RLMKeychainInfo *)savedCredentialsForServer:(NSURL *)serverURL;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMKeychainStore.m",
    "content": "//\n//  RLMKeychainStore.m\n//  RealmBrowser\n//\n//  Created by Guilherme Rambo on 11/04/17.\n//  Copyright © 2017 Realm inc. All rights reserved.\n//\n\n#import \"RLMKeychainStore.h\"\n\n#import \"RLMKeychainInfo.h\"\n#import \"RLMKeychainInfo+RLMSyncCredentials.h\"\n\n@import Security;\n@import Realm;\n\nconst char * kRLMKeychainServiceName = \"Realm Browser\";\n\nNSString * const kRLMKeychainTokenKey = @\"token\";\nNSString * const kRLMKeychainPasswordKey = @\"password\";\nNSString * const kRLMKeychainProviderKey = @\"provider\";\n\n@interface RLMKeychainInfo (KeychainDictionary)\n\n+ (instancetype)keychainInfoFromKeychainDictionary:(NSDictionary *)dict;\n\n@end\n\n@implementation RLMKeychainStore\n\n- (void)saveCredentials:(RLMSyncCredentials *)credentials forServer:(NSURL *)serverURL\n{\n    if (!credentials.userInfo || !credentials.token) return;\n    \n    UInt32 serverAddressLength = (UInt32)serverURL.absoluteString.length;\n    const char *serverAddress = serverURL.absoluteString.UTF8String;\n    \n    NSDictionary *accountInfo = [self keychainDictionaryFromCredentials:credentials];\n    \n    NSData *plist = [NSPropertyListSerialization dataWithPropertyList:accountInfo format:NSPropertyListXMLFormat_v1_0 options:NSPropertyListImmutable error:NULL];\n    \n    if (!plist) return;\n    \n    RLMKeychainInfo *existingInfo = [self savedCredentialsForServer:serverURL];\n    \n    if (existingInfo != nil) {\n        if (![existingInfo isEqualToCredentials:credentials]) {\n            // credentials already existed and have changed, update\n            [self updateCredentialsForServerWithAddressLength:serverAddressLength address:serverAddress propertyList:plist];\n        }\n    } else {\n        // no previous credentials, add new\n        SecKeychainAddGenericPassword(NULL,\n                                      (UInt32)strlen(kRLMKeychainServiceName),\n                                      kRLMKeychainServiceName,\n                                      serverAddressLength,\n                                      serverAddress,\n                                      (UInt32)plist.length,\n                                      plist.bytes,\n                                      NULL);\n    }\n}\n\n- (void)updateCredentialsForServerWithAddressLength:(UInt32)serverAddressLength address:(const char *)serverAddress propertyList:(NSData *)plist\n{\n    SecKeychainItemRef item;\n    OSStatus result = SecKeychainFindGenericPassword(NULL, (UInt32)strlen(kRLMKeychainServiceName), kRLMKeychainServiceName, serverAddressLength, serverAddress, NULL, NULL, &item);\n    \n    if (result != noErr || !item) return;\n    \n    SecKeychainItemModifyContent(item, NULL, (UInt32)plist.length, plist.bytes);\n}\n\n- (RLMKeychainInfo *)savedCredentialsForServer:(NSURL *)serverURL\n{\n    UInt32 serverAddressLength = (UInt32)serverURL.absoluteString.length;\n    const char *serverAddress = serverURL.absoluteString.UTF8String;\n    \n    void *plistPointer;\n    UInt32 plistLength = 0;\n    \n    OSStatus result = SecKeychainFindGenericPassword(NULL, (UInt32)strlen(kRLMKeychainServiceName), kRLMKeychainServiceName, serverAddressLength, serverAddress, &plistLength, &plistPointer, NULL);\n    if (result != noErr || plistLength <= 0) return nil;\n    \n    NSData *plistData = [NSData dataWithBytes:plistPointer length:(NSUInteger)plistLength];\n    \n    NSDictionary *dict = [NSPropertyListSerialization propertyListWithData:plistData options:NSPropertyListImmutable format:NULL error:nil];\n    if (!dict) return nil;\n    \n    return [RLMKeychainInfo keychainInfoFromKeychainDictionary:dict];\n}\n\n#pragma mark Private\n\n- (NSDictionary *)keychainDictionaryFromCredentials:(RLMSyncCredentials *)credentials\n{\n    NSMutableDictionary *dict = [NSMutableDictionary new];\n    \n    dict[kRLMKeychainTokenKey] = credentials.token;\n    \n    if (credentials.userInfo) {\n        NSString *password = credentials.userInfo[kRLMKeychainPasswordKey];\n        if (password) dict[kRLMKeychainPasswordKey] = password;\n    }\n    \n    dict[kRLMKeychainProviderKey] = credentials.provider;\n    \n    return [dict copy];\n}\n\n@end\n\n@implementation RLMKeychainInfo (KeychainDictionary)\n\n+ (instancetype)keychainInfoFromKeychainDictionary:(NSDictionary *)dict\n{\n    RLMKeychainInfo *info = [RLMKeychainInfo new];\n    \n    info.token = dict[kRLMKeychainTokenKey];\n    info.password = dict[kRLMKeychainPasswordKey];\n    info.provider = dict[kRLMKeychainProviderKey];\n    \n    return info;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMSyncURLValueTransformer.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import <Foundation/Foundation.h>\n\n@interface RLMSyncURLValueTransformer : NSValueTransformer\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMSyncURLValueTransformer.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMSyncURLValueTransformer.h\"\n\n@implementation RLMSyncURLValueTransformer\n\n+ (Class)transformedValueClass {\n    return [NSString class];\n}\n\n+ (BOOL)allowsReverseTransformation {\n    return YES;\n}\n\n- (nullable id)transformedValue:(nullable id)value {\n    NSURL *url = value;\n\n    return url.absoluteString;\n}\n\n- (nullable id)reverseTransformedValue:(nullable id)value {\n    NSString *urlString = value;\n\n    if (urlString && ![urlString containsString:@\"://\"]) {\n        urlString = [@\"realm://\" stringByAppendingString:urlString];\n    }\n\n    return [NSURL URLWithString:urlString];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMSyncUtils.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Foundation;\n\nNSURL *authServerURLForSyncURL(NSURL *syncURL);\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMSyncUtils.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMSyncUtils.h\"\n#import \"RLMBrowserConstants.h\"\n\nNSURL *authServerURLForSyncURL(NSURL *syncURL) {\n    NSURLComponents *authServerURLComponents = [[NSURLComponents alloc] init];\n\n    authServerURLComponents.scheme = [syncURL.scheme isEqualToString:kSecureRealmURLScheme] ? @\"https\" : @\"http\";\n    authServerURLComponents.host = syncURL.host;\n    authServerURLComponents.port = syncURL.port;\n\n    return authServerURLComponents.URL;\n}\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMWindowController.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Cocoa;\n\ntypedef NS_ENUM(NSInteger, RLMWindowDisplayMode) {\n    RLMWindowDisplayModeNone,\n    RLMWindowDisplayModeNormal,\n    RLMWindowDisplayModeModal,\n    RLMWindowDisplayModeSheet\n};\n\ntypedef void (^RLMShowWindowCompletionHandler)(NSModalResponse returnCode);\n\n@interface RLMWindowController : NSWindowController<NSWindowDelegate>\n\n@property (getter=isWindowVisible, readonly) BOOL windowVisible;\n@property (nonatomic, readonly) RLMWindowDisplayMode displayMode;\n\n+ (NSString *)defaultNibName;\n\n- (void)showWindow:(id)sender completionHandler:(RLMShowWindowCompletionHandler)completionHandler;\n- (void)showSheetForWindow:(NSWindow *)window completionHandler:(RLMShowWindowCompletionHandler)completionHandler;\n- (NSModalResponse)showWindowModal:(id)sender;\n\n- (void)closeWithReturnCode:(NSModalResponse)code;\n\n- (IBAction)closeWindow:(id)sender;\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Library/RLMWindowController.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2016 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMWindowController.h\"\n\nstatic NSString * const RLMWindowControllerClassPrefix = @\"RLM\";\nstatic NSString * const RLMWindowControllerClassSyffix = @\"Controller\";\n\n@interface RLMWindowController ()\n\n@property (nonatomic, copy) RLMShowWindowCompletionHandler completionHandler;\n@property (nonatomic, readwrite) RLMWindowDisplayMode displayMode;\n\n@end\n\n@implementation RLMWindowController\n\n+ (NSString *)defaultNibName {\n    NSString* nibName = NSStringFromClass(self);\n\n    if ([nibName hasPrefix:RLMWindowControllerClassPrefix]) {\n        nibName = [nibName substringFromIndex:RLMWindowControllerClassPrefix.length];\n    }\n\n    if ([nibName hasSuffix:RLMWindowControllerClassSyffix]) {\n        nibName = [nibName substringToIndex:nibName.length - RLMWindowControllerClassSyffix.length];\n    }\n\n    return nibName;\n}\n\n- (instancetype)init {\n    return [self initWithWindowNibName:[self.class defaultNibName]];\n}\n\n- (instancetype)initWithWindow:(NSWindow *)window {\n    self = [super initWithWindow:window];\n\n    if (self != nil) {\n        self.displayMode = RLMWindowDisplayModeNone;\n    }\n\n    return self;\n}\n\n- (BOOL)windowVisible {\n    if (!self.windowLoaded) {\n        return NO;\n    }\n\n    return self.window.visible;\n}\n\n#pragma mark - Default Window\n\n- (void)showWindow:(id)sender {\n    self.displayMode = RLMWindowDisplayModeNormal;\n\n    [super showWindow:sender];\n}\n\n- (void)showWindow:(id)sender completionHandler:(RLMShowWindowCompletionHandler)completionHandler {\n    self.completionHandler = completionHandler;\n\n    [self showWindow:sender];\n}\n\n- (void)closeWindowWithReturnCode:(NSModalResponse)returnCode {\n    [super close];\n\n    if (self.completionHandler != nil) {\n        self.completionHandler(returnCode);\n        self.completionHandler = nil;\n    }\n}\n\n#pragma mark - Sheet\n\n- (void)showSheetForWindow:(NSWindow *)window completionHandler:(RLMShowWindowCompletionHandler)completionHandler {\n    self.displayMode = RLMWindowDisplayModeSheet;\n\n    [window beginSheet:self.window completionHandler:completionHandler];\n}\n\n- (void)closeSheetWithReturnCode:(NSModalResponse)returnCode {\n    [self.window.sheetParent endSheet:self.window returnCode:returnCode];\n}\n\n#pragma mark - Modal Window\n\n- (NSModalResponse)showWindowModal:(id)sender {\n    [self.window center];\n\n    self.displayMode = RLMWindowDisplayModeModal;\n\n    return [NSApp runModalForWindow:self.window];\n}\n\n- (void)closeModalWindowWithReturnCode:(NSModalResponse)returnCode {\n    [super close];\n    [NSApp stopModalWithCode:returnCode];\n}\n\n#pragma mark - Closing\n\n- (void)closeWithReturnCode:(NSModalResponse)returnCode {\n    RLMWindowDisplayMode displayMode = self.displayMode;\n\n    // Workaround to propagate all NSTextFields values to bindings\n    [self.window makeFirstResponder:nil];\n\n    self.displayMode = RLMWindowDisplayModeNone;\n\n    switch (displayMode) {\n        case RLMWindowDisplayModeNormal:\n            [self closeWindowWithReturnCode:returnCode];\n            break;\n\n        case RLMWindowDisplayModeSheet:\n            [self closeSheetWithReturnCode:returnCode];\n            break;\n\n        case RLMWindowDisplayModeModal:\n            [self closeModalWindowWithReturnCode:returnCode];\n            break;\n\n        default:\n            break;\n    }\n}\n\n- (void)closeWindow:(id)sender {\n    [self closeWithReturnCode:[sender tag]];\n}\n\n- (void)close {\n    [self closeWithReturnCode:NSModalResponseCancel];\n}\n\n#pragma mark - NSWindowDelegate\n\n- (BOOL)windowShouldClose:(id)sender {\n    [self closeWithReturnCode:NSModalResponseCancel];\n    return YES;\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserSync/Resources/AccessTokenCredentialView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G1004\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMAccessTokenCredentialViewController\">\n            <connections>\n                <outlet property=\"tokenTextField\" destination=\"Z1b-2j-YDP\" id=\"79J-6h-pVF\"/>\n                <outlet property=\"view\" destination=\"c22-O7-iKe\" id=\"BR0-8s-fNE\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customView id=\"c22-O7-iKe\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"215\"/>\n            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n            <subviews>\n                <textField horizontalCompressionResistancePriority=\"250\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Z1b-2j-YDP\">\n                    <rect key=\"frame\" x=\"20\" y=\"20\" width=\"440\" height=\"150\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"150\" id=\"zxZ-xv-IM0\"/>\n                    </constraints>\n                    <textFieldCell key=\"cell\" lineBreakMode=\"charWrapping\" selectable=\"YES\" editable=\"YES\" sendsActionOnEndEditing=\"YES\" state=\"on\" borderStyle=\"bezel\" placeholderString=\"\" drawsBackground=\"YES\" id=\"X5M-eS-PIH\">\n                        <font key=\"font\" size=\"12\" name=\"Menlo-Regular\"/>\n                        <color key=\"textColor\" name=\"textColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n                <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"9cm-fG-WwD\">\n                    <rect key=\"frame\" x=\"18\" y=\"178\" width=\"92\" height=\"17\"/>\n                    <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" title=\"Access Token:\" id=\"7l5-39-YCH\">\n                        <font key=\"font\" metaFont=\"system\"/>\n                        <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n            </subviews>\n            <constraints>\n                <constraint firstAttribute=\"trailing\" secondItem=\"Z1b-2j-YDP\" secondAttribute=\"trailing\" constant=\"20\" id=\"1po-Aq-aFI\"/>\n                <constraint firstItem=\"9cm-fG-WwD\" firstAttribute=\"top\" secondItem=\"c22-O7-iKe\" secondAttribute=\"top\" constant=\"20\" id=\"TYD-dq-xYK\"/>\n                <constraint firstItem=\"Z1b-2j-YDP\" firstAttribute=\"leading\" secondItem=\"c22-O7-iKe\" secondAttribute=\"leading\" constant=\"20\" id=\"VuN-s2-ofi\"/>\n                <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"9cm-fG-WwD\" secondAttribute=\"trailing\" constant=\"20\" symbolic=\"YES\" id=\"mHe-JO-OCo\"/>\n                <constraint firstItem=\"Z1b-2j-YDP\" firstAttribute=\"top\" secondItem=\"9cm-fG-WwD\" secondAttribute=\"bottom\" constant=\"8\" id=\"qvW-cx-QbL\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"Z1b-2j-YDP\" secondAttribute=\"bottom\" constant=\"20\" id=\"wC9-mp-1hu\"/>\n                <constraint firstItem=\"9cm-fG-WwD\" firstAttribute=\"leading\" secondItem=\"c22-O7-iKe\" secondAttribute=\"leading\" constant=\"20\" id=\"zva-31-qxG\"/>\n            </constraints>\n            <point key=\"canvasLocation\" x=\"691\" y=\"507.5\"/>\n        </customView>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/CloudKitCredentialView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G1004\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMCloudKitCredentialViewController\">\n            <connections>\n                <outlet property=\"tokenTextField\" destination=\"LDO-PW-5pq\" id=\"Mms-QH-4Y4\"/>\n                <outlet property=\"view\" destination=\"cyi-oh-Uc6\" id=\"i2R-xT-JpT\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customView id=\"cyi-oh-Uc6\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"215\"/>\n            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n            <subviews>\n                <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"YcL-4g-XPK\">\n                    <rect key=\"frame\" x=\"18\" y=\"178\" width=\"100\" height=\"17\"/>\n                    <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" title=\"CloudKit Token:\" id=\"RjI-TQ-bdk\">\n                        <font key=\"font\" metaFont=\"system\"/>\n                        <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n                <textField horizontalCompressionResistancePriority=\"250\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"LDO-PW-5pq\">\n                    <rect key=\"frame\" x=\"20\" y=\"20\" width=\"440\" height=\"150\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"150\" id=\"k0Y-6R-Mfo\"/>\n                    </constraints>\n                    <textFieldCell key=\"cell\" lineBreakMode=\"charWrapping\" selectable=\"YES\" editable=\"YES\" sendsActionOnEndEditing=\"YES\" state=\"on\" borderStyle=\"bezel\" placeholderString=\"\" drawsBackground=\"YES\" id=\"On3-Nx-aTv\">\n                        <font key=\"font\" size=\"12\" name=\"Menlo-Regular\"/>\n                        <color key=\"textColor\" name=\"textColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n            </subviews>\n            <constraints>\n                <constraint firstAttribute=\"trailing\" secondItem=\"LDO-PW-5pq\" secondAttribute=\"trailing\" constant=\"20\" id=\"2qj-Be-1f7\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"LDO-PW-5pq\" secondAttribute=\"bottom\" constant=\"20\" id=\"EpM-xl-VsQ\"/>\n                <constraint firstItem=\"YcL-4g-XPK\" firstAttribute=\"top\" secondItem=\"cyi-oh-Uc6\" secondAttribute=\"top\" constant=\"20\" id=\"O03-u2-qpp\"/>\n                <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"YcL-4g-XPK\" secondAttribute=\"trailing\" constant=\"20\" symbolic=\"YES\" id=\"YxK-tc-cjL\"/>\n                <constraint firstItem=\"LDO-PW-5pq\" firstAttribute=\"leading\" secondItem=\"cyi-oh-Uc6\" secondAttribute=\"leading\" constant=\"20\" id=\"g9R-Mm-ZuX\"/>\n                <constraint firstItem=\"YcL-4g-XPK\" firstAttribute=\"leading\" secondItem=\"cyi-oh-Uc6\" secondAttribute=\"leading\" constant=\"20\" id=\"n7A-So-odh\"/>\n                <constraint firstItem=\"LDO-PW-5pq\" firstAttribute=\"top\" secondItem=\"YcL-4g-XPK\" secondAttribute=\"bottom\" constant=\"8\" id=\"zf8-9Z-2Fm\"/>\n            </constraints>\n            <point key=\"canvasLocation\" x=\"691\" y=\"507.5\"/>\n        </customView>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/ConnectToServerWindow.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"12121\" systemVersion=\"16F73\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"12121\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMConnectToServerWindowController\">\n            <connections>\n                <outlet property=\"connectButton\" destination=\"uRt-4w-Mjf\" id=\"Cau-IC-MEI\"/>\n                <outlet property=\"credentialsContainerView\" destination=\"WTR-Iv-dY5\" id=\"mCH-JO-F2d\"/>\n                <outlet property=\"saveCredentialsCheckBox\" destination=\"VRh-oT-1rA\" id=\"VUI-gW-fWK\"/>\n                <outlet property=\"serverURLTextField\" destination=\"2i7-01-DBe\" id=\"O9C-SE-ATR\"/>\n                <outlet property=\"window\" destination=\"QvC-M9-y7g\" id=\"Bb2-l8-4UY\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <window title=\"Connect to Object Server\" allowsToolTipsWhenApplicationIsInactive=\"NO\" restorable=\"NO\" oneShot=\"NO\" releasedWhenClosed=\"NO\" showsToolbarButton=\"NO\" visibleAtLaunch=\"NO\" animationBehavior=\"default\" id=\"QvC-M9-y7g\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <windowPositionMask key=\"initialPositionMask\" leftStrut=\"YES\" rightStrut=\"YES\" topStrut=\"YES\" bottomStrut=\"YES\"/>\n            <rect key=\"contentRect\" x=\"196\" y=\"240\" width=\"500\" height=\"258\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"1280\" height=\"800\"/>\n            <view key=\"contentView\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"500\" height=\"258\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"uRt-4w-Mjf\">\n                        <rect key=\"frame\" x=\"394\" y=\"13\" width=\"92\" height=\"32\"/>\n                        <buttonCell key=\"cell\" type=\"push\" title=\"Connect\" bezelStyle=\"rounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"JEs-vy-Tnj\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nDQ\n</string>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"connect:\" target=\"-2\" id=\"OJU-eG-GqJ\"/>\n                        </connections>\n                    </button>\n                    <textField verticalHuggingPriority=\"750\" allowsCharacterPickerTouchBarItem=\"YES\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"2i7-01-DBe\">\n                        <rect key=\"frame\" x=\"20\" y=\"191\" width=\"460\" height=\"22\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"300\" id=\"BfJ-SJ-6Xg\"/>\n                        </constraints>\n                        <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" selectable=\"YES\" editable=\"YES\" sendsActionOnEndEditing=\"YES\" state=\"on\" borderStyle=\"bezel\" drawsBackground=\"YES\" id=\"Y6o-zj-ytV\">\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <color key=\"textColor\" name=\"textColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                        <connections>\n                            <binding destination=\"-2\" name=\"value\" keyPath=\"serverURL\" id=\"AiT-fd-GeJ\">\n                                <dictionary key=\"options\">\n                                    <bool key=\"NSAllowsEditingMultipleValuesSelection\" value=\"NO\"/>\n                                    <bool key=\"NSConditionallySetsEditable\" value=\"NO\"/>\n                                    <bool key=\"NSContinuouslyUpdatesValue\" value=\"YES\"/>\n                                    <string key=\"NSNoSelectionPlaceholder\">realm://</string>\n                                    <string key=\"NSNotApplicablePlaceholder\">realm://</string>\n                                    <string key=\"NSNullPlaceholder\">realm://</string>\n                                    <bool key=\"NSRaisesForNotApplicableKeys\" value=\"NO\"/>\n                                    <string key=\"NSValueTransformerName\">RLMSyncURLValueTransformer</string>\n                                </dictionary>\n                            </binding>\n                        </connections>\n                    </textField>\n                    <textField horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" allowsCharacterPickerTouchBarItem=\"YES\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"6SF-Re-3zi\">\n                        <rect key=\"frame\" x=\"18\" y=\"221\" width=\"77\" height=\"17\"/>\n                        <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" alignment=\"left\" title=\"Server URL:\" id=\"w6e-T2-wvV\">\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                    </textField>\n                    <customView verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"WTR-Iv-dY5\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"61\" width=\"500\" height=\"110\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"450\" id=\"vgg-8V-Imx\"/>\n                        </constraints>\n                    </customView>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"VRh-oT-1rA\">\n                        <rect key=\"frame\" x=\"20\" y=\"22\" width=\"210\" height=\"18\"/>\n                        <buttonCell key=\"cell\" type=\"check\" title=\"Save credentials for this server\" bezelStyle=\"regularSquare\" imagePosition=\"left\" state=\"on\" inset=\"2\" id=\"JMw-Ky-Kml\">\n                            <behavior key=\"behavior\" changeContents=\"YES\" doesNotDimImage=\"YES\" lightByContents=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                        </buttonCell>\n                    </button>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"HTQ-E5-jlI\">\n                        <rect key=\"frame\" x=\"312\" y=\"13\" width=\"82\" height=\"32\"/>\n                        <buttonCell key=\"cell\" type=\"push\" title=\"Cancel\" bezelStyle=\"rounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"7lm-nV-aTp\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nGw\n</string>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"cancel:\" target=\"-2\" id=\"E77-eq-BJg\"/>\n                        </connections>\n                    </button>\n                </subviews>\n                <constraints>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"WTR-Iv-dY5\" secondAttribute=\"trailing\" id=\"0vs-av-bAt\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"uRt-4w-Mjf\" secondAttribute=\"trailing\" constant=\"20\" symbolic=\"YES\" id=\"1na-Ks-Ygl\"/>\n                    <constraint firstItem=\"2i7-01-DBe\" firstAttribute=\"top\" secondItem=\"6SF-Re-3zi\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"4CO-EI-gu4\"/>\n                    <constraint firstItem=\"2i7-01-DBe\" firstAttribute=\"leading\" secondItem=\"6SF-Re-3zi\" secondAttribute=\"leading\" id=\"4pz-qB-dSh\"/>\n                    <constraint firstItem=\"HTQ-E5-jlI\" firstAttribute=\"leading\" relation=\"greaterThanOrEqual\" secondItem=\"VRh-oT-1rA\" secondAttribute=\"trailing\" constant=\"8\" symbolic=\"YES\" id=\"7zv-iF-4VS\"/>\n                    <constraint firstItem=\"WTR-Iv-dY5\" firstAttribute=\"top\" secondItem=\"2i7-01-DBe\" secondAttribute=\"bottom\" constant=\"20\" id=\"BpY-lD-vd4\"/>\n                    <constraint firstItem=\"uRt-4w-Mjf\" firstAttribute=\"leading\" secondItem=\"HTQ-E5-jlI\" secondAttribute=\"trailing\" constant=\"12\" id=\"EA5-Ff-It5\"/>\n                    <constraint firstItem=\"2i7-01-DBe\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"Wl2-ic-T4S\"/>\n                    <constraint firstItem=\"WTR-Iv-dY5\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" id=\"Y1J-3f-pt1\"/>\n                    <constraint firstItem=\"HTQ-E5-jlI\" firstAttribute=\"baseline\" secondItem=\"VRh-oT-1rA\" secondAttribute=\"baseline\" id=\"bne-ag-9EL\"/>\n                    <constraint firstItem=\"uRt-4w-Mjf\" firstAttribute=\"top\" secondItem=\"WTR-Iv-dY5\" secondAttribute=\"bottom\" constant=\"20\" symbolic=\"YES\" id=\"i8C-Vo-f4z\"/>\n                    <constraint firstItem=\"uRt-4w-Mjf\" firstAttribute=\"baseline\" secondItem=\"VRh-oT-1rA\" secondAttribute=\"baseline\" id=\"jko-RQ-vpx\"/>\n                    <constraint firstItem=\"6SF-Re-3zi\" firstAttribute=\"top\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"top\" constant=\"20\" symbolic=\"YES\" id=\"kP2-zU-mee\"/>\n                    <constraint firstItem=\"VRh-oT-1rA\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"22\" id=\"tiX-4P-WB6\"/>\n                    <constraint firstAttribute=\"bottom\" secondItem=\"uRt-4w-Mjf\" secondAttribute=\"bottom\" constant=\"20\" symbolic=\"YES\" id=\"yBx-lO-Pak\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"2i7-01-DBe\" secondAttribute=\"trailing\" constant=\"20\" symbolic=\"YES\" id=\"yMj-9p-GGe\"/>\n                </constraints>\n            </view>\n            <connections>\n                <outlet property=\"delegate\" destination=\"-2\" id=\"buF-7D-bNq\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"288\" y=\"291\"/>\n        </window>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/ConnectionIndicatorWindow.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G31\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMConnectionIndicatorWindowController\">\n            <connections>\n                <outlet property=\"messageLabel\" destination=\"A75-x0-U6J\" id=\"Ni5-Lu-Sx5\"/>\n                <outlet property=\"progressIndicator\" destination=\"77n-am-8TE\" id=\"cSn-Pp-FQT\"/>\n                <outlet property=\"window\" destination=\"QvC-M9-y7g\" id=\"tCn-IS-WRT\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <window allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" restorable=\"NO\" oneShot=\"NO\" releasedWhenClosed=\"NO\" showsToolbarButton=\"NO\" visibleAtLaunch=\"NO\" animationBehavior=\"default\" id=\"QvC-M9-y7g\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" miniaturizable=\"YES\"/>\n            <windowPositionMask key=\"initialPositionMask\" leftStrut=\"YES\" rightStrut=\"YES\" topStrut=\"YES\" bottomStrut=\"YES\"/>\n            <rect key=\"contentRect\" x=\"196\" y=\"240\" width=\"480\" height=\"131\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"1280\" height=\"777\"/>\n            <view key=\"contentView\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"131\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <progressIndicator wantsLayer=\"YES\" maxValue=\"100\" indeterminate=\"YES\" style=\"bar\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"77n-am-8TE\">\n                        <rect key=\"frame\" x=\"20\" y=\"66\" width=\"440\" height=\"21\"/>\n                    </progressIndicator>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"IGV-7r-Cfv\">\n                        <rect key=\"frame\" x=\"384\" y=\"19\" width=\"82\" height=\"32\"/>\n                        <buttonCell key=\"cell\" type=\"push\" title=\"Cancel\" bezelStyle=\"rounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"3rR-5j-EqP\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nGw\n</string>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"closeWindow:\" target=\"-2\" id=\"uNw-cB-Pwl\"/>\n                        </connections>\n                    </button>\n                    <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"A75-x0-U6J\">\n                        <rect key=\"frame\" x=\"18\" y=\"94\" width=\"205\" height=\"17\"/>\n                        <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" title=\"Connecting to an Object Server...\" id=\"uH3-mM-HBV\">\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                    </textField>\n                </subviews>\n                <constraints>\n                    <constraint firstItem=\"IGV-7r-Cfv\" firstAttribute=\"top\" secondItem=\"77n-am-8TE\" secondAttribute=\"bottom\" constant=\"20\" id=\"A39-T4-TMs\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"IGV-7r-Cfv\" secondAttribute=\"trailing\" constant=\"20\" id=\"LM7-nk-iOB\"/>\n                    <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"A75-x0-U6J\" secondAttribute=\"trailing\" constant=\"20\" id=\"WJ4-Un-54O\"/>\n                    <constraint firstItem=\"A75-x0-U6J\" firstAttribute=\"top\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"top\" constant=\"20\" id=\"gcC-zI-Bab\"/>\n                    <constraint firstItem=\"77n-am-8TE\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"20\" id=\"hln-F2-0kN\"/>\n                    <constraint firstItem=\"A75-x0-U6J\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"20\" id=\"kDB-WF-0jx\"/>\n                    <constraint firstItem=\"77n-am-8TE\" firstAttribute=\"top\" secondItem=\"A75-x0-U6J\" secondAttribute=\"bottom\" constant=\"8\" id=\"khv-Mz-en0\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"77n-am-8TE\" secondAttribute=\"trailing\" constant=\"20\" id=\"vcS-54-ZDp\"/>\n                    <constraint firstAttribute=\"bottom\" secondItem=\"IGV-7r-Cfv\" secondAttribute=\"bottom\" constant=\"26\" id=\"xom-C8-meN\"/>\n                </constraints>\n            </view>\n            <connections>\n                <outlet property=\"delegate\" destination=\"-2\" id=\"BzN-hv-hwC\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"794\" y=\"430.5\"/>\n        </window>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/CredentialsView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G31\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMCredentialsViewController\">\n            <connections>\n                <outlet property=\"tabView\" destination=\"kRj-Bm-NAT\" id=\"010-gx-uz5\"/>\n                <outlet property=\"view\" destination=\"JZP-m5-8Dc\" id=\"8eA-DA-ax8\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customView id=\"JZP-m5-8Dc\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"319\" height=\"144\"/>\n            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n            <subviews>\n                <tabView translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"kRj-Bm-NAT\">\n                    <rect key=\"frame\" x=\"-10\" y=\"-10\" width=\"339\" height=\"160\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"320\" id=\"TYD-Q1-oUY\"/>\n                    </constraints>\n                    <font key=\"font\" metaFont=\"system\"/>\n                    <tabViewItems>\n                        <tabViewItem label=\"Tab\" identifier=\"1\" id=\"SHR-JH-YdN\">\n                            <view key=\"view\" id=\"AL2-sg-4Yk\">\n                                <rect key=\"frame\" x=\"10\" y=\"33\" width=\"319\" height=\"114\"/>\n                                <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                            </view>\n                        </tabViewItem>\n                        <tabViewItem label=\"View\" identifier=\"2\" id=\"tov-IQ-26b\">\n                            <view key=\"view\" id=\"F3L-Np-nXo\">\n                                <rect key=\"frame\" x=\"10\" y=\"33\" width=\"313\" height=\"114\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                            </view>\n                        </tabViewItem>\n                    </tabViewItems>\n                </tabView>\n            </subviews>\n            <constraints>\n                <constraint firstItem=\"kRj-Bm-NAT\" firstAttribute=\"top\" secondItem=\"JZP-m5-8Dc\" secondAttribute=\"top\" id=\"EyO-gK-jLG\"/>\n                <constraint firstAttribute=\"trailing\" secondItem=\"kRj-Bm-NAT\" secondAttribute=\"trailing\" constant=\"-3\" id=\"UVu-6S-rLB\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"kRj-Bm-NAT\" secondAttribute=\"bottom\" id=\"VfG-8I-hoL\"/>\n                <constraint firstItem=\"kRj-Bm-NAT\" firstAttribute=\"leading\" secondItem=\"JZP-m5-8Dc\" secondAttribute=\"leading\" constant=\"-3\" id=\"naI-YX-OzC\"/>\n            </constraints>\n            <point key=\"canvasLocation\" x=\"583.5\" y=\"571\"/>\n        </customView>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/FacebookCredentialView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G1004\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMFacebookCredentialViewController\">\n            <connections>\n                <outlet property=\"tokenTextField\" destination=\"w8A-IR-tTv\" id=\"qcX-r0-YkW\"/>\n                <outlet property=\"view\" destination=\"iwa-Cy-SZK\" id=\"y3t-ft-Jsg\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customView id=\"iwa-Cy-SZK\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"215\"/>\n            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n            <subviews>\n                <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"h7z-zH-lYi\">\n                    <rect key=\"frame\" x=\"18\" y=\"178\" width=\"107\" height=\"17\"/>\n                    <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" title=\"Facebook Token:\" id=\"th5-Kl-tBJ\">\n                        <font key=\"font\" metaFont=\"system\"/>\n                        <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n                <textField horizontalCompressionResistancePriority=\"250\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"w8A-IR-tTv\">\n                    <rect key=\"frame\" x=\"20\" y=\"20\" width=\"440\" height=\"150\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"150\" id=\"7sk-3z-0Li\"/>\n                    </constraints>\n                    <textFieldCell key=\"cell\" lineBreakMode=\"charWrapping\" selectable=\"YES\" editable=\"YES\" sendsActionOnEndEditing=\"YES\" state=\"on\" borderStyle=\"bezel\" placeholderString=\"\" drawsBackground=\"YES\" id=\"z4l-rZ-fjR\">\n                        <font key=\"font\" size=\"12\" name=\"Menlo-Regular\"/>\n                        <color key=\"textColor\" name=\"textColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n            </subviews>\n            <constraints>\n                <constraint firstItem=\"w8A-IR-tTv\" firstAttribute=\"leading\" secondItem=\"iwa-Cy-SZK\" secondAttribute=\"leading\" constant=\"20\" id=\"2GX-2P-cG2\"/>\n                <constraint firstItem=\"w8A-IR-tTv\" firstAttribute=\"top\" secondItem=\"h7z-zH-lYi\" secondAttribute=\"bottom\" constant=\"8\" id=\"3SP-qI-lHs\"/>\n                <constraint firstItem=\"h7z-zH-lYi\" firstAttribute=\"top\" secondItem=\"iwa-Cy-SZK\" secondAttribute=\"top\" constant=\"20\" id=\"CGf-vS-Ofb\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"w8A-IR-tTv\" secondAttribute=\"bottom\" constant=\"20\" id=\"LuS-39-wYT\"/>\n                <constraint firstAttribute=\"trailing\" secondItem=\"w8A-IR-tTv\" secondAttribute=\"trailing\" constant=\"20\" id=\"QA1-7o-goK\"/>\n                <constraint firstItem=\"h7z-zH-lYi\" firstAttribute=\"leading\" secondItem=\"iwa-Cy-SZK\" secondAttribute=\"leading\" constant=\"20\" id=\"QEG-oI-FnX\"/>\n                <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"h7z-zH-lYi\" secondAttribute=\"trailing\" constant=\"20\" symbolic=\"YES\" id=\"jNJ-iK-NBG\"/>\n            </constraints>\n            <point key=\"canvasLocation\" x=\"691\" y=\"507.5\"/>\n        </customView>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/GoogleCredentialView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G1004\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMGoogleCredentialViewController\">\n            <connections>\n                <outlet property=\"tokenTextField\" destination=\"9Ed-Dd-FjU\" id=\"DTb-S8-rFT\"/>\n                <outlet property=\"view\" destination=\"rwI-Za-voK\" id=\"2es-4C-Ffv\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customView id=\"rwI-Za-voK\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"215\"/>\n            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n            <subviews>\n                <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"qOa-6t-s56\">\n                    <rect key=\"frame\" x=\"18\" y=\"178\" width=\"91\" height=\"17\"/>\n                    <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" title=\"Google Token:\" id=\"1fU-Kt-lgx\">\n                        <font key=\"font\" metaFont=\"system\"/>\n                        <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n                <textField horizontalCompressionResistancePriority=\"250\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"9Ed-Dd-FjU\">\n                    <rect key=\"frame\" x=\"20\" y=\"20\" width=\"440\" height=\"150\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"150\" id=\"gam-Fo-tfP\"/>\n                    </constraints>\n                    <textFieldCell key=\"cell\" lineBreakMode=\"charWrapping\" selectable=\"YES\" editable=\"YES\" sendsActionOnEndEditing=\"YES\" state=\"on\" borderStyle=\"bezel\" placeholderString=\"\" drawsBackground=\"YES\" id=\"7uV-fp-6NV\">\n                        <font key=\"font\" size=\"12\" name=\"Menlo-Regular\"/>\n                        <color key=\"textColor\" name=\"textColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n            </subviews>\n            <constraints>\n                <constraint firstItem=\"qOa-6t-s56\" firstAttribute=\"leading\" secondItem=\"rwI-Za-voK\" secondAttribute=\"leading\" constant=\"20\" id=\"465-LR-Aen\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"9Ed-Dd-FjU\" secondAttribute=\"bottom\" constant=\"20\" id=\"IsZ-bq-vyU\"/>\n                <constraint firstItem=\"9Ed-Dd-FjU\" firstAttribute=\"top\" secondItem=\"qOa-6t-s56\" secondAttribute=\"bottom\" constant=\"8\" id=\"J2A-Pc-TDF\"/>\n                <constraint firstItem=\"9Ed-Dd-FjU\" firstAttribute=\"leading\" secondItem=\"rwI-Za-voK\" secondAttribute=\"leading\" constant=\"20\" id=\"Nzk-vI-Htk\"/>\n                <constraint firstItem=\"qOa-6t-s56\" firstAttribute=\"top\" secondItem=\"rwI-Za-voK\" secondAttribute=\"top\" constant=\"20\" id=\"UIZ-fV-z6p\"/>\n                <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"qOa-6t-s56\" secondAttribute=\"trailing\" constant=\"20\" symbolic=\"YES\" id=\"mcT-lu-dF7\"/>\n                <constraint firstAttribute=\"trailing\" secondItem=\"9Ed-Dd-FjU\" secondAttribute=\"trailing\" constant=\"20\" id=\"vbx-oI-e3u\"/>\n            </constraints>\n            <point key=\"canvasLocation\" x=\"691\" y=\"507.5\"/>\n        </customView>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/LoginWindow.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"11542\" systemVersion=\"16B2555\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"11542\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMLoginWindowController\">\n            <connections>\n                <outlet property=\"credentialsContainerView\" destination=\"bRG-Yt-kei\" id=\"VWx-g4-Pei\"/>\n                <outlet property=\"messageLabel\" destination=\"suR-f2-Kns\" id=\"23X-Wo-rVG\"/>\n                <outlet property=\"okButton\" destination=\"h6S-kr-KBY\" id=\"CHn-RQ-OGr\"/>\n                <outlet property=\"window\" destination=\"QvC-M9-y7g\" id=\"O5s-qx-amN\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <window allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" restorable=\"NO\" oneShot=\"NO\" releasedWhenClosed=\"NO\" showsToolbarButton=\"NO\" visibleAtLaunch=\"NO\" animationBehavior=\"default\" id=\"QvC-M9-y7g\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <windowPositionMask key=\"initialPositionMask\" leftStrut=\"YES\" rightStrut=\"YES\" topStrut=\"YES\" bottomStrut=\"YES\"/>\n            <rect key=\"contentRect\" x=\"196\" y=\"240\" width=\"450\" height=\"269\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"1280\" height=\"800\"/>\n            <view key=\"contentView\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"450\" height=\"269\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"h6S-kr-KBY\">\n                        <rect key=\"frame\" x=\"379\" y=\"13\" width=\"57\" height=\"32\"/>\n                        <buttonCell key=\"cell\" type=\"push\" title=\"Ok\" bezelStyle=\"rounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"Hyo-WQ-dmw\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nDQ\n</string>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"ok:\" target=\"-2\" id=\"VNh-hk-v8t\"/>\n                        </connections>\n                    </button>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"qYg-Bj-nrc\">\n                        <rect key=\"frame\" x=\"14\" y=\"13\" width=\"82\" height=\"32\"/>\n                        <buttonCell key=\"cell\" type=\"push\" title=\"Cancel\" bezelStyle=\"rounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"Szv-q4-qoh\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nGw\n</string>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"cancel:\" target=\"-2\" id=\"sKt-ao-gfx\"/>\n                        </connections>\n                    </button>\n                    <customView horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bRG-Yt-kei\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"61\" width=\"450\" height=\"151\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"450\" id=\"isg-1T-8Th\"/>\n                        </constraints>\n                    </customView>\n                    <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"suR-f2-Kns\">\n                        <rect key=\"frame\" x=\"18\" y=\"232\" width=\"414\" height=\"17\"/>\n                        <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" alignment=\"center\" title=\"Please provide a valid credentials to access this Realm.\" id=\"DIn-CQ-D8k\">\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                    </textField>\n                </subviews>\n                <constraints>\n                    <constraint firstAttribute=\"bottom\" secondItem=\"qYg-Bj-nrc\" secondAttribute=\"bottom\" constant=\"20\" id=\"5Aw-t4-B7q\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"suR-f2-Kns\" secondAttribute=\"trailing\" constant=\"20\" id=\"5wo-Mz-6ot\"/>\n                    <constraint firstItem=\"suR-f2-Kns\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"20\" id=\"6NU-uI-LUD\"/>\n                    <constraint firstItem=\"qYg-Bj-nrc\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"20\" id=\"9LN-Wq-Ymu\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"h6S-kr-KBY\" secondAttribute=\"trailing\" constant=\"20\" id=\"MQd-pi-XKt\"/>\n                    <constraint firstItem=\"qYg-Bj-nrc\" firstAttribute=\"top\" secondItem=\"bRG-Yt-kei\" secondAttribute=\"bottom\" constant=\"20\" id=\"YBx-jO-Sby\"/>\n                    <constraint firstAttribute=\"bottom\" secondItem=\"h6S-kr-KBY\" secondAttribute=\"bottom\" constant=\"20\" id=\"cnw-1O-5xY\"/>\n                    <constraint firstItem=\"bRG-Yt-kei\" firstAttribute=\"top\" secondItem=\"suR-f2-Kns\" secondAttribute=\"bottom\" constant=\"20\" id=\"j2b-8i-4Nk\"/>\n                    <constraint firstItem=\"bRG-Yt-kei\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" id=\"lTK-ES-gTh\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"bRG-Yt-kei\" secondAttribute=\"trailing\" id=\"uss-Xz-hp4\"/>\n                    <constraint firstItem=\"suR-f2-Kns\" firstAttribute=\"top\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"top\" constant=\"20\" id=\"vLX-xl-mh2\"/>\n                    <constraint firstItem=\"h6S-kr-KBY\" firstAttribute=\"top\" secondItem=\"bRG-Yt-kei\" secondAttribute=\"bottom\" constant=\"20\" id=\"wbD-w3-qMu\"/>\n                </constraints>\n            </view>\n            <point key=\"canvasLocation\" x=\"413\" y=\"421.5\"/>\n        </window>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/OpenSyncURLWindow.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G1004\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMOpenSyncURLWindowController\">\n            <connections>\n                <outlet property=\"credentialsContainerView\" destination=\"1bu-8A-vu1\" id=\"wfv-Ee-2Oi\"/>\n                <outlet property=\"openButton\" destination=\"VT1-77-glH\" id=\"31S-vu-78c\"/>\n                <outlet property=\"urlTextField\" destination=\"EGr-Jj-IJA\" id=\"KdK-2S-apW\"/>\n                <outlet property=\"window\" destination=\"QvC-M9-y7g\" id=\"Vof-Sc-K4G\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <window title=\"Open Sync URL\" allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" restorable=\"NO\" oneShot=\"NO\" releasedWhenClosed=\"NO\" showsToolbarButton=\"NO\" visibleAtLaunch=\"NO\" animationBehavior=\"default\" id=\"QvC-M9-y7g\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <windowPositionMask key=\"initialPositionMask\" leftStrut=\"YES\" rightStrut=\"YES\" topStrut=\"YES\" bottomStrut=\"YES\"/>\n            <rect key=\"contentRect\" x=\"196\" y=\"240\" width=\"450\" height=\"376\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"1280\" height=\"800\"/>\n            <view key=\"contentView\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"450\" height=\"376\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <textField verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"EGr-Jj-IJA\">\n                        <rect key=\"frame\" x=\"20\" y=\"309\" width=\"410\" height=\"22\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"300\" id=\"PJ3-4e-rnb\"/>\n                        </constraints>\n                        <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" selectable=\"YES\" editable=\"YES\" sendsActionOnEndEditing=\"YES\" state=\"on\" borderStyle=\"bezel\" drawsBackground=\"YES\" id=\"nkI-kL-AoU\">\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <color key=\"textColor\" name=\"textColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                        <connections>\n                            <binding destination=\"-2\" name=\"value\" keyPath=\"url\" id=\"akW-BS-D7a\">\n                                <dictionary key=\"options\">\n                                    <bool key=\"NSAllowsEditingMultipleValuesSelection\" value=\"NO\"/>\n                                    <bool key=\"NSConditionallySetsEditable\" value=\"NO\"/>\n                                    <bool key=\"NSContinuouslyUpdatesValue\" value=\"YES\"/>\n                                    <string key=\"NSNoSelectionPlaceholder\">realm://</string>\n                                    <string key=\"NSNotApplicablePlaceholder\">realm://</string>\n                                    <string key=\"NSNullPlaceholder\">realm://</string>\n                                    <bool key=\"NSRaisesForNotApplicableKeys\" value=\"NO\"/>\n                                    <string key=\"NSValueTransformerName\">RLMSyncURLValueTransformer</string>\n                                </dictionary>\n                            </binding>\n                        </connections>\n                    </textField>\n                    <textField horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"fOH-GZ-SV5\">\n                        <rect key=\"frame\" x=\"18\" y=\"339\" width=\"74\" height=\"17\"/>\n                        <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" alignment=\"left\" title=\"Realm URL:\" id=\"8n6-KZ-10N\">\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                    </textField>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"VrP-Eo-o2V\">\n                        <rect key=\"frame\" x=\"14\" y=\"13\" width=\"82\" height=\"32\"/>\n                        <buttonCell key=\"cell\" type=\"push\" title=\"Cancel\" bezelStyle=\"rounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"ySg-HC-qLR\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nGw\n</string>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"cancel:\" target=\"-2\" id=\"4DE-eH-Sfn\"/>\n                        </connections>\n                    </button>\n                    <customView verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"1bu-8A-vu1\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"61\" width=\"450\" height=\"228\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"450\" id=\"rME-f3-t2W\"/>\n                        </constraints>\n                    </customView>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"VT1-77-glH\">\n                        <rect key=\"frame\" x=\"363\" y=\"13\" width=\"73\" height=\"32\"/>\n                        <buttonCell key=\"cell\" type=\"push\" title=\"Open\" bezelStyle=\"rounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"Os0-VX-Gjy\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <string key=\"keyEquivalent\" base64-UTF8=\"YES\">\nDQ\n</string>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"open:\" target=\"-2\" id=\"Obq-Ak-Q54\"/>\n                        </connections>\n                    </button>\n                </subviews>\n                <constraints>\n                    <constraint firstItem=\"1bu-8A-vu1\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" id=\"5kh-6Q-IQL\"/>\n                    <constraint firstItem=\"fOH-GZ-SV5\" firstAttribute=\"top\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"top\" constant=\"20\" id=\"5vM-kP-ix8\"/>\n                    <constraint firstItem=\"1bu-8A-vu1\" firstAttribute=\"top\" secondItem=\"EGr-Jj-IJA\" secondAttribute=\"bottom\" constant=\"20\" id=\"Ap4-aR-vYo\"/>\n                    <constraint firstItem=\"VrP-Eo-o2V\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"20\" id=\"CFG-RG-Wmi\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"1bu-8A-vu1\" secondAttribute=\"trailing\" id=\"KUS-L8-NAz\"/>\n                    <constraint firstItem=\"EGr-Jj-IJA\" firstAttribute=\"top\" secondItem=\"fOH-GZ-SV5\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"LKI-xQ-spn\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"EGr-Jj-IJA\" secondAttribute=\"trailing\" constant=\"20\" id=\"Q2Y-U7-iAJ\"/>\n                    <constraint firstItem=\"VrP-Eo-o2V\" firstAttribute=\"top\" secondItem=\"1bu-8A-vu1\" secondAttribute=\"bottom\" constant=\"20\" id=\"RJa-bh-2xf\"/>\n                    <constraint firstAttribute=\"bottom\" secondItem=\"VrP-Eo-o2V\" secondAttribute=\"bottom\" constant=\"20\" id=\"bvB-bT-OIo\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"VT1-77-glH\" secondAttribute=\"trailing\" constant=\"20\" id=\"oGU-Mh-0Pd\"/>\n                    <constraint firstItem=\"EGr-Jj-IJA\" firstAttribute=\"leading\" secondItem=\"fOH-GZ-SV5\" secondAttribute=\"leading\" id=\"pqT-sw-dmV\"/>\n                    <constraint firstAttribute=\"bottom\" secondItem=\"VT1-77-glH\" secondAttribute=\"bottom\" constant=\"20\" id=\"rfy-W3-lgY\"/>\n                    <constraint firstItem=\"VT1-77-glH\" firstAttribute=\"top\" secondItem=\"1bu-8A-vu1\" secondAttribute=\"bottom\" constant=\"20\" id=\"tpW-i8-iBJ\"/>\n                    <constraint firstItem=\"EGr-Jj-IJA\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"20\" id=\"wJ8-Rt-mBK\"/>\n                </constraints>\n            </view>\n            <connections>\n                <outlet property=\"delegate\" destination=\"-2\" id=\"oo5-st-slJ\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"478\" y=\"419\"/>\n        </window>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/SyncServerBrowserWindow.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"11542\" systemVersion=\"16B2555\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"11542\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMSyncServerBrowserWindowController\">\n            <connections>\n                <outlet property=\"progressIndicator\" destination=\"BoE-8t-oiM\" id=\"YhJ-Px-cpK\"/>\n                <outlet property=\"searchField\" destination=\"JBB-tN-O6v\" id=\"FKp-ud-Ude\"/>\n                <outlet property=\"tableView\" destination=\"pZo-lC-m6V\" id=\"dUy-gb-E2f\"/>\n                <outlet property=\"titleLabel\" destination=\"JTo-IS-gwL\" id=\"4lT-FW-OmN\"/>\n                <outlet property=\"window\" destination=\"QvC-M9-y7g\" id=\"AEg-qW-Jao\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <window allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" restorable=\"NO\" oneShot=\"NO\" releasedWhenClosed=\"NO\" showsToolbarButton=\"NO\" visibleAtLaunch=\"NO\" animationBehavior=\"documentWindow\" id=\"QvC-M9-y7g\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" miniaturizable=\"YES\" resizable=\"YES\"/>\n            <windowPositionMask key=\"initialPositionMask\" leftStrut=\"YES\" rightStrut=\"YES\" topStrut=\"YES\" bottomStrut=\"YES\"/>\n            <rect key=\"contentRect\" x=\"196\" y=\"240\" width=\"649\" height=\"315\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"1280\" height=\"800\"/>\n            <value key=\"minSize\" type=\"size\" width=\"600\" height=\"300\"/>\n            <view key=\"contentView\" wantsLayer=\"YES\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"649\" height=\"315\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <scrollView borderType=\"none\" autohidesScrollers=\"YES\" horizontalLineScroll=\"34\" horizontalPageScroll=\"10\" verticalLineScroll=\"34\" verticalPageScroll=\"10\" usesPredominantAxisScrolling=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"LOf-5a-tzi\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"649\" height=\"315\"/>\n                        <clipView key=\"contentView\" id=\"AFE-eo-Oi5\">\n                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"649\" height=\"315\"/>\n                            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                            <subviews>\n                                <tableView verticalHuggingPriority=\"750\" allowsExpansionToolTips=\"YES\" columnAutoresizingStyle=\"lastColumnOnly\" alternatingRowBackgroundColors=\"YES\" columnReordering=\"NO\" columnResizing=\"NO\" multipleSelection=\"NO\" emptySelection=\"NO\" autosaveColumns=\"NO\" rowHeight=\"32\" viewBased=\"YES\" id=\"pZo-lC-m6V\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"649\" height=\"315\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                    <size key=\"intercellSpacing\" width=\"3\" height=\"2\"/>\n                                    <color key=\"backgroundColor\" name=\"controlBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                    <color key=\"gridColor\" name=\"gridColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                    <tableColumns>\n                                        <tableColumn width=\"646\" minWidth=\"40\" maxWidth=\"1000\" id=\"O4O-i8-udd\">\n                                            <tableHeaderCell key=\"headerCell\" lineBreakMode=\"truncatingTail\" borderStyle=\"border\">\n                                                <font key=\"font\" metaFont=\"smallSystem\"/>\n                                                <color key=\"textColor\" name=\"headerTextColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                <color key=\"backgroundColor\" name=\"headerColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                            </tableHeaderCell>\n                                            <textFieldCell key=\"dataCell\" lineBreakMode=\"truncatingTail\" selectable=\"YES\" editable=\"YES\" title=\"Text Cell\" id=\"Vc1-EB-NrW\">\n                                                <font key=\"font\" metaFont=\"system\"/>\n                                                <color key=\"textColor\" name=\"controlTextColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                <color key=\"backgroundColor\" name=\"controlBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                            </textFieldCell>\n                                            <tableColumnResizingMask key=\"resizingMask\" resizeWithTable=\"YES\"/>\n                                            <prototypeCellViews>\n                                                <tableCellView identifier=\"PathCell\" id=\"OeT-Yq-lru\">\n                                                    <rect key=\"frame\" x=\"1\" y=\"1\" width=\"646\" height=\"32\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                                                    <subviews>\n                                                        <imageView horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"IjU-Au-Ghm\">\n                                                            <rect key=\"frame\" x=\"6\" y=\"0.0\" width=\"24\" height=\"32\"/>\n                                                            <constraints>\n                                                                <constraint firstAttribute=\"height\" constant=\"32\" id=\"0RO-yE-I0C\"/>\n                                                                <constraint firstAttribute=\"width\" constant=\"24\" id=\"Pjw-bB-sQh\"/>\n                                                            </constraints>\n                                                            <imageCell key=\"cell\" refusesFirstResponder=\"YES\" alignment=\"left\" imageScaling=\"proportionallyDown\" image=\"RealmFileIcon\" id=\"FZq-5M-JEU\"/>\n                                                        </imageView>\n                                                        <textField verticalHuggingPriority=\"750\" horizontalCompressionResistancePriority=\"250\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"IEU-jL-Ns8\">\n                                                            <rect key=\"frame\" x=\"36\" y=\"8\" width=\"592\" height=\"17\"/>\n                                                            <textFieldCell key=\"cell\" lineBreakMode=\"truncatingTail\" sendsActionOnEndEditing=\"YES\" title=\"Table View Cell\" id=\"t2K-A7-okC\">\n                                                                <font key=\"font\" metaFont=\"system\"/>\n                                                                <color key=\"textColor\" name=\"controlTextColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                                <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                                            </textFieldCell>\n                                                        </textField>\n                                                    </subviews>\n                                                    <constraints>\n                                                        <constraint firstItem=\"IjU-Au-Ghm\" firstAttribute=\"top\" secondItem=\"OeT-Yq-lru\" secondAttribute=\"top\" id=\"6Vh-hl-HlQ\"/>\n                                                        <constraint firstAttribute=\"trailing\" secondItem=\"IEU-jL-Ns8\" secondAttribute=\"trailing\" constant=\"20\" symbolic=\"YES\" id=\"Nie-Yi-7A0\"/>\n                                                        <constraint firstItem=\"IEU-jL-Ns8\" firstAttribute=\"leading\" secondItem=\"IjU-Au-Ghm\" secondAttribute=\"trailing\" constant=\"8\" symbolic=\"YES\" id=\"WHL-AQ-PG6\"/>\n                                                        <constraint firstAttribute=\"bottom\" secondItem=\"IjU-Au-Ghm\" secondAttribute=\"bottom\" id=\"iyj-IC-2IA\"/>\n                                                        <constraint firstItem=\"IjU-Au-Ghm\" firstAttribute=\"leading\" secondItem=\"OeT-Yq-lru\" secondAttribute=\"leading\" constant=\"6\" id=\"tN8-nC-lwB\"/>\n                                                        <constraint firstItem=\"IEU-jL-Ns8\" firstAttribute=\"centerY\" secondItem=\"OeT-Yq-lru\" secondAttribute=\"centerY\" id=\"wF2-j8-cuW\"/>\n                                                    </constraints>\n                                                    <connections>\n                                                        <outlet property=\"textField\" destination=\"IEU-jL-Ns8\" id=\"MyW-et-uwP\"/>\n                                                    </connections>\n                                                </tableCellView>\n                                            </prototypeCellViews>\n                                        </tableColumn>\n                                    </tableColumns>\n                                    <connections>\n                                        <outlet property=\"dataSource\" destination=\"-2\" id=\"mqK-uw-6bI\"/>\n                                        <outlet property=\"delegate\" destination=\"-2\" id=\"xXV-Nv-M6r\"/>\n                                    </connections>\n                                </tableView>\n                            </subviews>\n                        </clipView>\n                        <constraints>\n                            <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"480\" id=\"9he-sR-DqZ\"/>\n                            <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"270\" id=\"U09-SF-qLh\"/>\n                        </constraints>\n                        <scroller key=\"horizontalScroller\" hidden=\"YES\" verticalHuggingPriority=\"750\" horizontal=\"YES\" id=\"oFx-KT-Z5b\">\n                            <rect key=\"frame\" x=\"0.0\" y=\"254\" width=\"480\" height=\"16\"/>\n                            <autoresizingMask key=\"autoresizingMask\"/>\n                        </scroller>\n                        <scroller key=\"verticalScroller\" hidden=\"YES\" verticalHuggingPriority=\"750\" horizontal=\"NO\" id=\"HaK-cJ-jeD\">\n                            <rect key=\"frame\" x=\"224\" y=\"17\" width=\"15\" height=\"102\"/>\n                            <autoresizingMask key=\"autoresizingMask\"/>\n                        </scroller>\n                    </scrollView>\n                    <progressIndicator wantsLayer=\"YES\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" maxValue=\"100\" bezeled=\"NO\" indeterminate=\"YES\" style=\"spinning\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"BoE-8t-oiM\">\n                        <rect key=\"frame\" x=\"309\" y=\"142\" width=\"32\" height=\"32\"/>\n                    </progressIndicator>\n                </subviews>\n                <constraints>\n                    <constraint firstItem=\"BoE-8t-oiM\" firstAttribute=\"centerY\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"centerY\" id=\"ULz-JI-mtN\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"LOf-5a-tzi\" secondAttribute=\"trailing\" id=\"VdF-Ev-Xij\"/>\n                    <constraint firstItem=\"LOf-5a-tzi\" firstAttribute=\"top\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"top\" id=\"gcG-vi-K7D\"/>\n                    <constraint firstItem=\"LOf-5a-tzi\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" id=\"nY2-jD-jPG\"/>\n                    <constraint firstAttribute=\"bottom\" secondItem=\"LOf-5a-tzi\" secondAttribute=\"bottom\" id=\"wCa-lF-A0l\"/>\n                    <constraint firstItem=\"BoE-8t-oiM\" firstAttribute=\"centerX\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"centerX\" id=\"z8U-Qn-18F\"/>\n                </constraints>\n            </view>\n            <toolbar key=\"toolbar\" implicitIdentifier=\"4E8F7D04-C6F6-4332-9275-2E196CE4C00D\" autosavesConfiguration=\"NO\" allowsUserCustomization=\"NO\" displayMode=\"iconAndLabel\" sizeMode=\"regular\" id=\"efW-Dl-DKe\">\n                <allowedToolbarItems>\n                    <toolbarItem implicitItemIdentifier=\"41FB1287-1644-4E0F-ABDF-F1B8DE5F7D02\" label=\"\" paletteLabel=\"Title\" id=\"FsU-xO-ibZ\">\n                        <nil key=\"toolTip\"/>\n                        <size key=\"minSize\" width=\"38\" height=\"17\"/>\n                        <size key=\"maxSize\" width=\"999\" height=\"17\"/>\n                        <textField key=\"view\" autoresizesSubviews=\"NO\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" id=\"JTo-IS-gwL\">\n                            <rect key=\"frame\" x=\"0.0\" y=\"14\" width=\"38\" height=\"17\"/>\n                            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n                            <textFieldCell key=\"cell\" lineBreakMode=\"truncatingTail\" allowsUndo=\"NO\" sendsActionOnEndEditing=\"YES\" alignment=\"center\" title=\"Title\" id=\"2wV-3j-3Ua\">\n                                <font key=\"font\" metaFont=\"system\"/>\n                                <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            </textFieldCell>\n                        </textField>\n                    </toolbarItem>\n                    <toolbarItem implicitItemIdentifier=\"A1F3FC40-8104-47CF-8A9B-655985198A73\" label=\"\" paletteLabel=\"Search\" id=\"RXB-U8-w3L\">\n                        <nil key=\"toolTip\"/>\n                        <size key=\"minSize\" width=\"160\" height=\"22\"/>\n                        <size key=\"maxSize\" width=\"180\" height=\"22\"/>\n                        <searchField key=\"view\" wantsLayer=\"YES\" verticalHuggingPriority=\"750\" id=\"JBB-tN-O6v\">\n                            <rect key=\"frame\" x=\"0.0\" y=\"14\" width=\"180\" height=\"22\"/>\n                            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n                            <searchFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" selectable=\"YES\" editable=\"YES\" borderStyle=\"bezel\" usesSingleLineMode=\"YES\" bezelStyle=\"round\" id=\"U5Q-hk-xi1\">\n                                <font key=\"font\" metaFont=\"system\"/>\n                                <color key=\"textColor\" name=\"controlTextColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                                <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            </searchFieldCell>\n                            <connections>\n                                <outlet property=\"delegate\" destination=\"-2\" id=\"EP3-ZM-60F\"/>\n                            </connections>\n                        </searchField>\n                    </toolbarItem>\n                    <toolbarItem implicitItemIdentifier=\"NSToolbarFlexibleSpaceItem\" id=\"rer-at-Szw\"/>\n                </allowedToolbarItems>\n                <defaultToolbarItems>\n                    <toolbarItem reference=\"rer-at-Szw\"/>\n                    <toolbarItem reference=\"FsU-xO-ibZ\"/>\n                    <toolbarItem reference=\"rer-at-Szw\"/>\n                    <toolbarItem reference=\"RXB-U8-w3L\"/>\n                </defaultToolbarItems>\n            </toolbar>\n            <connections>\n                <outlet property=\"delegate\" destination=\"-2\" id=\"jgf-ao-57N\"/>\n                <outlet property=\"initialFirstResponder\" destination=\"pZo-lC-m6V\" id=\"3uF-eS-ZkB\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"944.5\" y=\"583.5\"/>\n        </window>\n    </objects>\n    <resources>\n        <image name=\"RealmFileIcon\" width=\"512\" height=\"512\"/>\n    </resources>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/UsernameCredentialView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G31\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMUsernameCredentialViewController\">\n            <connections>\n                <outlet property=\"passwordTextField\" destination=\"vsR-eN-OAy\" id=\"vW9-FS-p7R\"/>\n                <outlet property=\"usernameTextField\" destination=\"uis-jf-G5i\" id=\"Adt-Wa-B0v\"/>\n                <outlet property=\"view\" destination=\"c22-O7-iKe\" id=\"uOD-Yc-Q9R\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <customView id=\"c22-O7-iKe\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"94\"/>\n            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMinY=\"YES\"/>\n            <subviews>\n                <textField verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"uis-jf-G5i\">\n                    <rect key=\"frame\" x=\"94\" y=\"52\" width=\"366\" height=\"22\"/>\n                    <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" selectable=\"YES\" editable=\"YES\" sendsActionOnEndEditing=\"YES\" state=\"on\" borderStyle=\"bezel\" placeholderString=\"\" drawsBackground=\"YES\" id=\"LWf-ZJ-yTy\">\n                        <font key=\"font\" metaFont=\"system\"/>\n                        <color key=\"textColor\" name=\"textColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n                <secureTextField verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"vsR-eN-OAy\">\n                    <rect key=\"frame\" x=\"94\" y=\"20\" width=\"366\" height=\"22\"/>\n                    <secureTextFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" selectable=\"YES\" editable=\"YES\" sendsActionOnEndEditing=\"YES\" borderStyle=\"bezel\" placeholderString=\"\" drawsBackground=\"YES\" usesSingleLineMode=\"YES\" id=\"vb9-RU-ha1\">\n                        <font key=\"font\" metaFont=\"system\"/>\n                        <color key=\"textColor\" name=\"textColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"textBackgroundColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <allowedInputSourceLocales>\n                            <string>NSAllRomanInputSourcesLocaleIdentifier</string>\n                        </allowedInputSourceLocales>\n                    </secureTextFieldCell>\n                </secureTextField>\n                <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"v3g-Ga-eb6\">\n                    <rect key=\"frame\" x=\"18\" y=\"23\" width=\"70\" height=\"17\"/>\n                    <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" alignment=\"right\" title=\"Password:\" id=\"yjC-KK-nke\">\n                        <font key=\"font\" metaFont=\"system\"/>\n                        <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n                <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"snX-Ep-3hA\">\n                    <rect key=\"frame\" x=\"18\" y=\"55\" width=\"70\" height=\"17\"/>\n                    <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" alignment=\"right\" title=\"Username:\" id=\"hRa-md-PKx\">\n                        <font key=\"font\" metaFont=\"system\"/>\n                        <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                    </textFieldCell>\n                </textField>\n            </subviews>\n            <constraints>\n                <constraint firstItem=\"snX-Ep-3hA\" firstAttribute=\"leading\" secondItem=\"c22-O7-iKe\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"1I4-xO-pQr\"/>\n                <constraint firstAttribute=\"trailing\" secondItem=\"uis-jf-G5i\" secondAttribute=\"trailing\" constant=\"20\" id=\"8dx-eg-GbT\"/>\n                <constraint firstItem=\"v3g-Ga-eb6\" firstAttribute=\"width\" secondItem=\"snX-Ep-3hA\" secondAttribute=\"width\" id=\"FwP-Vf-ldB\"/>\n                <constraint firstItem=\"vsR-eN-OAy\" firstAttribute=\"baseline\" secondItem=\"v3g-Ga-eb6\" secondAttribute=\"baseline\" id=\"Nva-1H-guE\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"vsR-eN-OAy\" secondAttribute=\"bottom\" constant=\"20\" id=\"TZB-hG-17G\"/>\n                <constraint firstItem=\"v3g-Ga-eb6\" firstAttribute=\"leading\" secondItem=\"c22-O7-iKe\" secondAttribute=\"leading\" constant=\"20\" id=\"bOv-go-Wan\"/>\n                <constraint firstItem=\"uis-jf-G5i\" firstAttribute=\"baseline\" secondItem=\"snX-Ep-3hA\" secondAttribute=\"baseline\" id=\"euk-wg-8iS\"/>\n                <constraint firstItem=\"uis-jf-G5i\" firstAttribute=\"leading\" secondItem=\"snX-Ep-3hA\" secondAttribute=\"trailing\" constant=\"8\" symbolic=\"YES\" id=\"gKe-TP-tKR\"/>\n                <constraint firstAttribute=\"trailing\" secondItem=\"vsR-eN-OAy\" secondAttribute=\"trailing\" constant=\"20\" id=\"irv-zE-FYH\"/>\n                <constraint firstItem=\"vsR-eN-OAy\" firstAttribute=\"leading\" secondItem=\"v3g-Ga-eb6\" secondAttribute=\"trailing\" constant=\"8\" symbolic=\"YES\" id=\"k11-Yj-cRk\"/>\n                <constraint firstItem=\"vsR-eN-OAy\" firstAttribute=\"top\" secondItem=\"uis-jf-G5i\" secondAttribute=\"bottom\" constant=\"10\" id=\"uSq-zh-qG1\"/>\n                <constraint firstItem=\"uis-jf-G5i\" firstAttribute=\"top\" secondItem=\"c22-O7-iKe\" secondAttribute=\"top\" constant=\"20\" id=\"xLY-wd-OIC\"/>\n            </constraints>\n            <point key=\"canvasLocation\" x=\"794\" y=\"424\"/>\n        </customView>\n    </objects>\n</document>\n"
  },
  {
    "path": "RealmBrowserSync/Resources/WelcomeWindow.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.Cocoa.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G1004\" targetRuntime=\"MacOSX.Cocoa\" propertyAccessControl=\"none\" useAutolayout=\"YES\" customObjectInstantitationMethod=\"direct\">\n    <dependencies>\n        <deployment identifier=\"macosx\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.CocoaPlugin\" version=\"10117\"/>\n    </dependencies>\n    <objects>\n        <customObject id=\"-2\" userLabel=\"File's Owner\" customClass=\"RLMWelcomeWindowController\">\n            <connections>\n                <outlet property=\"versionLabel\" destination=\"d8y-tU-We2\" id=\"Ixo-dt-jlm\"/>\n                <outlet property=\"window\" destination=\"QvC-M9-y7g\" id=\"tPn-hU-CKU\"/>\n            </connections>\n        </customObject>\n        <customObject id=\"-1\" userLabel=\"First Responder\" customClass=\"FirstResponder\"/>\n        <customObject id=\"-3\" userLabel=\"Application\" customClass=\"NSObject\"/>\n        <window allowsToolTipsWhenApplicationIsInactive=\"NO\" autorecalculatesKeyViewLoop=\"NO\" restorable=\"NO\" oneShot=\"NO\" releasedWhenClosed=\"NO\" showsToolbarButton=\"NO\" visibleAtLaunch=\"NO\" animationBehavior=\"alertPanel\" id=\"QvC-M9-y7g\">\n            <windowStyleMask key=\"styleMask\" titled=\"YES\" closable=\"YES\" fullSizeContentView=\"YES\"/>\n            <windowPositionMask key=\"initialPositionMask\" leftStrut=\"YES\" rightStrut=\"YES\" topStrut=\"YES\" bottomStrut=\"YES\"/>\n            <rect key=\"contentRect\" x=\"196\" y=\"240\" width=\"328\" height=\"356\"/>\n            <rect key=\"screenRect\" x=\"0.0\" y=\"0.0\" width=\"1280\" height=\"777\"/>\n            <view key=\"contentView\" id=\"EiT-Mj-1SZ\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"328\" height=\"356\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <imageView horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"HT7-i3-OIV\">\n                        <rect key=\"frame\" x=\"100\" y=\"208\" width=\"128\" height=\"128\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"width\" constant=\"128\" id=\"31v-S2-i97\"/>\n                            <constraint firstAttribute=\"height\" constant=\"128\" id=\"StA-4I-FIs\"/>\n                        </constraints>\n                        <imageCell key=\"cell\" refusesFirstResponder=\"YES\" alignment=\"left\" imageScaling=\"proportionallyDown\" image=\"NSApplicationIcon\" id=\"WyG-Ay-hEy\"/>\n                    </imageView>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Gv9-Uj-hma\">\n                        <rect key=\"frame\" x=\"74\" y=\"100\" width=\"180\" height=\"25\"/>\n                        <buttonCell key=\"cell\" type=\"roundTextured\" title=\"Open Realm File\" bezelStyle=\"texturedRounded\" imagePosition=\"left\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"r7d-tb-9Z4\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"openRealmFile:\" target=\"-2\" id=\"ONh-eX-JOZ\"/>\n                        </connections>\n                    </button>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"fja-zK-Fr7\">\n                        <rect key=\"frame\" x=\"74\" y=\"70\" width=\"180\" height=\"25\"/>\n                        <buttonCell key=\"cell\" type=\"roundTextured\" title=\"Open Realm URL\" bezelStyle=\"texturedRounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"NTX-Yk-erf\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"openRealmURL:\" target=\"-2\" id=\"Nut-E7-DzJ\"/>\n                        </connections>\n                    </button>\n                    <button verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Km5-cx-yXx\">\n                        <rect key=\"frame\" x=\"74\" y=\"28\" width=\"180\" height=\"25\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"width\" constant=\"180\" id=\"3jZ-Qi-YCW\"/>\n                        </constraints>\n                        <buttonCell key=\"cell\" type=\"roundTextured\" title=\"Connect to Object Server\" bezelStyle=\"texturedRounded\" alignment=\"center\" borderStyle=\"border\" imageScaling=\"proportionallyDown\" inset=\"2\" id=\"pSs-le-9RI\">\n                            <behavior key=\"behavior\" pushIn=\"YES\" lightByBackground=\"YES\" lightByGray=\"YES\"/>\n                            <font key=\"font\" metaFont=\"system\"/>\n                        </buttonCell>\n                        <connections>\n                            <action selector=\"connecToServer:\" target=\"-2\" id=\"aVy-d4-PAQ\"/>\n                        </connections>\n                    </button>\n                    <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"nne-hB-R5G\">\n                        <rect key=\"frame\" x=\"26\" y=\"161\" width=\"277\" height=\"27\"/>\n                        <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" title=\"Welcome to Realm Browser\" id=\"Kmz-bP-M1u\">\n                            <font key=\"font\" size=\"22\" name=\"HelveticaNeue\"/>\n                            <color key=\"textColor\" name=\"labelColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                    </textField>\n                    <textField horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"750\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"d8y-tU-We2\">\n                        <rect key=\"frame\" x=\"148\" y=\"144\" width=\"32\" height=\"17\"/>\n                        <textFieldCell key=\"cell\" scrollable=\"YES\" lineBreakMode=\"clipping\" sendsActionOnEndEditing=\"YES\" title=\"1.0.2\" id=\"irQ-aA-UVg\">\n                            <font key=\"font\" metaFont=\"system\"/>\n                            <color key=\"textColor\" name=\"headerColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                            <color key=\"backgroundColor\" name=\"controlColor\" catalog=\"System\" colorSpace=\"catalog\"/>\n                        </textFieldCell>\n                    </textField>\n                </subviews>\n                <constraints>\n                    <constraint firstItem=\"HT7-i3-OIV\" firstAttribute=\"centerX\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"centerX\" id=\"6im-Ie-oiv\"/>\n                    <constraint firstItem=\"nne-hB-R5G\" firstAttribute=\"centerX\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"centerX\" id=\"CJa-Nv-yZa\"/>\n                    <constraint firstItem=\"Km5-cx-yXx\" firstAttribute=\"width\" secondItem=\"Gv9-Uj-hma\" secondAttribute=\"width\" id=\"DsA-2P-Q7W\"/>\n                    <constraint firstItem=\"fja-zK-Fr7\" firstAttribute=\"top\" secondItem=\"Gv9-Uj-hma\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"Irp-R2-u8n\"/>\n                    <constraint firstItem=\"HT7-i3-OIV\" firstAttribute=\"top\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"top\" constant=\"20\" id=\"Jew-t3-IrO\"/>\n                    <constraint firstAttribute=\"bottom\" secondItem=\"Km5-cx-yXx\" secondAttribute=\"bottom\" constant=\"30\" id=\"LCG-fE-eV3\"/>\n                    <constraint firstItem=\"Gv9-Uj-hma\" firstAttribute=\"top\" secondItem=\"d8y-tU-We2\" secondAttribute=\"bottom\" constant=\"20\" id=\"MGq-YU-Djr\"/>\n                    <constraint firstItem=\"d8y-tU-We2\" firstAttribute=\"centerX\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"centerX\" id=\"SzY-aW-7Av\"/>\n                    <constraint firstItem=\"HT7-i3-OIV\" firstAttribute=\"leading\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"leading\" constant=\"100\" id=\"UYL-Mn-Afc\"/>\n                    <constraint firstItem=\"d8y-tU-We2\" firstAttribute=\"top\" secondItem=\"nne-hB-R5G\" secondAttribute=\"bottom\" id=\"aLi-2a-h02\"/>\n                    <constraint firstItem=\"Gv9-Uj-hma\" firstAttribute=\"centerX\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"centerX\" id=\"jli-d5-B9X\"/>\n                    <constraint firstItem=\"nne-hB-R5G\" firstAttribute=\"top\" secondItem=\"HT7-i3-OIV\" secondAttribute=\"bottom\" constant=\"20\" id=\"lwI-45-UWG\"/>\n                    <constraint firstItem=\"Km5-cx-yXx\" firstAttribute=\"top\" secondItem=\"fja-zK-Fr7\" secondAttribute=\"bottom\" constant=\"20\" id=\"oHU-TY-cYN\"/>\n                    <constraint firstItem=\"fja-zK-Fr7\" firstAttribute=\"centerX\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"centerX\" id=\"oaw-4P-xkV\"/>\n                    <constraint firstItem=\"fja-zK-Fr7\" firstAttribute=\"width\" secondItem=\"Gv9-Uj-hma\" secondAttribute=\"width\" id=\"sfZ-wF-rU5\"/>\n                    <constraint firstItem=\"Km5-cx-yXx\" firstAttribute=\"centerX\" secondItem=\"EiT-Mj-1SZ\" secondAttribute=\"centerX\" id=\"zaQ-vZ-HyV\"/>\n                </constraints>\n            </view>\n            <point key=\"canvasLocation\" x=\"895\" y=\"585\"/>\n        </window>\n    </objects>\n    <resources>\n        <image name=\"NSApplicationIcon\" width=\"128\" height=\"128\"/>\n    </resources>\n</document>\n"
  },
  {
    "path": "RealmBrowserTests/RLMTestObjects.h",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import Realm;\n\n@interface RealmObject1 : RLMObject\n@property NSInteger intProp;\n@property NSString *stringProp;\n@end\n\n@interface RealmObjectWithoutStoredProperties : RLMObject\n@property NSString *stringProp;\n@end\n"
  },
  {
    "path": "RealmBrowserTests/RLMTestObjects.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n#import \"RLMTestObjects.h\"\n\n@implementation RealmObject1\n@end\n\n@implementation RealmObjectWithoutStoredProperties\n\n+ (NSArray *)ignoredProperties {\n    return @[@\"stringProp\"];\n}\n\n@end\n"
  },
  {
    "path": "RealmBrowserTests/RealmBrowserTests.m",
    "content": "////////////////////////////////////////////////////////////////////////////\n//\n// Copyright 2014-2015 Realm Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n////////////////////////////////////////////////////////////////////////////\n\n@import XCTest;\n@import Realm;\n@import Realm.Private;\n@import Realm.Dynamic;\n#import \"RLMTestObjects.h\"\n#import \"RLMTestDataGenerator.h\"\n#import \"RLMRealmNode.h\"\n\n@interface RealmBrowserTests : XCTestCase\n\n@end\n\n@implementation RealmBrowserTests\n\n- (NSURL *)urlForGeneratedTestRealmWithClassNames:(NSArray *)classNames count:(NSInteger)count encryptionKey:(NSData *)encryptionKey\n{\n    NSString *fileName = [NSString stringWithFormat:@\"%@.realm\", [[NSUUID UUID] UUIDString]];\n    NSURL *fileURL = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:fileName]];\n    @autoreleasepool {\n        BOOL success = [RLMTestDataGenerator createRealmAtUrl:fileURL withClassesNamed:classNames objectCount:count encryptionKey:encryptionKey];\n        XCTAssertEqual(YES, success);\n    }\n    \n    return fileURL;\n}\n\n- (void)testGenerateDemoDatabase\n{\n    NSURL *fileURL = [self urlForGeneratedTestRealmWithClassNames:@[[RealmObject1 className]] count:10 encryptionKey:nil];\n    XCTAssertNotNil(fileURL);\n    \n    RLMRealmConfiguration *configuration = [[RLMRealmConfiguration alloc] init];\n    configuration.fileURL = fileURL;\n    configuration.dynamic = YES;\n    configuration.customSchema = nil;\n    \n    NSError *error = nil;\n    RLMRealm *realm = [RLMRealm realmWithConfiguration:configuration error:&error];\n    XCTAssertNil(error);\n    XCTAssertNotNil(realm);\n    XCTAssertEqual(10, [[realm allObjects:[RealmObject1 className]] count]);\n}\n\n// FIXME: Re-enable these tests\n//- (void)testDoesNotShowObjectsWithNoPersistedProperties {\n//    NSURL *fileURL = [self urlForGeneratedTestRealmWithClassNames:@[[RealmObjectWithoutStoredProperties className]] count:10 encryptionKey:nil];\n//    XCTAssertNotNil(fileURL);\n//    \n//    NSError *error = nil;\n//    RLMRealmNode *realmNode = [[RLMRealmNode alloc] initWithName:@\"name\" url:fileURL.path];\n//    XCTAssertTrue([realmNode connect:&error]);\n//    XCTAssertNil(error);\n//    XCTAssertNotNil(realmNode.topLevelClasses);\n//    for (RLMClassNode *node in realmNode.topLevelClasses) {\n//        XCTAssertNotEqualObjects(@\"RealmObjectWithoutStoredProperties\", node.name);\n//    }\n//}\n//\n//- (void)testEncryptedRealmNode\n//{\n//    NSMutableData *key = [NSMutableData dataWithLength:64];\n//    SecRandomCopyBytes(kSecRandomDefault, key.length, (uint8_t *)key.mutableBytes);\n//    \n//    NSURL *fileURL = [self urlForGeneratedTestRealmWithClassNames:@[[RealmObject1 className]] count:10 encryptionKey:key];\n//    XCTAssertNotNil(fileURL);\n//    \n//    RLMRealmNode *testNode = [[RLMRealmNode alloc] initWithName:@\"Test Realm\" url:fileURL.path];\n//    XCTAssertNotNil(testNode);\n//    \n//    //Ensure the Realm file was successfully processed by the node object\n//    XCTAssertTrue([testNode.name isEqualToString:@\"Test Realm\"]);\n//    \n//    //Check to make sure the encrypted Realm DOES NOT open without the key\n//    XCTAssertFalse([testNode connect:nil]);\n//    \n//    //Pass the encryption key to the node\n//    testNode.encryptionKey = key;\n//    \n//    //Ensure the data in the Realm file is accessible\n//    NSLog(@\"Classes %@\",testNode.topLevelClasses);\n//    XCTAssertNotNil(testNode.topLevelClasses);\n//}\n\n@end\n"
  },
  {
    "path": "RealmBrowserTests/Supporting Files/RealmBrowserTests-Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>3.0.0-beta.2</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>97</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "RealmBrowserTests/Supporting Files/en.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\n"
  },
  {
    "path": "fastlane/Appfile",
    "content": "app_identifier \"io.realm.realmbrowser\"\nteam_id \"QX5CR2FTN2\"\n"
  },
  {
    "path": "fastlane/Fastfile",
    "content": "# Make sure that the environment variable below are defined before\n# running :build with submit_to_XXX arguments\n#\n# HOCKEY_API_TOKEN – HockeyApp API token that has persimmision to upload builds\n# HOCKEY_APP_ID – HockeyApp public application identifier, optional while all apps have different bundle ids\n#\n# ITC_USERNAME and FASTLANE_PASSWORD should be set to iTunes Connect credentials\n#\n\nfastlane_version \"2.1.1\"\n\ndesc \"Increments version and build number\"\nlane :next_version do |options|\n  increment_build_number(\n    build_number: options[:build_number]\n  )\n  \n  increment_version_number(\n    bump_type: options[:type],\n    version_number: options[:version_number]\n  )\nend\n\ndesc \"Runs all the tests\"\nlane :test do\n  cocoapods(repo_update: true)\n  scan(scheme: \"Realm Browser\")\nend\n\ndesc \"Build the new realease for MAS and GitHub, submit build to ITC and upload dSYM files to HockeyApp\"\nlane :build do |options|\n  buildDir = \"build\"\n  versionNumber = get_version_number\n  gitHubArchiveName = \"RealmBrowser-#{versionNumber}.zip\"\n  dSymArhiveName = \"Realm Browser.app.dSYM.zip\"\n  \n  cocoapods(repo_update: true)\n\n  # build an archive and export dSYM files\n  gym(\n    scheme: \"Realm Browser\",\n    clean: true,\n    output_directory: buildDir,\n    buildlog_path: buildDir,\n  )\n\n  # export pkg for ITC\n  xcexport({export_options_plist: {method: \"app-store\"}, export_path: buildDir})\n\n  # export Developer ID signed app for GitHub release\n  xcexport({export_options_plist: {method: \"developer-id\"}, export_path: buildDir})\n\n  # archive the Developer ID signed app\n  Dir.chdir \"../#{buildDir}\" do\n    sh(\"zip --symlinks -r \\\"#{gitHubArchiveName}\\\" \\\"Realm Browser.app\\\"\")\n    sh(\"rm -rf \\\"Realm Browser.app\\\"\")\n  end\n\n  # delete incorrect ipa path in lane context\n  Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = nil\n\n  # fix dSYM path\n  Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH] = \"#{buildDir}/#{dSymArhiveName}\"\n  \n  if options[:submit_to_itc]\n    deliver(\n      username: ENV['ITC_USERNAME'],\n      app_version: \"#{versionNumber}\",\n      pkg: \"#{buildDir}/Realm Browser.pkg\",\n      skip_screenshots: true,\n      skip_metadata: true\n    )\n  end\n\n  if options[:submit_to_hockey]\n    hockey(\n      api_token: ENV['HOCKEY_API_TOKEN'],\n      ipa: \"#{buildDir}/#{gitHubArchiveName}\", # should be specified to create a new version\n      dsym: \"#{buildDir}/#{dSymArhiveName}\",\n      strategy: \"replace\" # this will not replace symbols but add the new ones, we don're really care about app itself anyway\n    )\n  end\nend\n"
  },
  {
    "path": "fastlane/README.md",
    "content": "fastlane documentation\n================\n# Installation\n\nMake sure you have the latest version of the Xcode command line tools installed:\n\n```\nxcode-select --install\n```\n\n## Choose your installation method:\n\n<table width=\"100%\" >\n<tr>\n<th width=\"33%\"><a href=\"http://brew.sh\">Homebrew</a></td>\n<th width=\"33%\">Installer Script</td>\n<th width=\"33%\">Rubygems</td>\n</tr>\n<tr>\n<td width=\"33%\" align=\"center\">macOS</td>\n<td width=\"33%\" align=\"center\">macOS</td>\n<td width=\"33%\" align=\"center\">macOS or Linux with Ruby 2.0.0 or above</td>\n</tr>\n<tr>\n<td width=\"33%\"><code>brew cask install fastlane</code></td>\n<td width=\"33%\"><a href=\"https://download.fastlane.tools\">Download the zip file</a>. Then double click on the <code>install</code> script (or run it in a terminal window).</td>\n<td width=\"33%\"><code>sudo gem install fastlane -NV</code></td>\n</tr>\n</table>\n\n# Available Actions\n### next_version\n```\nfastlane next_version\n```\nIncrements version and build number\n### test\n```\nfastlane test\n```\nRuns all the tests\n### build\n```\nfastlane build\n```\nBuild the new realease for MAS and GitHub, submit build to ITC and upload dSYM files to HockeyApp\n\n----\n\nThis README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run.\nMore information about fastlane can be found on [fastlane.tools](https://fastlane.tools).\nThe documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).\n"
  }
]