Ok, you could add an observer to the replication change notification on iOS.
And check if the change notification is an error and get the status code from there. See this example in Todo Lite Android to check if the username/password are valid when logging in with Basic Auth https://github.com/couchbaselabs/ToDoLite-Android/blob/master/ToDoLite/src/main/java/com/couchbase/todolite/Application.java#L291 It should work the same on iOS. On Friday, 20 March 2015 12:27:20 UTC, SeanDev wrote: > > Thanks, James. > > The link is really helpful. I believe that is the way to track it. > > And for http status code, can we be more specific? > > >> For the unauthorized case (401), you can check the status code. >> > > For this one, actually I get this error message, but I don't know how can > I get notified before (or just after) the following message happens. > > *2015-03-20 17:53:21.265 DemoProject[342:66956] WARNING: > CBL_Puller[http://127.0.0.1:4984/votings <http://127.0.0.1:4984/votings>]: > Unable to save remote checkpoint: Error Domain=CBLHTTP Code=401 "401 > unauthorized" UserInfo=0x170c78d80 {NSURL=http:**//127.0.0.1:4984/votings > <http://127.0.0.1:4984/votings>**/_local/41ac43b2653ee4e94f16092bfeea9b9c486e7c1a, > > NSLocalizedFailureReason=unauthorized, NSLocalizedDescription=401 > unauthorized}* > >> >> > -Sean > -- 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/c7abbfc4-96fa-490c-b745-e6a1f48ca370%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
