Skip to content

Implement Couchbase Lite 4.1 for iOS and macOS - #69

Open
jeffdgr8 wants to merge 1 commit into
cbl-4.1-jvmfrom
cbl-4.1-apple
Open

Implement Couchbase Lite 4.1 for iOS and macOS#69
jeffdgr8 wants to merge 1 commit into
cbl-4.1-jvmfrom
cbl-4.1-apple

Conversation

@jeffdgr8

Copy link
Copy Markdown
Owner

Implements the Couchbase Lite 4.1 common API for iOS and macOS: CouchbaseLite ObjC pod 4.1.0. Vector Search 2.0 is not published to CocoaPods, so a build task downloads the xcframework from packages.couchbase.com and generates a local podspec.

  • Apple actuals for the 4.1 API: collection-bound configs (initWithCollections:target:), Document.timestamp, Replicator.correlationId, new log domains, CBLKeyUsages-based TLSIdentity
  • Kotbase-side validation of same-database collections (the ObjC SDK throws an uncatchable NSInvalidArgumentException)
  • ListenerToken uses CBLListenerToken.remove (the 4.0 SDK removed removeChangeListenerWithToken and fixed the bug the old workaround covered)
  • Database.delete/inBatch on a closed database throw CouchbaseLiteException(NOT_OPEN), matching Java 4.1
  • Removes DatabaseChange/DatabaseChangeListener (backing class removed in ObjC 4.0; nothing can produce them since database-level listeners were removed)
  • Tests account for platform behavior differences (getInt out-of-range coercion differs between Java and ObjC/C; Fleece integers surface as Long on native)

macosX64 tests: CE 798 / EE 978, zero failures.

🤖 Generated with Claude Code

Updates the CouchbaseLite ObjC pod to 4.1.0. Vector Search 2.0 is not
published to the CocoaPods spec repo, so a build task now downloads
the xcframework from packages.couchbase.com and generates a local
podspec for it.

Apple actuals updated to 4.1:
- CollectionConfiguration bound to its Collection (initWithCollection);
  fromCollections
- ReplicatorConfiguration built via initWithCollections:target:, with
  kotbase-side validation of same-database-instance collections (the
  ObjC SDK throws an uncatchable NSInvalidArgumentException)
- Document.timestamp, Replicator.correlationId
- LogDomain adds PEER_DISCOVERY and MULTIPEER (ObjC MDNS domain is not
  exposed, matching the Java SDK)
- KeyUsage maps to the CBLKeyUsages bitmask;
  TLSIdentity.createIdentityForKeyUsages
- Listener configurations are collections-only
- ListenerToken uses CBLListenerToken.remove (the 4.0 SDK removed
  removeChangeListenerWithToken and fixed the bug the old workaround
  covered)
- FileLogSink maxFileSize is unsigned in 4.0
- FullTextFunction.rank(String) emulated via fullTextIndex expression
- Database.delete/inBatch on a closed database now throw
  CouchbaseLiteException(NOT_OPEN), matching Java 4.1 semantics
- Removed DatabaseChange/DatabaseChangeListener: the backing
  CBLDatabaseChange class was removed in ObjC 4.0 and kotbase removed
  the deprecated database-level listeners that produced them
- Removed the private CBLDocument.generation interop declaration
  (symbol removed in 4.x; replaced by the public timestamp API)

Tests updated for platform behavior differences: getInt of an
out-of-range long is 0 on Java but truncates on ObjC/C (new
intWhenLongOutOfRange test helper), and Fleece integers surface as
Long on native (predictive model tests no longer unsafely cast).

macosX64 tests: CE 798, EE 978, all extension modules green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant