Can someone tell me how to sync with iOS?

the doc says

add a design document

{
  "_id": "_design/mobile",
  "filters": {
    "sync": "function (doc) { return doc._id.indexOf('file:') === -1 }"
  }
}

I’m not sure how to add, should i use

curcurl -k -X PUT https://myname:mypass@ip:port/design '{"_id": "_design/mobile", "filters": { "sync": "function (doc) { return doc._id.indexOf('file:') === -1 }" } }'

Hi gogdizzy,

It would be something like:

curl -X PUT https://anna:secret@your-server.com:6984/my-inkdrop-notes/_design/mobile -d '{"_id":"_design/mobile","filters":{"sync":"function (doc) { return doc._id.indexOf(\"file:\") === -1 }"}}
' -H 'Content-Type:application/json'

Thank you.

1 Like