Getting Started

Getting Started

Edit on GitHub

Getting Started

Frameworks

  • Download the latest developer build.
  • Drag CouchbaseLiteSwift.framework from your Finder to the Xcode navigator.
  • Click on Project > General > Embedded Binary and add CouchbaseLiteSwift.framework to this section.
  • Import the framework and start using it in your project.

    import CouchbaseLiteSwift
    ...
    

  • Download the latest developer build.
  • Drag CouchbaseLite.framework from your Finder to the Xcode navigator.
  • Click on Project > General > Embedded Binary and add CouchbaseLite.framework to this section.
  • Import the framework and start using it in your project.

    #include <CouchbaseLite/CouchbaseLite.h>
    ...
    

Carthage

  1. Install Carthage
  2. Add github "couchbase/couchbase-lite-ios" "2.0DB011" to your Cartfile.
  3. Run carthage update --platform ios.
  4. Drag CouchbaseLiteSwift.framework from Carthage/Build/ to the Xcode navigator.
  5. Click on Project > General > Embedded Binary and add CouchbaseLiteSwift.framework to this section.

  1. Install Carthage
  2. Add github "couchbase/couchbase-lite-ios" "2.0DB011" to your Cartfile.
  3. Run carthage update --platform ios.
  4. Drag CouchbaseLite.framework from Carthage/Build/ to the Xcode navigator.
  5. Click on Project > General > Embedded Binary and add CouchbaseLite.framework to this section.

CocoaPods

  1. Install Cocoapods
  2. In your Podfile, add the following.

    target '<your target name>' do
      use_frameworks!
      pod 'CouchbaseLiteSwift', :git => 'https://github.com/couchbase/couchbase-lite-ios.git', :tag => '2.0DB011', :submodules => true
    end
    
  3. Install the pods and open the .xcworkspace file generated by Cocoapods.

    pod install
    

  1. Install Cocoapods
  2. In your Podfile, add the following.

    target '<your target name>' do
      use_frameworks!
      pod 'CouchbaseLite', :git => 'https://github.com/couchbase/couchbase-lite-ios.git', :tag => '2.0DB011', :submodules => true
    end
    
  3. Install the pods and open the .xcworkspace file generated by Cocoapods.

    pod install
    

  • Add http://mobile.nuget.couchbase.com/nuget/Developer/ to your Nuget package sources and expect a new build approximately every 2 weeks!

Your app must call the relevant Activate() function inside of the class that is included in the support assembly (there is only one public class in each support assembly, and the support assembly itself is a nuget dependency). For example, UWP looks like Couchbase.Lite.Support.UWP.Activate(). Currently the support assemblies provide dependency injected mechanisms for default directory logic, and platform specific logging (i.e. Android will log to logcat with correct log levels and tags. No more "mono-stdout" at always info level).

  • In the top-level build.gradle file, add the following Maven repository in the allprojects section.

    allprojects {
        repositories {
            jcenter()
            maven {
                url "http://mobile.maven.couchbase.com/maven2/dev/"
            }
        }
    }
    
  • Next, add the following in the dependencies section of the application's build.gradle (the one in the app folder).

    dependencies {
        compile 'com.couchbase.lite:couchbase-lite-android:2.0.0-DB011'
    }
    

Resources

The API references for the Swift SDK are available here.

Swift Playgrounds

The following Swift Playground covers the features that are implemented in the latest developer build.



  1. Download the playground.
  2. Install Couchbase Lite through Carthage carthage update --platform ios
  3. Open swift-playgrounds.xcworkspace in Xcode.
  4. Build the CBL Swift target.
  5. Follow instructions in the playgrounds.

The API references for the Objective-C SDK are available here.

The API references for the .NET SDK are available here.

The API references for the Java SDK are available here.

The following sections cover the features that are implemented in the latest developer build. Additionally, the tutorial app is incrementally updated to use the 2.0 API.