Hi Jens, So I was watching your peer-to-peer sync presentation yesterday and I saw you recommended setting the readOnly property on CBLListener. I tried that yesterday and it seemed to prevent the database from being updated from the pull. I thought that the readOnly property would be just for pushes? You mentioned that it prevents someone from pushing a revision to the listener, but shouldn't prevent pulls from other listeners.
I've based my peer sync code on your Bonjour Grocery Sync example (although in Objective-C instead of Swift). And it works perfectly when the CBLListener readOnly property is NO. So not sure if I'm just doing something wrong or does readOnly actually prevent pulls too? Here's some log messages to show what's happening to the puller: Sync: CBLRestPuller[https://iPhone-6s.local.:49743/db-d9b8dd6ae89c48da9637bfba68b35f9a]: Server is CouchbaseLite 1.2 (unofficial) Sync: CBLRestPuller[https://iPhone-6s.local.:49743/db-d9b8dd6ae89c48da9637bfba68b35f9a]: Replicating from lastSequence=802 SyncVerbose: CBLRestPuller[https://iPhone-6s.local.:49743/db-d9b8dd6ae89c48da9637bfba68b35f9a] starting ChangeTracker: mode=0, since=802 SyncVerbose: CBLSocketChangeTracker[0x6100001bfd40 db- d9b8dd6ae89c48da9637bfba68b35f9a]: POST //iPhone-6s.local.:49743/db-d9b8dd6ae89c48da9637bfba68b35f9a/_changes CBLSocketChangeTracker[0x6100001bfd40 db-d9b8dd6ae89c48da9637bfba68b35f9a]: Cant connect, giving up: Error Domain=CBLHTTP Code=403 "403 forbidden" UserInfo={NSURL=https://iPhone-6s.local.:49743/db-d9b8dd6ae89c48da9637bfba68b35f9a/_changes, NSLocalizedFailureReason=forbidden, NSLocalizedDescription=403 forbidden} Sync: CBLRestPuller[https://iPhone-6s.local.:49743/db-d9b8dd6ae89c48da9637bfba68b35f9a]: ChangeTracker stopped; error=Error Domain=CBLHTTP Code=403 "403 forbidden" UserInfo={NSURL=https://iPhone-6s.local.:49743/db-d9b8dd6ae89c48da9637bfba68b35f9a/_changes, NSLocalizedFailureReason=forbidden, NSLocalizedDescription=403 forbidden} Sync: CBLRestPuller[https://iPhone-6s.local.:49743/db-d9b8dd6ae89c48da9637bfba68b35f9a] Progress: set error = 403 forbidden Sync: CBLRestPuller[https://iPhone-6s.local.:49743/db-d9b8dd6ae89c48da9637bfba68b35f9a] STOPPING... So basically it's forbidden. I thought it was supposed to be forbidden for pushing, but not for pulling? Thanks, Brendan -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/4ce7b135-a2ba-4509-8ab2-f5facd9f4f8a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
