Thanks sir. I really apologies for the trouble.
Oh, not at all. Thanks for testing this stuff out and helping make it solid.
I tried passing the username and password in the URL, and it seems to work best. Is that a secure way of replicating?
It doesn’t affect what goes over the network, so if you’re using SSL it’s still secure.
If this is a persistent replication, the URL is stored in the _replicator database, so it’s less secure on the device because the password is in an regular file. We discussed iOS filesystem encryption a while ago — IIRC, regular app files are still encrypted but not as securely as the Keychain is.
The most secure approach would be to put the username but not the password in the URL. Then use the NSURLCredentialStorage API to store the password persistently, which will put it in the Keychain. There’s sample code for that on the wiki.
—Jens