Realm is a mobile database: an alternative to SQLite & key-value stores https://realm.io
Go to file
Scott Kyle 83869e2193 Prevent memory leaks when adding listeners
Check if the callback has already been added to the set before protecting it. Vice versa for unprotecting it when removing the listener.
2015-11-03 02:43:29 -08:00
ReactNative change the license before starting the beta 2015-10-27 14:15:21 -07:00
RealmJS.xcodeproj apply newest object store changes 2015-10-26 15:27:43 -07:00
examples Update React Native to 0.13.2 2015-11-02 13:38:00 -08:00
lib Use a Set to store listener callbacks in JS 2015-11-03 02:41:52 -08:00
src Prevent memory leaks when adding listeners 2015-11-03 02:43:29 -08:00
tests Merge pull request #115 from realm/sk-fix-chrome-tests 2015-11-02 17:00:11 -08:00
vendor partial port of rpc server to cpp 2015-10-22 10:44:10 -07:00
.eslintrc Add ESLint config for JS test files 2015-10-21 15:20:44 -07:00
.gitignore Add some Node things to gitignore 2015-10-07 17:08:30 -07:00
.gitmodules Add GCDWebServer as a submodule at version 3.2.7 2015-10-07 17:36:22 -07:00
LICENSE add license 2015-10-27 14:15:28 -07:00
README.md Fix typo in README file 2015-11-02 20:30:35 +01:00

README.md

RealmJS

Realm is a mobile database that runs directly inside phones, tablets or wearables. This repository holds the source code for Realm's JavaScript bindings for integrating with mobile apps built using ReactNative and PhoneGap.

Setup

This repository uses submodules so you need to run git submodule update --init --recursive in the realm-js root directory before running any examples or including the project in your app.

ReactNative Example

Make sure your environment is set up to run react native applications. Follow the instructions here https://facebook.github.io/react-native/docs/getting-started.html.

The ReactNative example project is in the examples/ReactExample directory. You need to run npm install in this directory before running the example for the first time.

ReactNative Project Setup

  • Create a new ReactNative project react-native init <project-name> and open the generated XCode project.
  • Drag RealmJS.xcodeproj into the Libraries folder in your project.
  • Drag RealmReact.framework from the Products directory under RealmJS.xcodeproj into the Embedded Libraries section in the General tab for your app's target settings. This bundles the library with your app.
  • In the Build Phases tab for your app's target settings, add RealmReact.framework in the Target Dependencies and Link Binary with Library build phases.
  • In your app's package.json file, add the realm dependency with a path to the realm-js/lib folder like this: "realm": "file:path/to/realm-js/lib" (symlinks are not yet supported by the React Native packager, see issue #637).
  • You can now require('realm') in your app's JS to use Realm!

Documentation

Currently there is no documentation for the ReactNative apis. You can see examples of how to use the apis in the example app and in the js test files here: https://github.com/realm/realm-js/tree/master/tests

License

Copyright 2015 Realm Inc - All Rights Reserved Proprietary and Confidential