SDK Setup Guides
...
Swift
Release Notes

Ditto v4 for Swift

swift ios updates version changelog



DittoSwift Version 4.5.0

Released: Thu Dec 7, 2023
Added
`Ditto.version` class property providing access to the semantic version of the SDK. (#10223)
Added
Class `DittoQueryResultItem` representing a single match of a DQL query. (#10319, #10394)
Added
Class `DittoQueryResult` representing the result of executing a DQL query. (#10319, #10394)
Added
Method `execute()` on `DittoStore` that executes a DQL query and returns a `DittoQueryResult` containig `DittoQueryResultItem`s for each match. (#10319, #10394)
Added
Class `DittoSyncSubscription` that configures Ditto to receive updates from remote peers about documents matching the subscription's query. It's a DQL counterpart and successor to the old `Subscription` class. (#10395, #10394)
Added
Method `registerSubscription()` on `DittoSync` that installs and returns a `SyncSubscription`. (#10395, #10394)
Added
Property `subscriptions` on `DittoSync` providing access to all currently active sync subscriptions. (#10395, #10394)
Added
Property `sync` on `Ditto` of type `DittoSync` to serve as an entry point for sync functionality. (#10395, #10394)
Added
Class `DittoStoreObserver` on `DittoStore` that configures Ditto to invoke an observation handler whenever results for its query change. (#10396, #10394)
Added
Method `registerObserver()` on `DittoStore` that installs and returns a `DittoStoreObserver`. (#10396, #10394)
Added
Property `observers` on `DittoStore` providing access to all currently active store observers. (#10396, #10394)
Improved
Deprecated: `DittoLANConfig.isMulticastEnabled` property.. (#10126)- Changed: Ditto SDK is built and tested with Xcode 14.3.1. (#10177)
Improved
This version of Ditto drops support for iOS 13 and earlier. All devices that support iOS 13 also support iOS 14 and iOS 15. (#9842)
Improved
Performance by implementing bipartite distance-aware mesh topology. (#10632)
Improved
Memory usage and performance of Documents. (#10736)
Improved
Reduced metadata accumulation after eviction by clearing remote summaries. (#7065)
Improved
Serialization performance. (#9112)
Fixed
Made logging more robust to failed writes in a specific set of circumstances. (#10077)
Fixed
Addressed a warning from SQLite that sometimes occurs on startup about a schema change. (#10501)
Fixed
Presence graph may not show all active connections. (#10507)
Fixed
When observing peers, isConnectedToDittoCloud property may be incorrect. (#10534)
Fixed
Initial logging events now use the same format as all other logs. (#10611)
Fixed
Mesh could choose random connections. (#10711)
Fixed
A bug with Ditto's internal crash handler. (#10022)


DittoSwift Version 4.4.5

Released: Fri Nov 17, 2023
Added
SDK version/language/platform and device name are now included in the small peer info document. (#10515)


DittoSwift Version 4.4.4

Released: Wed Nov 14, 2023
Improved
Runtime validation of corrupted attachments being inserted into documents (#10552)
Fixed
An issue introduced in 4.4.2 where the Small Peer Info attachments were not replicated to the Portal. (#10538)


DittoSwift Version 4.4.3

Released: Tue Oct 24, 2023
Improved
Changed: Made `DittoAttachmentToken` conform to `Hashable`. (#10195)

installation


DittoSwift Version 4.4.2

Released: Fri Oct 6th 2023, 12:02 pm
Fixed
Small Peer info collection now defaults to localPeerOnly, preventing data from being collected on the Big Peer until the feature is explicitly enabled and sync scope is set to bigPeerOnly. (#10203, #10204)

installation


DittoSwift Version 4.4.1

Synchronized version bump release — no changes

Synchronized version bump release — no changes

installation


DittoSwift Version 4.4.0

Released: Thu Aug 31st 2023, 5:43 pm
Added
Property smallPeerInfo to Ditto allowing to configure the collection and sync of small peer info. (#9560)
Added
More informative log message for query failures caused by database access errors. (#9364)
Added
Small peers now persist structured log data to disk for later retrieval, with limits on the resulting disk usage. (#9547)
Improved
Print some internal errors in a more human-readable format. (#9269)
Improved
TransportConfig and its associated types can be serialized/deserialized into/from JSON and CBOR. (#9585)
Improved
Sets a minimum session refresh period. The small peer will always try to start refreshing its session after 3 days no matter how long the session period issue. Previously the small peer would start to refresh after half of the session length had elapsed. (#9594, #9645)
Improved
Initial replication time by reducing one roundtrip of messages before peers can sync. (#9404)
Improved
Attachment fetch time in several edge case scenarios. (#9501)
Improved
Efficiency by using less system resources when connected to peers but no replication changes are needing to be sent. (#9479, #7995)
Improved
Significantly reduced startup resource consumption linked to total document count. (#9501)
Fixed
A small memory leak each time ditto.auth.login(token:provider:completion:) was called. (#9695)
Fixed
Warning "Failed to clean up attachment fetcher. Token not found" that could occur during normal operation. (#9639)
Fixed
A scenario where a peer could incorrectly receive data back from other peers even after they had modified their subscription and evicted the old data. (#9404)
Fixed
An issue where unusually high replication write load in large meshes could block all readers from reading the database. (#9395, #8872)

installation


DittoSwift Version 4.3.1

Released: Thu Aug 10th 2023, 2:22 pm
Improved
Changed: Improved clarity of error messages when data on disk cannot be read by this version following a downgrade from a newer version of Ditto. (#9267)
Improved
Changed: Print some internal errors in a more human-readable format. (#9495)
Added
Added: iOS can now connect to servers with custom certificates. (#9368)

installation


DittoSwift Version 4.3.0

Released: Tue Jul 18th 2023, 10:02 pm
Added
Added: Optional customAuthURL parameter to the DittoIdentity.onlinePlayground enum case. (#9131)
Added
Added: An internal ability to measure & report the level of redundancy in replication updates to calculate the percentage of updates that are arriving from multiple peers. This will be used for future self-balancing mesh actions which are not yet enabled. (#8937)
Improved
Changed: new serialization format improves efficiency of replication, particularly in the Big Peer. (#8946)
Improved
Changed: Better logging for diagnosing auth failures. (#8984)
Improved
Changed: Improved replication performance by introducing a small internal caching layer for commonly computed values. (#8777)
Fixed
Fixed: The replication engine can now recover from certain filesystem corruption issues during sync instead of panicking. (#8965)
Fixed
Fixed: Increased validation of document updates, preventing updates that try to modify the document id. (#9063)


This SDK version will migrate some data formats on disk. Once upgraded to 4.3.0, an SDK can only be downgraded back to 4.2.2 and 4.2.1 but no earlier. Downgrading to versions earlier than 4.2.1 will require uninstalling and re-installing to clear out the new data formats. (#8946)

installation


DittoSwift Version 4.2.3

Released: Wed Jul 5th 2023, 3:32 pm
Fixed
Fixed: Problems connecting to the Ditto Cloud using

installation


DittoSwift Version 4.2.2

Released: Tue Jul 4th 2023, 10:42 am
Improved
Improved mesh performance when using 50+ Small Peer devices (#9077)
Improved
Changed: Improved deserialization performance of Documents. (#9123)
Fixed
Fixed: Increased validation of document updates, preventing updates that try to modify the document id. (#9129)
Fixed
Fixed: Removed outdated ERROR level log statements in Ditto store related to
Fixed
Fixed: The UpdateDifferentValues write strategy was incorrectly skipping non-alphanumeric document properties. (#9165)
Fixed
Fixed: a potential crash if a document attachment was malformed (#9045)
Fixed
Fixed: AWDL sync when certain special characters are present in device name (#9010, #9152)
Fixed
Fixed: Possible crash in AWDL transport in large meshes (#9143)

installation


DittoSwift Version 4.2.1

Released: Tue Jun 13th 2023, 3:47 pm
Fixed
Fixed: a possible crash due to serialisation when upgrading from version 4.1.0 or 4.1.1 (#8925)

installation


DittoSwift Version 4.2.0

Released: Tue Jun 13th 2023, 1:53 am
Added
Added: Experimental support for disk encryption. This API is experimental for the time being and is likely to change in the next couple of releases. (#8847)
Added
Added: login method that provides an extra String? argument (as compared to loginWithToken) that will be non-nil if the auth webhook provided any clientInfo JSON value. The String will be a JSON encoded string. (#8787)
Fixed
Changed: the existing loginWithToken is marked as deprecated. (#8787)
Improved
Changed: Improved replication uses compressed message stream to decrease bandwidth consumption. (#8807)
Improved
Changed: Reduce verbosity in replication logs (#8370)
Fixed
Fixed: a crash when using the typed(as:) API with a type that contains an optional array. (#8855)

installation


DittoSwift Version 4.1.1

Released: Thu May 18th 2023, 11:35 pm
Fixed
Fixed: Devices with hostnames longer than 35 bytes will no longer fail to sync over LAN.
Added
Added: dSYMs are now bundled inside the XCFramework to improve crash report symbolication.
Improved
Changed: The dSYMs directory has been removed from the root directory of the CocoaPods artifact since it's no longer required now that dSYMs are bundled inside XCFreameworks.

installation


DittoSwift Version 4.1.0

Released: Fri Apr 28th 2023, 11:52 am
Added
Added: Disabled replication state. When the Big Peer receives a query that is too big to be satisfied, it will explicitly disable replication with the remote peer, and send a message informing the remote peer that replication is disabled. This is in contrast to the previous behavior, where the Big Peer simply did not respond to the query.
Improved
Changed: now including NSNetServicesErrorCode and Domain in AWDL connect log messages
Improved
Changed: Ditto instances cannot be closed/deallocated from within a live query callback closure otherwise this can lead to a deadlock.
Added
Changed: (Experimental) Query Overlap Groups, Bus: a breaking protocol change for upcoming improvements. Peers using older versions will not be able to connect with newer peers until they upgrade.
Fixed
Fixed: A replication issue where certain cases that should have reset the replication session with a remote peer would instead temporarily terminate the connection while not resetting the session.
Fixed
Fixed: A replication issue that could cause failed convergence on small number of documents if updates are being received during a local eviction.
Improved
Security: Enforce immediate disconnection of any connected peers whose certificate expires during a sync session.

installation


DittoSwift Version 4.0.3-alpha.linux-ble-fixes-2

Released: Tue Apr 18th 2023, 1:22 am
Improved
Improvements to Bluetooth connection reliability on Linux

installation


DittoSwift Version 4.0.3-alpha.linux-ble-fixes

Released: Mon Apr 17th 2023, 3:19 pm
Fixed
Fixed: a replication issue that could cause failed convergence on small number of documents if updates are being received during a local eviction.
Improved
Improvements to Bluetooth connection reliability on Linux

installation


DittoSwift Version 4.0.2

Released: Thu Apr 20th 2023, 3:36 pm
Fixed
Fixed: A replication issue where certain cases that should have reset the replication session with a remote peer would instead temporarily terminate the connection while not resetting the session.
Fixed
Fixed: Correct handling of reset and disable errors from receive_update

installation


DittoSwift Version 4.0.1

Released: Thu Apr 6th 2023, 11:54 am
Fixed
Fixed: Resolved an issue with logging when the stdout is not available.

installation


DittoSwift Version 4.0.0

Released: Wed Mar 22nd 2023, 3:48 pm
Added
Added: AddWins removes will now be used if
Improved
Changed: If a problem occurs with an app's authentication webhook, the Small Peer that is trying to authenticate will log more detailed information for the developer.
Improved
Changed: old multihop connections are now automatically disconnected when direct connections are established with peers, freeing up unneeded resources faster.
Improved
Changed: reduced severity level for some routine log statements which were previously emitted at a WARN level.
Fixed
Fixed: some threads spawned by the SDK no longer wait up to 30 seconds before being stopped.
Fixed
Fixed: an issue which could cause Ditto to hang if more than 500 peers were encountered.
Fixed
Fixed: replication hanging under some circumstances, especially WebSocket connections to Big Peer
Fixed
Fixed: a possible crash if Ditto is configured with an invalid App ID. An error message is emitted instead.
Fixed
Fixed: an issue preventing clean Ditto shutdown.
Fixed
Fixed: cancelling subscriptions for queries with args would not work, the subscription would remain active indefinitely.
Fixed
Fixed: some memory leaks.
Fixed
Fixed: using the DittoBus no longer leads to Ditto instances not being deallocated properly.

installation


DittoSwift Version 4.0.0-beta1

Released: Thu Jan 26th 2023, 3:37 pm
Fixed
Fixed: an issue which could cause Ditto to hang if more than 500 peers were encountered.
Fixed
Fixed: an issue preventing clean Ditto shutdown.
Added
Fixed: AddWins removes will now be used if disableSyncWithV3 has been called on the Ditto object or the a peer has synced with another peer that has called disableSyncWithV3, or they have synced with another peer that has called disableSyncWithV3, etc.

installation


DittoSwift Version 4.0.0-alpha2

Released: Mon Jan 16th 2023, 2:16 pm
Added
Added: disableSyncWithV3 functionality to Ditto. Calling this will permanently remove the ability for the device that it is called on to sync with devices running v3 of the SDK. It also means that the device will then start performing AddWins removes when calling remove(). Any other device running v4 of the SDK that syncs with a device that has called disableSyncWithV3 (or has themselves synced with another device that has called disableSyncWithV3, etc - if any chain of syncing exists that involves a device that has called disableSyncWithV3) will also no longer be able to sync with v3 peers and will perform AddWins removes when calling remove().

installation