Swiftpack.co - couchbase/couchbase-lite-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by couchbase.
couchbase/couchbase-lite-ios v1.495
Lightweight, embedded, syncable NoSQL database engine for iOS and MacOS apps.
⭐️ 1,614
🕓 2 years ago
iOS macOS
.package(url: "https://github.com/couchbase/couchbase-lite-ios.git", from: "v1.495")

Couchbase Lite for iOS and MacOS

License Build Status Coverage Status

Couchbase Lite is an embedded lightweight, document-oriented (NoSQL), syncable database engine.

Couchbase Lite implementation is on top of Couchbase Lite Core, which is also a new cross-platform implementation of database CRUD and query features, as well as document versioning.

Requirements

  • iOS 12.0+ | macOS 12.0+

Installation

Swift Package

Requirements:

  • XCode 12+
Community Edition
dependencies: [
        .package(name: "CouchbaseLiteSwift",
                 url: "https://github.com/couchbase/couchbase-lite-ios.git", 
                 from: "3.2.0-beta.1"),
    ],
Enterprise Edition
dependencies: [
        .package(name: "CouchbaseLiteSwift",
                 url: "https://github.com/couchbase/couchbase-lite-swift-ee.git", 
                 from: "3.2.0-beta.1"),
    ],

More detailed information on how to setup is available here: swift package manager

CocoaPods

You can use CocoaPods to install CouchbaseLite for Objective-C API or CouchbaseLiteSwift for Swift API by adding it in your Podfile:

Objective-C

Community Edition
target '<your target name>' do
  use_frameworks!
  pod 'CouchbaseLite'
end
Enterprise Edition
target '<your target name>' do
  use_frameworks!
  pod 'CouchbaseLite-Enterprise'
end

Swift

Community Edition
target '<your target name>' do
  use_frameworks!
  pod 'CouchbaseLite-Swift'
end
Enterprise Edition
target '<your target name>' do
  use_frameworks!
  pod 'CouchbaseLite-Swift-Enterprise'
end

Carthage

You can use Carthage to install CouchbaseLite by adding it in your Cartfile:

Community Edition
binary "https://packages.couchbase.com/releases/couchbase-lite-ios/carthage/CouchbaseLite-Community.json"
Enterprise Edition
binary "https://packages.couchbase.com/releases/couchbase-lite-ios/carthage/CouchbaseLite-Enterprise.json"

When running carthage update or build, Carthage will build both CouchbaseLite and CouchbaseLiteSwift framework.

How to build the framework files.

  1. Clone the repo and update submodules
$ git clone https://github.com/couchbase/couchbase-lite-ios.git
$ cd couchbase-lite-ios
$ git submodule update --init --recursive
  1. If not already installed, install doxygen, brew install doxygen

  2. Run ./Scripts/build_framework.sh to build a platform framework which could be either an Objective-C or a Swift framework. The supported platforms include iOS, tvOS, and macOS.

$ ./Scripts/build_framework.sh -s "CBL ObjC" -p iOS -o output    // For building the ObjC framework for iOS
$ ./Scripts/build_framework.sh -s "CBL Swift" -p iOS -o output   // For building the Swift framework for iOS

Documentation

Sample Apps

  • Todo : Objective-C and Swift

License

Like all Couchbase source code, this is released under the Apache 2 license.

GitHub

link
Stars: 1614
Last commit: 36 minutes ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

3.2.0-beta.1
3 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics