Facebook Log in/Log out

2014-12-03 Thread James Nocentini
I'm using Facebook Login with Couchbase Lite, attempting to do the same set up as TodoLite-iOS (https://github.com/couchbaselabs/ToDoLite-iOS) When a user logs in, open a new db (with its name being an md5 hash of the user's email). Set up push/pull replications with authenticator property like s

Re: New Couchbase Mobile Video

2014-12-04 Thread James Nocentini
Thanks for posting this. Here are some moments I picked from it http://cl.ly/Ype5/jNLBJjLJCq0.mp4 I was wondering how to subscribe to the _changes feed when disabling the guest account. As mentioned in the video using the admin port works great on the same private network. Wondering how that wo

Re: to use my token with Sync-Gateway's _facebook logic

2015-01-11 Thread James Nocentini
Thanks for this thread, it's super useful info. @snej As you mentioned here , if we are not using custom auth provided by Couchbase Lite then we need to handle cookie expiration. In the case of third-party oauth (

Re: finding out who has access to a given channel

2015-02-20 Thread James Nocentini
I'm not sure, i think there's a /:dbname/_dumpchannel/:channelname GET request on the admin port, but I get back a 404 channel not found when the channel exists. See screenshot below, the user John has access to the 'public_notes' channel.

Re: finding out who has access to a given channel

2015-02-20 Thread James Nocentini
Ok thanks for the clarification. Filed issue https://github.com/couchbase/sync_gateway/issues/667. On Friday, 20 February 2015 17:28:13 UTC, Jens Alfke wrote: > > > On Feb 20, 2015, at 4:34 AM, James Nocentini > wrote: > > I'm not sure, i think there's a /:dbname/_

Re: Question about sync gateway User Accounts mechanism

2015-03-15 Thread James Nocentini
If you enable the GUEST account, the only way to give it access to documents is through the admin_channels property in the GUEST config object. The access call in the sync function won't work. In your case, I think you should create users instead. Check this guide to create a user via the Admin

Re: Question about sync gateway User Accounts mechanism

2015-03-16 Thread James Nocentini
the GUEST account and use the sync function with access() and channel(). > Sorry for long post, I just didn't find any doc addressing this kind of > matter(unknown number of users+ filtering access to docs by their _id) > beside using Facebook or persona Auth. > > >

Re: How to detect network failures, so that failure can be handled properly?

2015-03-20 Thread James Nocentini
For the unauthorized case (401), you can check the status code. For reachability, the Replication class has a status property which can be Stopped, Offline, Idle or Active. You can read more about it here http://developer.couchbase.com/mobile/develop/guides/couchbase-lite/native-api/replication

Re: How to detect network failures, so that failure can be handled properly?

2015-03-20 Thread James Nocentini
Ok, you could add an observer to the replication change notification on iOS. And check if the change notification is an error and get the status code from there. See this example in Todo Lite Android to check if the username/password are valid when logging in with Basic Auth https://github.com

Re: How to detect network failures, so that failure can be handled properly?

2015-03-21 Thread James Nocentini
quot;, possible values >are the same as HTTP status code standard. For example, 401 means not >authorized. We handle this error to log out current user. > > -Sean > > On Friday, March 20, 2015 at 8:53:14 PM UTC+8, James Nocentini wrote: >> >> Ok, you could add an

Re: ToDo Lite only displays a blank grey screen on Android

2015-03-23 Thread James Nocentini
Hello, Can you see the `New List` button on the upper right corner? Would it be possible to paste the logs you get from LogCat here? Thanks On Monday, 23 March 2015 04:13:50 UTC, yangzi...@gmail.com wrote: > > can you device connect with Facebook? > when you can not connect with Facebook, the bl

Re: Sharing couchbase lite on single device

2015-04-27 Thread James Nocentini
I just came accross this library https://github.com/mutualmobile/MMWormhole. It's probably possible to only access the database within the app and use this library to send/receive documents to the Watch app. This would solve the issue of long polling and caching but I'm not sure how much more cod

Re: [Couchbase-lite] How to edit or replace an existing document if it has not been synced?

2015-06-08 Thread James Nocentini
> > So, is it possible to edit or replace an existing document revision if it > has not been synced with the sync-gateway? > (To handle this, I am planing to sync with sync-gateway in my app every 5 > secs. So, for every 5 sec only one revision will be synced.) > If you set up the maxRevTreeDep

Re: attachment sync failed from SyncGateway(1.1) to CBL(1.1) on Android(5.0.1) emulator

2015-07-06 Thread James Nocentini
>From the logs, I'm not sure what might be causing the issue. What version of CBL Android are you using? Can you post your code for getting the attachment from the CBL database? Saving an attachment on a document creates a new revision. So CBL Android would be pulling the new revision and attach

Re: attachment sync failed from SyncGateway(1.1) to CBL(1.1) on Android(5.0.1) emulator

2015-07-06 Thread James Nocentini
Oops you did mention REST API in the first post :). What's the response message/code when attempting to get the attachment with the REST API? James On Monday, 6 July 2015 16:42:07 UTC+2, atom992 wrote: > > > > On Monday, July 6, 2015 at 10:30:24 PM UTC+8, James Nocentini wrot

Re: attachment sync failed from SyncGateway(1.1) to CBL(1.1) on Android(5.0.1) emulator

2015-07-07 Thread James Nocentini
; document.getCurrentRevision().getAttachment("abc.png"); >> >> >> If you want to show in imageview than convert the attachment to bitmap >> >> >> On Monday, July 6, 2015 at 8:00:24 PM UTC+5:30, James Nocentini wrote: >>> >>> From the logs, I

Re: attachment sync failed from SyncGateway(1.1) to CBL(1.1) on Android(5.0.1) emulator

2015-07-08 Thread James Nocentini
So the ToDoLite PhoneGap <https://github.com/couchbaselabs/todolite-phonegap> app isn't pulling attachments (photos in this case) correctly? James On Tuesday, 7 July 2015 18:00:11 UTC+2, atom992 wrote: > > > > On Tuesday, July 7, 2015 at 10:44:42 PM UTC+8, James No

Re: Couchbase lite android test db directory can not be created.

2015-08-25 Thread James Nocentini
I'm seeing the same error when using J2ObjC in the hope to write the models of an application with couchbase-lite-java and reuse them on iOS and Android with J2ObjC. I think the problem may come from the fact that I'm creating the couchbase lite manager in a pure java app but running on Android

Re: Couchbase lite android test db directory can not be created.

2015-08-25 Thread James Nocentini
; Hideki > > On Tuesday, August 25, 2015 at 9:35:33 PM UTC-7, James Nocentini wrote: >> >> I'm seeing the same error when using J2ObjC in the hope to write the >> models of an application with couchbase-lite-java and reuse them on iOS and >> Android with J2ObjC.

Re: Couchbase lite android test db directory can not be created.

2015-08-26 Thread James Nocentini
son 1 causes problem. > > Thanks, > Hideki > > On Tuesday, August 25, 2015 at 9:35:33 PM UTC-7, James Nocentini wrote: >> >> I'm seeing the same error when using J2ObjC in the hope to write the >> models of an application with couchbase-lite-java and reuse them on

Re: Couchbase Phonegap Plugin. Replication task status.

2015-09-02 Thread James Nocentini
Check this example for `/_replicate` endpoint with the custom header . I think headers takes an object and not a string. Also, how are you testing this e

Re: PullReplication is not stoping once if it is started in android

2015-10-26 Thread James Nocentini
What happens if you dereference the property like this: pullReplication.stop(); pullReplication = nil; James On Monday, 26 October 2015 13:01:29 UTC, PRASANNA KUMAR wrote: > > Hi All, > > I have been working couch base lite android one of my project, I'm facing > the problem while doing PullRep

Re: There's Cloudant, but are there any others?

2015-10-31 Thread James Nocentini
There are also Docker images hosted on Docker Hub for Sync Gateway and Couchbase Server. In this blog post, I explain how you can set up continuous delivery for your staging server http://jamiltz.github.io/2015-10-23-continuously-deploy-couchbase-mobile-stack-with-docker-tutum/ In the tutorial

Re: couchbaselite + nodejs + raspbarry pi

2015-11-17 Thread James Nocentini
There isn’t a guide for running Couchbase Lite on a Raspberry Pi yet. You can run the Java SDK on it but you will need to build the couchbase/couchbase-lite-java-native from source and use the jar outputs in your project. The section "Loading in all the dependencies" in this blog post

Re: couchbaselite + nodejs + raspbarry pi

