Just getting started with an IOS app containing CBL. It seems to be starting up ok, but when I hit the CBL internal url (http://lite.couchbase./) I just a network error. Here’s the code I’m using the launch the app:
It sounds like React Native’s networking isn’t seeing the custom NSURLProtocol that CBL registers to handle the REST API. I don’t know anything about how React Native is implemented. There are two possibilities:
They use NSURLSession, but are creating their own instance instead of using the default session. In that case our protocol handler will have to be registered in their session somehow.
They use lower-level socket APIs and do all the HTTP client work themselves. They might do this if they want as much as possible of their code to be cross-platform. In that case CBL won’t be able to hook in.
Thanks for the reply Jens. I don’t know enough about Ios programming to understand whats going on here. Think I’m going to have to work around it by using the CBLListener and actively stop/start it as the app changes state.