I'm trying to set up an iOS Swift app to sync with sync gateway on a
cluster configured with Traun's tutorial (
http://tleyden.github.io/blog/2014/12/15/running-a-sync-gateway-cluster-under-coreos-on-aws
)

I enabled guest access. Here is my sync gateway config:

{
  "log": ["CRUD", "REST+", "Access"],
  "databases": {
    "mydb": {
      "server":"http://127.0.0.1:8091";,
      "bucket":"mydb",
      "users": {
        "GUEST": {"disabled": false, "all_channels": ["*"],
"admin_channels": ["*"]}
      },
      "sync": `
function(doc, oldDoc) {
  channel(doc.channels);
}

`
    }
  }
}


And the in my app I configured my replications:

let url = NSURL(string: "http://myserver.com/mydb";)
let push = database.createPushReplication(url)
let pull = database.createPullReplication(url)
push.continuous = true
pull.continuous = true
NSNotificationCenter.defaultCenter().addObserver(self, selector:
"replicationChanged:", name: kCBLReplicationChangeNotification, object:
push)
NSNotificationCenter.defaultCenter().addObserver(self, selector:
"replicationChanged:", name: kCBLReplicationChangeNotification, object:
pull)
self.push = push
self.pull = pull
self.push!.start()
self.pull!.start()
Push replication works, in the sense that when I create a document in the
ios app, it gets pushed to the couchbase server, I can see it both in sync
gateway log and in the couchbase console. But it doesn't appear on other
devices connected to the same database.

Any idea what might be going wrong?

---
Sébastien Arbogast
http://sebastien-arbogast.com

-- 
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/CAG1DMa_sJHRguE_nzYNSf75dV1gH_9qWLhL%3DxfdQwxQz-KLoSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to