[iOS] Couchbase Lite source dependency

41 views
Skip to first unread message

J. Chris Anderson

unread,
Apr 16, 2014, 6:07:58 PM4/16/14
to mobile-c...@googlegroups.com
There's no good reason to have a source dependency on Couchbase Lite (instead of downloading the pre-built packages) unless you like getting cut by the bleeding edge. For folks who do, I've written up my adventures creating a project that uses Couchbase Lite as a source dependency. I'm posting it here so I can get feedback about better ways to accomplish the same thing, before I go off and encode this knowledge in a PhoneGap plugin building script.

https://github.com/couchbaselabs/CouchbaseLiteiOS-SourceApp

The repo also contains the project I experimented on, if you just want to start from there. Make sure to clone with --recursive!

Chris

Jens Alfke

unread,
Apr 16, 2014, 8:32:45 PM4/16/14
to mobile-c...@googlegroups.com

On Apr 16, 2014, at 3:07 PM, J. Chris Anderson <jch...@couchbase.com> wrote:

There's no good reason to have a source dependency on Couchbase Lite (instead of downloading the pre-built packages) unless you like getting cut by the bleeding edge. For folks who do, I've written up my adventures creating a project that uses Couchbase Lite as a source dependency.

Chris has some specific needs* that require adding the CBL sources directly to his project. But in general, it’s a lot easier to instead check out and build CBL in its own project, then take the framework it produces and add that to your app project. Consider doing it that way before you try to follow Chris down the very bumpy rabbit-hole he’s fallen into :)

—Jens

* creating a CBL PhoneGap plugin that can be built by Adobe’s hosted build system

Ragu Vijaykumar

unread,
Apr 16, 2014, 9:01:09 PM4/16/14
to mobile-c...@googlegroups.com
Perhaps I'm missing something, but this is a lot more steps than what I did to get CouchbaseLite as a source dependency in my CBLNestedModelExample (check pull request for link to it).

In short, these are the steps I did...

1.) In your project directory, type "git submodule add <repo to couchbase>"
2.) git submodule update --init --recursive
3.) In your project's xcodeproject, drag the couchbase-lite project into it right under your project at the top
4.) Click on your project settings, add library, and select CouchbaseLite.framework (select the right one for Mac or iOS, it will tell you).

Build and run, and everything works. Please let me know if I'm missing something.

Cheers,
Ragu

J. Chris Anderson

unread,
Apr 17, 2014, 1:08:08 PM4/17/14
to mobile-c...@googlegroups.com
Thanks Ragu! I will try this today.
Reply all
Reply to author
Forward
0 new messages