1.6.1 • Published 8 years ago
react-native-couchbase v1.6.1
react-native-couchbase
React native Couchbase allows to create a couchbase server.
Installation
npm install --save react-native-couchbase
or manually
git clone the directory to [node_modules/react-native-couchbase]
Guide
Initialising: How to start couchbase.
Functions: Available functions to interact with couchbase.
Events: All the different events emitted.
Setup
Android
- In
android/setting.gradle
...
include ':CouchBase', ':app'
project(':CouchBase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-couchbase/android')
- In
android/app/build.gradle
android {
...
// workaround for "duplicate files during packaging of APK" issue
// see https://groups.google.com/d/msg/adt-dev/bl5Rc4Szpzg/wC8cylTWuIEJ
packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}
dependencies {
...
compile project(':CouchBase')
}
give internet and network-state access, in
android/app/src/main/AndroidManifest.xml
:
<manifest ...>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
...
</manifest>
- register module (in MainActivity.java)
import com.upinion.CouchBase.CouchBasePackage; // <--- import
public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
......
/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new CouchBasePackage()
);
}
}
iOS
- Download Couchbase Mobile for iOS and add the libraries to the React native project, including CBLRegisterJSViewCompiler.h
- Add the project
RCTCouchBase
to the React Native project. - In
RCTCouchBase
, inHeader Search Paths
, add the route to your${react native mobile application}/node_modules/react-native/React
folder and also Frameworks headers - In the React Native project, you have to add the following frameworks and
libraries to your
Build phase
:- libCBJSViewCompiler.a
- libRCTCouchBase (from the product folder in RCTCouchBase)
- CouchbaseLite.framework
- CouchbaseLiteListener.framework
- CFNetwork.framework
- Security.framework
- SystemConfiguration.framework
- libsqlite3.dylib
- libz.dylib
- Compile
RCTCouchBase
and run the React native project.
1.6.1
8 years ago
1.6.0
8 years ago
1.5.1
8 years ago
1.5.0
8 years ago
1.4.6
8 years ago
1.4.5
8 years ago
1.3.4
9 years ago
1.3.3
9 years ago
1.3.2
9 years ago
1.3.1
9 years ago
1.3.0
9 years ago
1.2.1
9 years ago
1.1.9
9 years ago
1.1.8
9 years ago
1.1.7
9 years ago
1.1.6
9 years ago
1.1.5
9 years ago
1.1.4
9 years ago
1.1.3
9 years ago
1.1.2
9 years ago
1.1.1
10 years ago
1.1.0
10 years ago
1.0.5
10 years ago
1.0.4
10 years ago
1.0.3
10 years ago
1.0.2
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago