Giter Site home page Giter Site logo

react-native-couchbase-lite's Introduction

โš ๏ธ This repo is obsolete. It is no longer maintained and is based on a version of Couchbase Lite that reached end of life years ago. Please see the new version of this repo for more up to date information.

react-native-couchbase-lite

NOTE: This plugin works for Couchbase Lite 1.x only. For new projects, we recommend to use the Couchbase Lite 2.0 Native API and to write your own wrapper to access Couchbase Lite APIs from a JavaScript codebase (see https://facebook.github.io/react-native/docs/communication-ios.html).

Disclaimer

This package is not an official couchbase plugin and is not supported in any way by couchbase. If you have issues with it please do not use the couchbase forums but raise an issue here instead. Although this package does work as described it may not be fully featured and may not be suitable for your requirements. This package is just a thin layer over the CBL REST API, PRs and suggestions are welcome!

Couchbase Lite binding for react-native on both iOS and Android. It works by exposing some functionality to the native Couchbase Lite and the remaining actions are peformed via the REST API.

Installation

  1. Create a new React Native project.

    react-native init <project-name>
  2. Navigate to your project directory and install the plugin.

    cd <project-name>
    npm install react-native-couchbase-lite --save
  3. Link the native libraries.

    react-native link react-native-couchbase-lite
    

    iOS only

    Download the Couchbase Lite iOS SDK from here and drag CouchbaseLite.framework, CouchbaseLiteListener.framework, CBLRegisterJSViewCompiler.h, libCBLJSViewCompiler.a in the Xcode project.

Make sure these files can be resolved via Framework Search Paths in the XCODE projects Build settings, either by adding them to one of the mentioned directories or adding a new location in the list.

  1. Start React Native.

    react-native start
  2. Build and run for iOS/Android.

Note: If you wish to install the plugin from source, refer to the other installation options page.

Getting Started

In your app's entrypoint file, import the plugin and initialize the Couchbase Lite Listener.

import Couchbase from "react-native-couchbase-lite";

Couchbase.initRESTClient(manager => {
	// use manager to perform operations
});

The manager is the Couchbase Lite entrypoint to perform different operations.

Documentation

The full API is derived from the Couchbase Lite Swagger spec.

The API is self documented through the help() method. You can print the list of tags for an endpoint.

Couchbase.initRESTClient(manager => {
	// use manager to perform operations
	manager.help();    // prints all tags and endpoints
});

Once you know the kind of operation to perform, you can print all the endpoints available on a particular tag.

Couchbase.initRESTClient(manager => {
	// use manager to perform operations
	manager.database.help();    // prints all endpoints for the database tag
});

End finally drill down on a particular endpoint for the operation you wish to perform.

Couchbase.initRESTClient(manager => {
	// use manager to perform operations
	manager.database.put_db.help(); // prints the list of parameters for PUT /{db}
});

As you can see, there are two parameters to provide (db and body). The same exact parameters are documented on the /{db}}/_bulk_docs endpoint.

