1.0.1 • Published 4 years ago
react-native-coredata v1.0.1
react-native-coredata
Getting started
$ npm install react-native-coredata --save
Mostly automatic installation
$ react-native link react-native-coredata
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-coredata
and addRNCoredata.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNCoredata.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNCoredataPackage;
to the imports at the top of the file - Add
new RNCoredataPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-coredata' project(':react-native-coredata').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-coredata/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-coredata')
Windows
- In Visual Studio add the
RNCoredata.sln
innode_modules/react-native-coredata/windows/RNCoredata.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Coredata.RNCoredata;
to the usings at the top of the file - Add
new RNCoredataPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNCoredata from 'react-native-coredata';
// TODO: What to do with the module?
RNCoredata;