I am trying to use the Couchbase Lite REST API but once I added the Couchbase Lite Listener framework to my project it will no longer build. I get the following error:
ld: warning: directory not found for option '-F/Users/work/Documents/FacebookSDK' Undefined symbols for architecture x86_64: "_CBLGetHostName", referenced from: -[CBLListener URL] in CouchbaseLiteListener(libCouchbaseLiteListener.a-x86_64-master.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I’m really new to iOS development and have only worked on existing projects before, so if I’m missing some obvious build step please let me know. I added the Couchbase Lite Listener framework to my project by dragging the .framework file from a Finder window to my project. I also dragged it to the bottom of the Link Binary With Libraries list, in case the order mattered and Couchbase Lite had to be linked first.
Some sort of getting started guide for the Couchbase Lite REST API would be a great addition to the documentation. The API itself is documented, but it doesn’t say anywhere how to actually connect to the couchbase lite local server. The closest thing to documentation is that the API examples say they are contacting http://localhost:59840, so I tried that assuming the port number was hardcoded in couchbase lite somewhere but it failed to connect. I figured out to use the interalUrl by looking through the Couchbase Lite framework header files and guessed that’s what I should use as my base url to contact the REST API. I found out I needed to have the Couchbase Lite Listener framework in my project by googling the errors I got after trying to connect to that url.