Publishing to npm

  1. Bump the version number in package.json.
  2. Run npm publish locally (it will fail if you don't access rights to publish to npm for this module).

react-native-couchbase-lite's People

Contributors

adamski avatar benjick avatar blairio avatar borrrden avatar danlannz avatar denissb avatar fraserxu avatar freakinruben avatar iwater avatar jamesnocentini avatar npomfret avatar pasin avatar rghorbani avatar sambwest avatar ugendrang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-couchbase-lite's Issues

CouchbaseLite/CouchbaseLite.h not found

I followed the XCode instructions in the README, but no matter what I try I get a build error saying that 'CouchbaseLite/CouchbaseLite.h' file not found

I've added the Couchbase frameworks to the project and I've added all of the dependencies specified in the README, but for whatever reason the build fails on ReactCBLite.

https://i.imgur.com/fqd8xnX.png

Any ideas?

Spurious 401 responses from CBL

My app receives occasional 401 responses when loading documents via the rest API. I see this in the logs of my react-native app:

{ _bodyInit: '',
_bodyText: '',
type: 'default',
url: 'http://admin:pass@localhost:5984/datr_20160315t183202246z_user3/2fd6e2791cb315363b23d5ab6d4b5a4b',
status: 401,
ok: false,
statusText: undefined,
headers:
{ map:
{ 'accept-ranges': [ 'bytes' ],
'www-authenticate': [ 'Digest realm="CouchbaseLite", qop="auth", nonce="474ED7F2-EF1F-4821-B0D0-61BD6294CA18"' ],
'content-length': [ '0' ],
date: [ 'Thu, 17 Mar 2016 14:27:04 GMT' ] } } }

The current user definitely has access to the document. If they didn't why would it be on the device, right? Subsequent requests for the same document work fine.

Querying views

I'm having an issue querying a view that as a compound key (of 2 items). The url I am constructing is returning the entire view, but what I want is a subset of that view. From the docs I understand that I need to specify a startKey and endKey as url parameters.

The startKey should be an array of 1 item. Correct?

The endKey should be an array of 2 items, the 1st being the same as my startKey and the 2nd being an empty object {}. Correct?

So I now have json arrays in my url as parameters. Should they be url encoded? It doesn't seem to matter if I do or don't, I still get the full view back. Is a GET the wrong method?

I guess my question is, how do I construct an http request to query a view with a compound key?

Finally, (and I think maybe unrelated) I notice form the source code on index.js makeRequest function that the 3rd argument is called params which gets passed to the fetch (as settings.params). I can't see anything in the fetch docs called params?? Is this params object supposed to be url parameters? I which case I think the makeRequest function needs to be altered, maybe something like this:

makeRequest: function(method, url, params, data) {
    var queryString = "";

    if(params) {
      var bits = [];

      for(var key in params) {
        var value = options[key];
        var jsonValue = JSON.stringify(value);
        var part = key + "=" + encodeURIComponent(jsonValue);
        bits.push(part);
      }

      queryString = "?" + bits.join("&");
    }

    var fullUrl = url + queryString;

    var settings = {
      method: method,
      headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json',
        'Authorization': this.authHeader
      }
    };

    if (data) {
      settings.body = JSON.stringify(data);
    }
    return fetch(fullUrl, settings).then((res) => {
      if (res.status == 401) {
        console.log(res);
      }
      return res.json();
    }).catch((err) => { throw err; });
  }

saveAttachment progress

Is there a way to pull the progress of the download via the saveAttachment function.

I went through the code and see you are setting progress via android onProgressUpdate, however I am not sure where to pull this logged data from?

Log.d(TAG, "Uploaded", Arrays.toString(values));

Documentation questions

Hi there,

Thanks for creating this. Couple questions for you from a newbie.

Can you describe what the auth story is in more depth? When does the username and password get transferred over the wire to the sync gateway? I'd assume it is just during the login and then once that happens cblite will cache the cookie and will use it until it expires. What happens at expiration?

In the android instructions I see where I'd put my couchbase URL, but not for iOS. How does ios know what db url I want to use?

Thanks much.

continuous replication from sync_gateway freezes

I noticed that sometimes the CBL Pull replication just stops syncing with the sync_gateway. I need to stop and restart the app to get the replication working again (cmd + r doesn't help).

When I look at http://yonahs-macbook-pro-2.local:5984/_active_tasks both the pull and push replication have a status of idle. When I make changes to a document on the sync_gateway, the changes don't get pulled down to the app.

I've been trying to figure out the steps to reproduce this issue. Here is the closest I've gotten so far: https://github.com/yonahforst/couchbase-react-native-test

  1. clone, npm i, and run the app on the iOS simulator.
  2. start a sync_gateway server with a database named test (you can use the sync_gateway.json from the repo)
  3. open http://localhost:4985/_admin/db/test/documents/1234 in your browser and start hitting the save button. The first save will create the document, subsequent saves will increment the rev number. You should see the rev number incrementing in the simulator too.

Ok, this doesn't reproduce my issue exactly, but I found something similar where the listener stops updating the view at around rev 9 and 99 ( i haven't made it to 999)

Getting started - compile problem

After dragging the libraries and frameworks into my Xcode project I'm getting a compile error:

ReactCBLite.m:15:9: 'CBLRegisterJSViewCompiler.h' file not found

However, as you can see from the screen shot, the file is there. I'm quite stuck on this - any ideas?

screen shot 2016-01-20 at 12 18 30

getting sporadic 401 responses

My application is receiving intermittent 401 errors from CBLite. Sometimes just one or two, but eventually 100% of requests fail (and it seems to causes very high CPU load).

Do I need to refresh the session periodically?

{ _bodyInit: '',
  _bodyText: '',
  type: 'default',
  url: 'http://admin:pass@localhost:5984/myapp/-7B-cilWnWogJzIQ_xTsLYP',
  status: 401,
  ok: false,
  statusText: undefined,
  headers: 
   { map: 
      { 'accept-ranges': [ 'bytes' ],
        'content-length': [ '0' ],
        'www-authenticate': [ 'Digest realm="CouchbaseLite", qop="auth", nonce="4D0A64E6-84AA-40E1-A8E0-F2CC8A524396"' ],
        date: [ 'Thu, 03 Mar 2016 10:06:12 GMT' ] } } }

LiveQuery support

Any plans to add livequery support? You probably won't be able to use react-native's new promise resolve/reject but maybe with the older callbacks?

Wake up listener when push notification received

I'm trying to wake the listener when I receive a push notification. I found this:

(BOOL) suspended
readwriteatomic
Suspends/resumes a replication.

On iOS a replication will suspend itself when the app goes into the background, and resume when the app is re-activated. If your app receives a push notification while suspended and needs to run the replication to download new data, your handler should set suspended to NO to resume replication, and then set the property back to YES when it's done.

https://couchbase.github.io/couchbase-lite-ios/docs/html/interfaceCBLReplication.html

Anyone know why this means!?

New ReactCBLite.init API breaks my project

The new API introduced in commit eec870b breaks my project. I don't understand the random username and password generation.

Please try and avoid breaking changes unless deemed necessary and if so please consult affected users. Thanks!

allow username and password to be specified

We should re-allow users to specify a username/password for the listener in case they want to access the database from outside the app (e.g. P2P replication). Perhaps we can still generate a random username/password if they leave it blank.

updateDocument should work with only document argument

I would expect updateDocument to get the _rev and _id from the given document as well as pass them separately. Currently I am doing:

const { _id: docId, _rev: docRev, ...updatedDoc } = doc
return database.updateDocument(updatedDoc, docId, docRev)
.then((res) => {  
//...
}

Installation problems

Following the instructions below:

npm install --save react-native-couchbase-lite

gives error

npm ERR! fetch failed https://registry.npmjs.org/rnpm/-/rnpm-1.6.5.tgz

Seen this error under both OS/X and Ubuntu (Docker client). Using latest versions of npm (2.1.5) and node (4.4.7).
react-native-cli: 1.0.0
react-native: 0.30.0

After manually installing rnpm globally and trying

rnpm link react-native-couchbase-lite 

getting error

rnpm-link ERR! It seems something went wrong while linking. Error: spawn EACCES 

Calling deleteDatabase() doesn't clear view cache

Hi,

Calling deleteDatabase() doesn't seem to clear view cache or remove the data, not sure which.

  1. I clear the database with deleteDatbase()
  2. I re-populate the database with new data.
  3. I query the view expecting to see the new data and the old data remains.
  4. If I clone the existing view with a different name it returns the new data.

Sam

Cannot replaced a design document

I'm getting a:
{ status: 409, reason: 'conflict', error: 'conflict' }
response when attempting to replace a design document. According to the docs PUT should create or updates a design document. Seems that it only creates.

Please help with install instructions

I am new to react native and I can't follow through the installation.

Would you please be able to record a video of installing couchbase-lite on ios?

For example I am up to dragging Couchbase Lite .framework's but I can't see a frameworks folder.

image
I'm not sure how you get to this folder state when this is what I have below.

screen shot 2016-02-09 at 9 16 38 am

Also I see a ios (Cocoapods) guide, is this a mutually exclusive way to install? It looks a bit easier.

Many thanks,
Tom

Problem after react-native upgrade

Hi,

I just upgraded to react-native 0.27.2 and I'm getting an error in my system related to this module.

Error = "Cannot read property 'init' of undefined.

in relation to this line:

    ReactCBLite.init(this._localPort, this._localUser, this._localPass, (e) => {
      console.log('DB listening');
    });

I have it included as so:

import {manager, ReactCBLite} from 'react-native-couchbase-lite'

Has anyone else upgraded with success?

Docs request

It would be useful to have some docs that show how to upgrade CBL.

How to do filtered replication?

Hi!

The replicate method in this module may not support filtered replication.
That only support full replication, right?
I have tried to do it with makeRequest. But it also can't do that.
How can I resolve this issue?
Thanks advance.

Authentication support

I went through the Api docs, but couldn't find anything on authentication, is it supported?

Atomic Counter

I'm going to write an atomic counter api to increment a document key

/user::234::post::12

but is that something that belongs in this module? And it begs the question: is using a bridge to the REST API over one to the platform specific APIs sustainable for larger projects?

How to deal with failed update

Is there a way to detect if or not a document change has failed to reach the server because the sync-gateway rejected it?

I have a client that attempted to make a change it was not authorised to do. The sync-gateway rejected it as expected, but now that client has a different document revision to everyone else.

undefined is not an object (evaluating '_reactNativeCouchbaseLite.ReactCBLite.init')

import {manager, ReactCBLite} from 'react-native-couchbase-lite'
const dbName = 'dbABC'
const database = new manager(http://admin:pass@localhost:5984/, dbName)

new Promise((resolve, reject) => {
ReactCBLite.init(5984, 'admin', 'pass', error => {
error ? reject(error) : resolve()
})
}).then(() => {
return database.createDatabase()
})

export default database

W/ReactNativeJS( 2780): Possible Unhandled Promise Rejection (id: 0):
W/ReactNativeJS( 2780): undefined is not an object (evaluating '_reactNativeCouchbaseLite.ReactCBLite.init')
W/ReactNativeJS( 2780): http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:79701:38
W/ReactNativeJS( 2780): tryCallTwo@http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:29600:3
W/ReactNativeJS( 2780): doResolve@http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:29755:19
W/ReactNativeJS( 2780): Promise@http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:29621:10
W/ReactNativeJS( 2780): http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:79700:12
W/ReactNativeJS( 2780): loadModuleImplementation@http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:127:8
W/ReactNativeJS( 2780): guardedLoadModule@http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:70:32
W/ReactNativeJS( 2780): _require@http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:54:18
W/ReactNativeJS( 2780): http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:1504:21
W/ReactNativeJS( 2780): loadModuleImplementation@http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:127:8
W/ReactNativeJS( 2780): guardedLoadModule@http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:63:37
W/ReactNativeJS( 2780): _require@http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:54:18
W/ReactNativeJS( 2780): global code@http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=true&minify=false:80638:9

Error: http error for 'http://admin:pass@localhost:5984/proximator'

Sometimes I'll get a network request failure when initializing.

I wonder if this is a race condition with ReactCBLite.init. If so, what's the recommended way to wait for initialization?

my code:

ReactCBLite.init(5984, 'admin', 'pass', e=> {
  if (e) {
    console.log(e)
  }
})

const database = new manager(`http://admin:pass@localhost:5984/`, dbName)

database.createDatabase()
.then(res => {
  if(res.status == 201) {
    console.log('created database!', res)
  }
})

here are some logs, not sure if they are helpful

Exception: Error: http error for 'http://admin:pass@localhost:5984/proximator', caused by => TypeError: Network request failed 
at http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:83222:7 
at tryCallOne (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:6553:8) 
at http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:6639:9 
at JSTimersExecution.callbacks.(anonymous function) (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:4181:13) 
at Object.JSTimersExecution.callTimer (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:3872:1) 
at Object.JSTimersExecution.callImmediatesPass (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:3930:19) 
at Object.JSTimersExecution.callImmediates (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:3945:25) 
at http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:3204:43 
at guard (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:3118:1) 
at MessageQueue.__callImmediates (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:3204:1)

err: TypeError: Network request failed 
at xhr.onerror (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:15451:8) 
at XMLHttpRequest._sendEvent (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:14918:1) 
at XMLHttpRequest.setReadyState (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:14904:6) 
at XMLHttpRequest._didCompleteResponse (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:14795:6) 
at http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:14744:105 at EventEmitter.emit (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:4765:23) 
at MessageQueue.__callFunction (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:3260:23) 
at http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:3164:8 
at guard (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:3118:1) 
at MessageQueue.callFunctionReturnFlushedQueue (http://yonahs-macbook-pro-2.local:8081/index.ios.bundle?platform=ios&dev=true:3163:1)

this: DedicatedWorkerGlobalScope

Closure (manager._makeRequest)
fullUrl: "http://admin:pass@localhost:5984/proximator"
method: "PUT"

Closure (undefined)
CHANGE_EVENT_TYPE: "changes"
base64: Object

Documentation Problems

Hi,

I'm new to couchbase so please forgive me if I'm wrong but I think I have come across a few problems in the documentation which took me ages to figure out!

  1. The serialisation (toString) of the "map" method is in the wrong place. You have it on the view object rather than the "map" method.

e.g docs say:

let designDoc = {
  person_age_view: {
    "map": function (doc) {
      if(doc.type === 'person') {
        emit([doc.gender, doc.age], null);
      }
    }
  }.toString()
}

Should say:

let designDoc = {
  person_age_view: {
    "map": function (doc) {
      if(doc.type === 'person') {
        emit([doc.gender, doc.age], null);
      }
    }.toString()
  }
}
  1. For me to get be able to queryView's I had to define the view by wrapping the document definitions in 'views'.

e.g. docs say:

let designDoc = {
  person_age_view: {
    "map": function (doc) {
      if(doc.type === 'person') {
        emit([doc.gender, doc.age], null);
      }
    }
  }.toString()
}

When it should be:

let designDoc = {
  views: {
    person_age_view: {
      "map": function (doc) {
        if(doc.type === 'person') {
          emit([doc.gender, doc.age], null);
        }
      }.toString()
    }
  }
}

Simple straightforward example

I'm trying to update my code to the newer API, and there doesn't seem to be a clear example of: setting up the manager, creating the db if needed, replicating from a remote db, getting some data.

The examples are over complicated and different for iOS and Android, and don't seem to reflect the new API.

Logging

Does anyone know how to get the logging to show up in Android? I'm looking at logcat in android studio with no filters on but I can't see any couchbase looking at all.

ReactCBLite.init Promise

After upgrading from npm versions 0.4.0 to 0.5.2 I'm trying to get the new ReactCBLite.init working for an exported dataLayer object that I can use in redux thunk actions.

The old way, I had a static url with hardcoded username, password and port. In the new one I have to get the generated url from the callback and I am having issues getting that url before the rest of my code tries to execute.

This comment from issue 53 led me to try using a promise to get the program to wait for that URL callback before exporting the dataLayer but I can't get it to work

Forgive the weird structure, this all used to be in an ES6 class and my code expects the database to be inside dataLayer.database. I've removed the usage of an es6 class as I wasn't sure if that was part of the problem.

In this code, the console.log in the promise chain successfully logs the database object. The second console.log, prints out 'undefined' and prints it out before the the promise code executes.

The rest of my code fails as it seems to look at dataLayer.database before it is finished being set.

Any idea what I'm doing wrong?

import {manager, ReactCBLite} from 'react-native-couchbase-lite'

var dataLayer = {}

new Promise((resolve, reject) => {
    ReactCBLite.init((url) => {
            resolve(url);
    })
}).then((url) => {
    dataLayer.database = new manager(url, 'the_app');
    console.log(dataLayer.database)
})

console.log(dataLayer.database)

export default dataLayer

Screenshots

screen shot 2016-08-12 at 4 07 43 pm

screen shot 2016-08-12 at 4 09 01 pm

react-native upgrade wipes out all gradle, etc. modifications

In my attempt to add local images to the example project, which any offline app must store somehow, I decided to try to run the upgrade command react-native upgrade to see if for some reason static files weren't being supported by something. In doing so, all the gradle config mods from the readme got wiped.

Is there anything we can do to prevent upgrade from doing this or is it just react-native evil that we must keep away from?

saving attachments to couchbase using FormData

you can't use fetch to get binary files and then save the res.blob() to couchbase. Binary data isn't passed across the bridge. What you can do is use the FormData to post the image passing the url of the image in the body of the FormData. However, it doesn't seem to be working. I seem to remember being able to post FormData to couchbase lite but maybe not?

release problems

I've been trying to release a version of my RN CBL IOS app to TestFlight. I tried using fastlane to simplify the process but it failed with this error:

ld: bitcode bundle could not be generated because '...path/pomochat/ios/libCBLJSViewCompiler.a(CBLJSViewCompiler.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7

Any ideas?

Is it possible to build more code exemple

It can be really great if you build more code exemple specific to React Native.

It's really difficult to get started with couchbase, even if I really want the sync offline / online feature, the learning curve when it's your first time, is really hard.. and my time is limited

Mostly if you can get exemple of

  • Replication
  • Querying <- I really dont get this part
  • Adding document
  • Edit document
  • Troubleshooting (Sync server with couchbase lite and couchbase server)

I'v been able to connect and make Sync Server communicate with my couchbase server + adding some document in my lite one, but doing the end to end transaction, and querying my online documents after is really not clear.. and I'm pretty sure I'm not the only one here.

And I read a lot.. lot of couchbase documentation. all written in obj-c or java

Thank you!
J

Update example

I tried moving the example up to react-native 0.27 but I got too many errors to wrap my head around

Docs?

Hi,

Is it possible to count values grouped by date?

Are there any plans to expose the Native Query object to react native? The couchbase lite REST interface seems very limited.

Thanks

CBL IOS sometimes returning empty results incorrectly

I've noticed a situation where sometimes when my app starts view queries are returning empty results: { total_rows: 0, offset: 0, rows: [] }. But if I do the same query in my browser and hit the db in the IOS simulator I get rows back. The data is definitely there in the db and in the index, but its not getting returned to my app when I query.

It seems that if I leave it for long enough, exactly 5 minutes in fact, the data eventually gets returned correctly.

Anyone else seen this, or know what causes it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.