Skip to content

Couchbase Lite version that supports CouchDB replication.

License

Notifications You must be signed in to change notification settings

neonhomer/couchbase-lite-ios

 
 

Repository files navigation

Couchbase Lite

A forked version of Couchbase Lite 1.x with CouchDB support. Supports CouchDB 2.x and custom filters. couchbase#1139

1.4.4 Documenation

Building Couchbase Lite

Checking Out The Code

  1. Use Git to clone the Couchbase Lite repository to your local disk. For example: git clone git://github.com/neonhomer/couchbase-lite-ios.git
  2. cd couchbase-lite-ios
  3. git checkout 1.x
  4. git submodule update --init --recursive. This will clone some external Git repositories into the vendor/ subdirectory.

In the future, you can update to the latest sources by running "git pull" in the Couchbase Lite directory, then git submodule update --recursive.

Building

  1. Open CouchbaseLite.xcodeproj.
  2. Select the "Continuous iOS", "CBL Mac", or "CBL tvOS" (AppleTV) scheme, depending on which platform you want to build.
  3. The next step depends on whether you want an optimized or a debug build:
    • For an optimized build:
      1. Choose "Archive" from the "Product" menu.
      2. Open the Organizer window's Archives tab to find the archive.
      3. Right-click the archive and choose "Show In Finder".
      4. Right-click the archive icon in the Finder and choose "Show Package Contents".
      5. The framework will be inside the "Products" subfolder.
    • For a debug build:
      1. Choose "Build" from the "Product" menu.
      2. Finding the framework can be tricky as it's buried deep in the build directory, whose location varies depending on your Xcode preferences. Look at the build log in the log navigator pane and the last line of output should include its path.

Linking Couchbase Lite Into Your Own App

  1. Drag CouchbaseLite.framework into the file list of your app's project window.
  2. In the window that appears, make sure the checkbox next to your app's target is checked.
  3. For an iOS or tvOS target:
    1. Go to the "Build Settings" tab of your app target's settings.
    2. Find the "Other Linker Flags" row in the "Linker" section, and add the flag -ObjC. (Note the capitalization.)
    3. Go to the "Build Phases" tab of the app target's settings.
    4. In the "Link Binary with Libraries" section, click the plus button and add CFNetwork.framework, Security.framework, SystemConfiguration.framework, libsqlite3.tbd, libz.tbd and libc++.dylib.
  4. For a Mac OS target, you'll need to make sure the framework is copied into your app's bundle:
    1. To to the "Build Settings" tab of your app target's settings.
    2. In the "Linker" section, edit "Runpath Search Paths" and add the path "@loader_path/../Frameworks".
    3. Now switch to to the "Build Phases" tab.
    4. Press the "Add Build Phase" button at the bottom of the window and create a new "Copy Files" phase.
    5. Set the phase's destination to "Frameworks".
    6. Press the "+" button below the phases' file list and select CouchbaseLite.framework to add it.

About

Couchbase Lite version that supports CouchDB replication.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 94.3%
  • Objective-C++ 3.7%
  • C 0.6%
  • Shell 0.5%
  • C++ 0.4%
  • Ruby 0.2%
  • Other 0.3%