A newer version of this documentation is available.

View Latest

Release Notes

      +

      3.0.15 — November 2023

      Version 3.0.15 for Swift delivers the following features and enhancements:

      Known Issues

      None for this release

      Deprecations

      None for this release

      3.0.12 — June 2023

      Version 3.0.12 for Swift delivers the following features and enhancements:

      3.0.1 — March 2022

      Version 3.0.1 of Couchbase Lite for Swift delivers a number of fixes and enhancements.

      Enhancements

      Highlights

      Couchbase Lite for Swift provides an enhancement to the Replicator Configuration API, which now allows you to specify the network interface to use for connecting to the remote target — see: Configure Network Interface.

      Issues and Resolutions

      Known Issues

      None for this release.

      3.0.0 — February 2022

      On upgrading from a 2.x release, all Couchbase Lite databases will be automatically re-indexed on initial database open.
      This can result in a delay before the database is usable.

      New Features

      SQL++/N1QL Query Strings

      Couchbase Lite’s SQL++ for Mobile query API vastly simplifies the integration of Couchbase Lite within hybrid/cross platform apps.

      N1QL for Mobile is an implementation of the emerging SQL-for-JSON query language specification (SQL++). It provides native, hybrid and cross-platform mobile app developers with a consistent, convenient and flexible interface to query JSON documents within the embedded database using a SQL-based syntax. This means developers can reuse queries across platforms, reducing development, testing and maintenance costs.

      Read More . . . SQL++ for Mobile

      Enhancements

      Auto-purge on Channel Access Revocation

      An auto-purge feature is introduced for loss of access to channels and the documents in them. This is important for enforcement of data governance and data retention policies.

      Channels are the fundamental mechanism for enforcement of access control using Sync Gateway. They guarantee that only users with access to a specific channel can access documents in that channel.

      When a user loses access to a channel (and so to its documents) Couchbase Lite clients will auto purge all local documents on devices that belong to the revoked channel (during Pull or PushAndPull replication), unless the user has access to the document via some other channel.

      Document API Support for JSON Data

      The Couchbase Lite API now offers out-of-the box support for document data in JSON format. This will make it easier for developers' applications to store, transform and manipulate JSON data in the database.

      The API offers JSON support for Documents, MutableDocuments, Arrays, MutableArrays, Dictionaries, MutableDictionaries and Query Results.

      Read More . . . Documents | Blobs

      Replicator Change Listeners

      The API is enhanced to allow replicator listeners to be added at any point without requiring a replicator restart.

      Other Enhancements

      API Changes

      Removed APIs

      ResetCheckpoint
      Alternative
      `replicator.start(reset:)`
      Before
      replicator.resetCheckpoint()
      replicator.start()
      After
      replicator.start(true)
      Database.setLogLevel
      Alternative

      Database.log.console

      Before
      Database.setLogLevel(.verbose, domain: .all)
      After
      Database.log.console.domain = .all
      Database.log.console.level = .verbose
      Database.compact
      Before
      try testdb.compact()
      After
      try testdb.performMaintenance(type: .compact)

      Deprecated API

      Match
      Alternative

      FullTextFunction.match(indexName:)

      Before
      let index = FullTextExpression.index ("indexName")
      let q = QueryBuilder.select([SelectResult.
      expression(Meta.id)])
                  .from(DataSource.database(testdb)) +
                  .where(index.match("'queryString'"))
      After
      let q = QueryBuilder.select([SelectResult.expression(Meta.id)])
                  .from(DataSource.database(testdb))
                  .where(FullTextFunction.match(indexName: "indexName", query: "'queryString'"))
      isNullOrMissing and notNullOrMissing
      Alternatives

      isNotValued()
      isValued()

      Before
      |let q1 = QueryBuilder.select([SelectResult.expression(Meta.id)])
                  .from(DataSource.database(testdb))
                  .where(Expression.property("missingProp").isNullOrMissing())
      
      let q2 = QueryBuilder.select([SelectResult.expression(Meta.id)])
                  .from(DataSource.database(testdb))
                  .where(Expression.property("notMissingProp").notNullOrMissing())
      After
      let q1 = QueryBuilder.select([SelectResult.expression(Meta.id)])
                  .from(DataSource.database(testdb))
                  .where(Expression.property("missingProp").isNotValued())
      
      let q2 = QueryBuilder.select([SelectResult.expression(Meta.id)])
                  .from(DataSource.database(testdb))
                  .where(Expression.property("notMissingProp").isValued())

      Updated API

      Configuration

      The following classes are changed to Swift struct.

      • DatabaseConfiguration

      • ReplicatorConfiguration

      • URLEndpointListenerConfiguration

      Before
      // use of let won't stop from editing instance later)
      
      let config = DatabaseConfiguration()
      config.encryptionKey = EncryptionKey.password(password!)
      
      let config = ReplicatorConfiguration(database: db, target: target)
      config.continuous = true
      After
      var config = DatabaseConfiguration()
      config.encryptionKey = EncryptionKey.password(password!)
      
      var config = ReplicatorConfiguration(database: db, target: target)
      config.continuous = true
      ATAN2
      Breaking change

      ATAN2(x, y) now becomes ATAN2(y, x)

      Before
      let p = Expression.property("number")
      let q = QueryBuilder.select([SelectResult.expression(Function.atan2(x: Expression.int(90), y: p))])
                  .from(DataSource.database(testdb))
      After
      let q = QueryBuilder.select([SelectResult.expression(Function.atan2(y: Expression.int(90), x: p))])
                  .from(DataSource.database(testdb))

      Known Issues

      None for this release.

      Fixed Issues

      Deprecated in this Release

      Items (features and-or functionality) are marked as deprecated when a more current, and usually enhanced, alternative is available.

      Whilst the deprecated item will remain usable, it is no longer supported, and will be removed in a future release — see also: Removed in this Release You should plan to move to an alternative, supported, solution as soon as practical.

      Previously Deprecated

      Support for iOS 9.0 is deprecated in version 2.6.

      Support for macOS 10.9 and 10.10 is deprecated in version 2.5.

      Support Notices

      This section documents any support-related notes, constraints and changes.

      New

      None specified in this release

      Ongoing

      Apple’s macOS is supported ONLY for testing and development purposes.