2015-11-18 Thread James Nocentini
>From googling, it looks like Node.js can run on the Raspberry Pi. If you want >to use Node.js on it to develop an embedded app in JavaScript, you might use >PouchDB or Couchbase Lite Java + Listener. Which one to go for will probably >depend on the use case as Jens mentioned.. James > On 18 N

Re: best practices for checking a related document for access info

2015-11-19 Thread James Nocentini
Another way could be to map the public documents to the built-in ! channel (called the public channel) because the GUEST user and all registered users have access to that channel by default. I recorded a screencast about this use case that might help http://blog.couchbase.com/2015/november/expl

Re: Couchbase on android nested object json

2015-12-09 Thread James Nocentini
You can read this blog on using model classes and JSON on Android http://jamiltz.github.io/simple-model-class-for-couchbase-lite-android/ James On Wednesday, 2 December 2015 00:00:02 UTC, brijesh chavda wrote: > > I have following document structure. > > > { > id : "user1", > "foods": >

Re: ANN: Please try latest CBL 1.2 iOS/Mac builds

2016-01-11 Thread James Nocentini
Is there a database upgrade method that will take all documents from an SQLite-backed database and migrate them to a ForestDB one? James On Friday, 8 January 2016 18:03:55 UTC, Jens Alfke wrote: > > Sync Gateway: > http://mobile.jenkins.couchbase.com/view/Sync_Gateway_Dev/job/sync-gateway-maste

Re: Best Practice for managing userprofile documents

2016-04-17 Thread James Nocentini
In addition to Jens’ answer, here are two blogs for putting together the server-side component for registering users: http://blog.couchbase.com/2015/september/adding-user-sign-up-to-your-android-app-with-node.js-and-couchbase-mobile http://blog.couchbase.com/2015/october/adding-google-sign-in-wit

Re: Best way to get count of related documents

2016-04-17 Thread James Nocentini
I’m not sure whether group level should always use a reduce function or not. Let’s take the example where the key in the emit call is [location, name]. Using group level = 1, get counts for rows with the same location and group level = 2 to get rows with the same location and name. But in many o

Re: Global CBlite connection set up

2016-04-27 Thread James Nocentini
Are you using the Couchbase Lite PhoneGap plugin? On which platform? If so, the database url is accessible in the onDeviceReady through: cblite.getURL(function(err, url) {…}); >From there you can perform CRUD operation, queries and replication operations >on the REST API. I also suggest to che

Re: Global CBlite connection set up

2016-04-27 Thread James Nocentini
Are you using the Couchbase Lite PhoneGap plugin? On which platform? If so, the database url is accessible in the onDeviceReady through: cblite.getURL(function(err, url) {…}); >From there you can perform CRUD operation, queries and replication operations on the REST API

Re: ANN: Couchbase Mobile 1.3 developer preview

2016-07-13 Thread James Nocentini
Instructions for using a CBL .NET CI build were just uploaded at http://developer.couchbase.com/documentation/mobile/1.2/installation/net/index.html#ci-build. James On Wednesday, 13 July 2016 16:08:30 UTC+1, Steven Mark Ford wrote: > > Hi Jens, > > How do I go about includeing > http://latestb

Re: How to send object which contain Document and Map as fileds from one Activity to Another Activity?

2016-07-28 Thread James Nocentini
You can pass the HashMap as an intent extra . James On Thursday, 28 July 2016 16:15:51 UTC+1, Nenad Stojnic wrote: > > Hi. > > Problem description: > Activity_A have one Meta object which contains two fields > com.couchbase.lite.Document and Map. > We

Re: How to send object which contain Document and Map as fileds from one Activity to Another Activity?

2016-07-28 Thread James Nocentini
But it looks like Maps can't be serialized as intent extras. The document.getProperties() method returns a Map. Can you try to convert it to a HashMap then pass it as an extra? James On Thursday, 28 July 2016 16:25:55 UTC+1, James Nocentini wrote: > > You can pass the HashMap a

Re: using couchbase lite in android system service

2016-08-02 Thread James Nocentini
You can also follow the Java installation page to start a new project with IntelliJ and Couchbase Lite. http://developer.couchbase.com/documentation/mobile/1.2/installation/java/index.html James On Monday, 1 August 2016 20:09:23 UTC+1, Traun Leyden wrote: > > Yes, we have a Java version of Couc

Re: How to cancel a replication task via the REST API

2016-08-03 Thread James Nocentini
The *cancel: true *field must be passed along with all the other properties that were specified when the replication was created (i.e. source, target, continuous etc.) It's documented here http://developer.couchbase.com/mobile/swagger/couchbase-lite/#!/server/post_replicate and http://develo

Re: How to cancel a replication task via the REST API

2016-08-03 Thread James Nocentini
c_macmini_0_c5149e0b-d6a6-4d7c-9498-ed311552c663\",\"continuous\":true,\"cancel\":true}* > " > > "*{\"source\":\"pc_macmini_0_c5149e0b-d6a6-4d7c-9498-ed311552c663\",\"target\":{\"headers\":{\"Cookie\":\&qu

Re: How to cancel a replication task via the REST API

2016-08-03 Thread James Nocentini
y.co.uk  * http://twitter.com/nickpomfret  * https://uk.linkedin.com/in/nick-pomfret-03614a  */   On 3 August 2016 at 12:12, James Nocentini wrote: Hmm, I just ran the following two curl commands with iOS 1.3.0 build 50 and SG 1.3.0 build 247. Create replication curl -H 'Content-Type: application/j

Re: How to cancel a replication task via the REST API

2016-08-04 Thread James Nocentini
I don’t see any issue, passing cancel: true to a replication running and authenticated stops it and returns {"ok": true} in 1.3. I’ve tried with 1.2.1 and 1.3. If there is an authentication error then /_replicate returns a 404 though (also observed in 1.2.1 and 1.3). That’s probably because it

Re: How to cancel a replication task via the REST API

2016-08-05 Thread James Nocentini
I’m also testing with 62. Can you double check that first the replication is in /_active_tasks and has not a 401 unauthorized error. Then send the same request with cancel: true. This is the scenario you’ve describe and it’s working in my testing. James On 5 August 2016 at 10:23:14, Nick Pomfre

Re: Performing sync on push notification

2016-08-19 Thread James Nocentini
[db allReplications] returns all the running replications so it will be empty when there are no replications running. Did you try to use [database createPush/PullReplication:] to resume it? The replication will pick up from where it last stopped. James On Friday, 19 August 2016 11:38:40 UTC+1,

Re: Linking Errors in iOS

2016-08-25 Thread James Nocentini
I've tried on Xcode 7 and it linked successfully. Can you try to copy the CBL frameworks in a new Frameworks folder in your Xcode project in Finder first? Then drag them to the Link Binary With Libraries section in Xcode. If it's a Swift project, the bridging header needs both imports: #import

Re: ANN: Couchbase Mobile 1.2 is released!

2016-09-16 Thread James Nocentini
Preview docs for SG Accel are at https://github.com/couchbase/sync_gateway/wiki/Introduction-to-Sync-Gateway-Accelerator On Friday, 16 September 2016 16:36:49 UTC+1, atom992 wrote: > > Any update about document of Sync Gateway Accelerator? > > > On Tuesday, February 16, 2016 at 12:27:33 AM UTC+8

Couchbase Lite on Apple Watch

2016-09-20 Thread James Nocentini
I've read this file protection thread (https://groups.google.com/d/msg/mobile-couchbase/q8H3qzgYfHo/MXjVr3C0MQAJ) in the context of watchOS 1. Now with watchOS 3 I'm not sure if things are working differently to access documents stored in Couchbase Lite from the apple watch. Has anyone got it

Re: Conflict Resolution Method

2016-10-07 Thread James Nocentini
This lesson describes how to do automatic conflict resolution (removing conflicting revisions) http://developer.couchbase.com/documentation/mobile/1.3/develop/training/adding-synchronization/index.html#resolve-conflicts. For the conflict detection it's using an allDocs live query with OnlyCon

Re: What is replication in couchbase mobile?

2016-10-13 Thread James Nocentini
Hi Vidya, Couchbase Lite is a standalone embedded database. You can use Couchbase Lite as a local database in your Android app. To Get Started with Couchbase Lite (CBL) on Android you can follow the code here to persist a simple document to the database http://developer.couchbase.com/document

Re: Couchbase Lite dynamic lib via CocoaPods?

2017-02-22 Thread James Nocentini
See https://forums.couchbase.com/t/installing-couchbase-lite-with-cocoapods-in-a-framework/11790 Can you try with the 2.0 DB1 pod spec to see if it works as a framework with cocoa pods? > On 22 Feb 2017, at 21:37, David Brittain wrote: > > We don't have use_frameworks! perhaps that's why (we'

