> On Oct 2, 2014, at 11:25 AM, Peter Jacobson <[email protected]> 
> wrote:
> 
> "Are you talking about the base URL to use with PhoneGap? That’s the same 
> whether or not you use sync”
> 
> I would have thought there would be some canonical localhost-type URL to talk 
> to a local vs a remote couchbase daemon.

No, you never talk directly to a server. Only the replicator does that. (As you 
probably by now realize.)

> I didn’t realize there isn’t one and that you have to get it from the plugin, 
> so I spent several hours assuming I had a bad URL (in part because of the 400 
> error message) and trying different URLs (e.g. couchdb uses 
> http://0.0.0.0:5984 <http://0.0.0.0:5984/>). Some clearer indication of that 
> in the docs would be a big help - I couldn’t find anything that specified 
> this.

I think this isn't documented because we assume devs will start from a PhoneGap 
example project and build the app from there, instead of trying to start from 
scratch with just the PhoneGap plugin. (But I don't work on our PhoneGap 
integration so I shouldn't speculate too much.)

FYI, the reason for the different URLs is that while iOS uses a URL-protocol 
plugin to catch the request before it hits the wire, you apparently can't do 
that on Android; so the Android version has to open a real live TCP listener 
socket. That socket will end up with an effectively-random port number, so the 
URL can't be hardcoded.

—Jens

-- 
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/E3D87489-9038-4B0C-9441-6BEDC06B5F52%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to