Does Bucket shadowing is recommended way to sync data between server and mobile?

Hi

I ask the question on stackoverflow
StackOverflow question

and I need to be sure that bucket shadowing is supported and recommended way to sync data between couchbase server database and mobile ?

Is there any options, that we can use to sync data from server to mobile phone ?

Are you a new user of Couchbase Server?

If so, use the Sync Gateway REST API to update documents on the server.

If you have a pre-existing server setup that uses ‘smart-client’ APIs to manage buckets, and need to continue using that setup, then you may need to use bucket shadowing. But not otherwise.

Hu James yes and there is third option i use couchbase lite java client and i update that client on server side and then that client send update to the sync gateway and other android apps. I think its better that rest api.

Just to let you know (To all people trying to find an answer to this very same question)…
According to the official docs, shadow buckets wont be supported any longer because its tricky to use them.
Citing Jens on Stackoverflow:
The situation seems to be that shadow buckets work, but are tricky enough to use that they’re officially not supported anymore. The good news is that the Sync Gateway and Server teams are working hard on tighter integration that will make them unnecessary — you’ll be able to make changes directly to Sync Gateway’s bucket without messing anything up. That should be coming out “later this year” (end of 2017).

I guess we have to use sync gateway rest API and forget about smart clients for a while.