Re: Peer to Peer in 2.0

2017-04-17 Thread James Nocentini
> >- The Listener component (REST API) mostly gets used by PhoneGap apps. > > >- For that, it would be more efficient to create a direct JavaScript >binding for Couchbase Lite, than the current scheme that goes through >XMLHTTPRequest and the Listener. It would also be easier fo

Re: Channeling and change in authenticated user login

2017-06-12 Thread James Nocentini
You should use different databases for each user. A common pattern is to use the username as the database name (U1, U2, U3). So when the user logs in, the app will open (or create) the database which contains the data specific to that user. James On Monday, 12 June 2017 12:32:43 UTC+2, parvez

Re: Channeling and change in authenticated user login

2017-06-12 Thread James Nocentini
sers that were previously > logged in on that device, isn't it? > > On Monday, June 12, 2017 at 4:29:59 PM UTC+5:30, James Nocentini wrote: >> >> You should use different databases for each user. A common pattern is to >> use the username as the database name (U1,

Re: Couchbase help

2017-12-11 Thread James Nocentini
A new document type as the equivalent to a table https://developer.couchbase.com/documentation/mobile/1.5/guides/couchbase-lite/native-api/data-modeling/index.html > On 11 Dec 2017, at 18:40, Anderson Scherdovski > wrote: > > > > Do I must create for each table a new database or a new docume

Couchbase help

2017-12-11 Thread James Nocentini
A new document type as the equivalent to a table https://developer.couchbase.com/documentation/mobile/1.5/guides/couchbase-lite/native-api/data-modeling/index.html -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this gro

Re: Couchbase help

2017-12-11 Thread James Nocentini
Yes. See the "Updating documents" section in https://developer.couchbase.com/documentation/mobile/1.5/guides/couchbase-lite/native-api/document/index.html -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and st

Re: Announcing Release of Couchbase Lite 2.0 Developer Build 21 (DB 21)

2018-02-02 Thread James Nocentini
> > (Incidentally, speaking of documentation, there appear to be a couple of > notable errors in the setup guide for SG 1.5 relating to support for CBL > 2.0 replication. I submitted feedback via the page; see > https://issues.couchbase.com/browse/DOC-3194.) @Ben Thanks for letting us know!

Re: Announcing Release of Couchbase Lite 2.0 Developer Build 21 (DB 21)

2018-02-02 Thread James Nocentini
Indeed, that isn't right. Updated that too to match with the statement in the Couchbase Lite API guide. Thanks! On Friday, 2 February 2018 19:14:33 UTC+1, Ben Kennedy wrote: > > > On Feb 2, 2018, at 9:58 AM, James Nocentini > wrote: > > > > (Incidentally, spe

Re: overriding CBLModel designated initializer in Swift

2014-11-04 Thread James Nocentini
I'm not sure what the problem is but declaring a typealias and using that in the CBLModel subclass doesn't throw the compiler error. typealias CBLDoc = CBLDocument class Profile: CBLModel { override init!(document: CBLDoc) { super.init(document: document) } } On Monday, 15 Sep

Re: Apple Push Notification Service with UILocalNotfication + Sync Gateway instead

2014-11-13 Thread James Nocentini
I'm trying to set up Apple Push Notifications when some user actions are triggered on the app. Here's what I have managed to do so far: - User logs in and accepts to receive push notifications - New Profile document is saved with device_token as one property - Then when a push notification is need

Re: Apple Push Notification Service with UILocalNotfication + Sync Gateway instead

2014-11-13 Thread James Nocentini
s://github.com/couchbase/sync_gateway/issues/379 > > The non-admin API is coming soon: > > https://github.com/couchbase/sync_gateway/issues/449 > > Which version of Sync Gateway are you running? > > > On Thu, Nov 13, 2014 at 1:57 PM, James Nocentini < > james.nocent

Re: Apple Push Notification Service with UILocalNotfication + Sync Gateway instead

2014-11-13 Thread James Nocentini
> https://github.com/couchbase/sync_gateway/issues/449 > > Which version of Sync Gateway are you running? > > > On Thu, Nov 13, 2014 at 1:57 PM, James Nocentini > wrote: > >> I'm trying to set up Apple Push Notifications when some user actions are >> triggered