Release Notes

    +

    Description — Couchbase Lite on Objective-C
    Abstract — This content describes the key features and changes implemented by release 3.0 of Couchbase Lite on Objective-C
    Related Content — What’s New | Compatibility | Supported Platforms

    3.0.2 — August 2022

    Version 3.0.2 of Couchbase Lite for Objective-C delivers a number of fixes and enhancements.

    Enhancements

    3.0.1 — March 2022

    Version 3.0.1 of Couchbase Lite for Objective-C delivers a number of fixes and enhancements.

    Enhancements

    Highlights

    Couchbase Lite for Objective-C 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 startWithReset:];`
    Before
    [replicator resetCheckpoint];
    [replicator start];
    After
    [replicator startWithReset: YES];
    Database.setLogLevel
    Alternative

    CBLDatabase.log.console

    Before
    [CBLDatabase setLogLevel:kCBLLogLevelVerbose domain: kCBLLogDomainAll];
    After
    CBLDatabase.log.console.level = kCBLLogLevelVerbose;
    CBLDatabase.log.console.domains = kCBLLogDomainAll;
    Database.compact
    Alternative

    [db performMaintenance:error:]

    Before
    [testdb compact: &error];
    After
    [testdb performMaintenance:kCBLMaintenanceTypeCompact error:&error];

    Deprecated API

    Match
    Alternative

    [CBLQueryFullTextFunction matchWithIndexName: query:]

    Before
    CBLQueryFullTextExpression* index = [CBLQueryFullTextExpression indexWithName: @"indexName"];
    q = [CBLQueryBuilder select: @[[CBLQuerySelectResult expression: [CBLQueryMeta id]]]
                            from: [CBLQueryDataSource database: self.database]
                            where: [index match: @"'queryString'"]];
    After
        q = [CBLQueryBuilder select: @[[CBLQuerySelectResult expression: [CBLQueryMeta id]]]
                               from: [CBLQueryDataSource database: self.database]
                              where: [CBLQueryFullTextFunction matchWithIndexName: @"indexName"
                                                                            query: @"'queryString'"]];
    isNullOrMissing and notNullOrMissing
    Alternatives
    [exp isValued];
    [exp isNotValued];
    Before
        q = [CBLQueryBuilder select: @[[CBLQuerySelectResult expression: [CBLQueryMeta id]]]
                               from: [CBLQueryDataSource database: self.database]
                              where: [[CBLQueryExpression property: @"missingProp"] isNullOrMissing]];
    
        q2 = [CBLQueryBuilder select: @[[CBLQuerySelectResult expression: [CBLQueryMeta id]]]
                                from: [CBLQueryDataSource database: self.database]
                               where: [[CBLQueryExpression property: @"notMissingProp"] notNullOrMissing]];
    After
        q = [CBLQueryBuilder select: @[[CBLQuerySelectResult expression: [CBLQueryMeta id]]]
                               from: [CBLQueryDataSource database: self.database]
                              where: [[CBLQueryExpression property: @"missingProp"] isNotValued]];
    
        q2 = [CBLQueryBuilder select: @[[CBLQuerySelectResult expression: [CBLQueryMeta id]]]
                                from: [CBLQueryDataSource database: self.database]
                               where: [[CBLQueryExpression property: @"notMissingProp"] isValued]];

    Updated API

    ATAN2
    Breaking change

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

    Before
    q = [CBLQueryBuilder select: @[[CBLQuerySelectResult expression: [CBLQueryFunction atan2: p y: [CBLQueryExpression integer: 90]]]]
                                from: [CBLQueryDataSource database: self.database]];
    After
    q = [CBLQueryBuilder select: @[[CBLQuerySelectResult expression: [CBLQueryFunction atan2: [CBLQueryExpression integer: 90] x: p]]]
                               from: [CBLQueryDataSource database: self.database]];

    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.