realm-js/README.md

19 lines
1.3 KiB
Markdown
Raw Normal View History

2015-08-13 17:29:37 +00:00
# RealmJS
RealmJS contains Realm bindings for integrating with mobile apps built using javascript frameworks such as ReactNative and PhoneGap.
2015-10-20 22:41:22 +00:00
RealmJS 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.
2015-08-13 17:39:51 +00:00
## ReactNative Example
2015-08-24 16:26:51 +00:00
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 to the point you have installed the react-native-cli.
The ReactNative sample project is in the `examples/ReactExample` directory. You must run `npm install` in this directory before running the example for the first time.
2015-08-13 17:39:51 +00:00
## ReactNative Project Setup
2015-08-13 17:29:37 +00:00
- 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.
- In the target for your application, add `libRealmReact.a` in the `Link Binary with Library` build phase.
- Use Realm in your app.
2015-09-04 17:11:11 +00:00
- Drag `RealmJS.framework` from the `Products` directory under `RealmJS.xcodeproj` into the `Embedded Libraries` section in the `General` tab for you app's target settings. This bundles the library with your app.
2015-08-13 17:29:37 +00:00