SDK Setup Guides
...
Swift
Release Notes

Ditto v1 for Swift

swift ios updates version changelog



DittoSwift Version 1.1.11

Released: Fri Sep 9, 2022, 4:11 pm
Fixed
Fixed: a very rare deadlock when starting sync immediately after creating the Ditto instance.

installation


DittoSwift Version 1.1.10

Released: Thu Jul 7, 2022, 12:53 pm
Improved
Changed: reduced total memory overhead during sync.
Fixed
Fixed: private class inside the Ditto SDK was named CBOR and conflicted with a private Apple class named exactly the same, which produced a warning at launch time.

installation


DittoSwift Version 1.1.9

Released: Wed Jun 15, 2022, 6:27 pm
Improved
Changed: reduced CRDT memory overhead.
Improved
Changed: HTTP/WebSocket service now allows any origin for CORS, so it may be used from a webapp on localhost.
Fixed
Fixed: a peer using an online identity would fail to sync peer-to-peer after app restarts.
Fixed
Fixed: DittoDelegate method dittoIdentityProviderAuthenticationRequest(ditto:request:) would receive a DittoAuthenticationRequest with some properties being incorrectly set to nil.
Fixed
Fixed: DittoDelegate method dittoIdentityProviderAuthenticationRequest(ditto:request:) would receive a DittoAuthenticationRequest with some properties being incorrectly set to nil.

installation


DittoSwift Version 1.1.9-alpha1

Released: Wed Jun 8, 2022, 8:12 pm
Added
Synchronized version bump release

installation


DittoSwift Version 1.1.8

Released: Fri Jun 3, 2022, 12:13 am
Fixed
Fixed: Ditto with onlinePlaygroundV2 identity would fail to sync with the Big Peer if internet access isn't available at the time when Ditto is instantiated.
Fixed
Fixed: DittoSwift contained an invalid development signature.

installation


DittoSwift Version 1.1.7

Released: Fri May 13, 2022, 7:18 am
Added
Synchronized version bump release.

installation


DittoSwift Version 1.1.6

Released: Mon May 9, 2022, 5:04 am
Fixed
Fixed: a correctness issue in replication when peer permissions changed in the middle of a replication exchange.
Fixed
Fixed: error when querying a collection and there was a type mismatch for a field being used in a comparison in the query.
Fixed
Fixed: restarting an app too quickly could lead to multiple connection attempts to rejoin peers in the mesh.
Fixed
Fixed: apps using OnlinePlaygroundV2 identities could experience a one minute delay before peer-to-peer sync occurs.
Fixed
Fixed: cloud sync would stop working when setting a newly created transport config.
Improved
Changed: Improvements to Ditto mesh performance via fastest-available-transport prioritization.

installation


DittoSwift Version 1.1.5

Released: Fri Apr 8, 2022, 1:00 am
Improved
Synchronized version bump release

installation


DittoSwift Version 1.1.4

Released: Thu Apr 7, 2022, 11:25 pm
Improved
Changed: improved replication performance in some scenarios.

installation


DittoSwift Version 1.1.3

Released: Tue Mar 22, 2022, 3:13 am
Added
Added: onlinePlaygroundV2 case to DittoIdentity allowing for basic authentication for playgrounds
Improved
Deprecated: onlinePlayground case of DittoIdentity, use newly added onlinePlaygroundV2 instead
Fixed
Fixed: sync issues due to inconsistent handling of app IDs across SDKs
Fixed
Fixed: document IDs are now validated when synced and removed if invalid (some of our early versions of the SDK stored malformed IDs under certain circumstances)

installation


DittoSwift Version 1.1.2

Released: Mon Feb 28, 2022, 6:36 am
Added
Added: property isReady to experimental DittoBusStream to check if a message may be enqueued.
Added
Added: method setOfflineOnlyLicenseToken() to class Ditto as replacement for now deprecated setLicenseToken().
Improved
Changed: made DittoBusStream, DittoRemotePeerV2, and DittoAddress adopt Equatable and Hashable protocols.
Improved
Changed: made DittoRemotePeerV2 adopt the Identifiable.protocol.
Improved
Deprecated: method setLicenseToken() of class Ditto, use newly added setOfflineOnlyLicenseToken() instead.

installation


DittoSwift Version 1.1.1

Released: Fri Feb 11, 2022, 9:38 pm
Improved
Changed: Optimized the performance of accessing the value of a Document.
Added
Added: Combine publisher APIs obviating the CombineDitto extension library
Added
Added: remotePeersPublisher() method to Ditto class
Added
Added: fetchAttachmentPublisher(attachmentToken:) method to DittoCollection class
Added
Added: liveQueryPublisher() method to DittoPendingCursorOperation class
Added
Added: singleDocumentLiveQueryPublisher() method to DittoPendingIDSpecificOperation class
Added
Added: Experimental Bus API
Added
Added: dittoBus(_, didReceiveSingleMessage:) method to DittoBusDelegate protocol
Added
Added: dittoBus(_, didReceiveIncomingStream:, fromPeer:) method to DittoBusDelegate protocol
Improved
Removed: dittoBus(_, didReceive:) method from `DittoBusDelegate protocol
Added
Added: Experimental mesh roles API
Added
Added: setMeshRole(meshRole:, ditto:) method to DittoExperimental class
Added
Added: setPriorityForMeshRole(_, forMeshRole:, ditto:) to DittoExperimental class
Fixed
Fixed: Improved AWDL reliability on iOS 12

installation


DittoSwift Version 1.1.0

Released: Fri Jan 28, 2022, 3:21 am
Improved
Changed: improved peer-to-peer algorithms to create meshes that are more efficient and diverse.
Improved
Changed: improved routing algorithms for more efficiency.
Improved
Changed: improved performance of query parsing.
Added
Added: property isSyncActive to class Ditto.
Added
Added: method logout() to class DittoAuthenticator.
Added
Added: set of APIs to observe authentication status (see API reference for DittoAuthenticator and DittoAuthenticationDelegate).
Added
Added: method upsert() to classes DittoCollection and DittoScopedWriteTransaction (as a replacement for insert() & friends) which by default merges the newly inserted document if one with the same ID already exists.
Improved
Deprecated: properties isAuthenticated and userID of class DittoAuthenticator in favor of newly introduced property status.
Improved
Deprecated: methods insert() & frinds of classes DittoCollection and DittoScopedWriteTransaction in favor of newly introduced upsert().

installation


DittoSwift Version 1.0.19

Released: Thu Dec 23, 2021, 12:42 pm
Fixed
Fixed: collections were not appearing in the data browser under certain permission configurations.
Fixed
Fixed: race condition when subscriptions were configured from multiple threads in parallel (sometimes leading to a crash).

installation


DittoSwift Version 1.0.18

Released: Mon Dec 20, 2021, 5:22 am
Improved
Fixed a number of Codable-related bugs. One of the more notable fixes involves Codable-conforming types from Foundation now working as you'd expect.
Fixed
Fixed some small memory leaks.
Improved
Reduced the opportunity for rapid memory growth in some scenarios.

installation


DittoSwift Version 1.0.18-alpha2

Released: Tue Dec 14, 2021, 8:32 am
Improved
Improve attachment sync performance.
Fixed
Fix an issue where memory usage could grow very quickly when using a live query and performing lots of operations that led to a live query update.

installation


DittoSwift Version 1.0.18-alpha1

Released: Wed Dec 8, 2021, 9:25 am
Fixed
Fixed an issue where document IDs that were specified inside the document's value as opposed to being specified explicitly (as a separate argument to insert) weren't being processed correctly, potentially leading to bugs with merge and overwrite behaviors.
Added
macOS (including Apple Silicon) and iOS simulator (on an Apple Silicon device) support has been added.

installation


DittoSwift Version 1.0.17

Released: Thu Nov 25, 2021, 4:11 pm
Added
Fix an issue with write strategies not working correctly. Unexpected results could occur when performing sequences of operations on documents.
Fixed
Fix a bug with Codable-conforming enums that was causing a runtime error.

installation


DittoSwift Version 1.0.16

Released: Fri Nov 19, 2021, 2:39 pm
Fixed
Fix an issue with live queries that involved a limit, no offset, at least one document being deleted, and some other conditions being met. Live queries that met these conditions could report incorrect sets of matching documents.
Fixed
Fix an issue that could potentially lead to an infinite loop in the replication system, meaning no sync progress would be made.

installation


DittoSwift Version 1.0.15

Released: Fri Nov 5, 2021, 3:03 pm
Improved
Ensure that when performing a sort that if a document that matches the filter specified via the accompanying find call doesn't have the key specified in the sort expression then it won't lead to an error. Now, if you're sorting in a descending order then the documents without the key specified in the sort will appear at the end of the set of results, after all of the documents that do have the key present. If you're sorting in an ascending order then the documents without the sort key will appear first in the set of documents, before all of the documents that do contain the sort key.
Fixed
Fixed handling of large integers in documents. Integers larger than Int.max were still trying to be handled as Ints, leading to crashes. We now correctly handle them as UInts when appropriate.
Added
Add the ability to directly set values inside the closure passed to an update call with assignments done via = sets, e.g. collection.findByID("123").update { $0!["color"] = "white" }
Fixed
Fix a bug where some transports related calls were not being run on the correct thread and so could lead to a crash.

installation


DittoSwift Version 1.0.15-alpha1

Released: Wed Oct 27, 2021, 3:33 am
Fixed
Fix a bug where large integers (greater than Int.max) would mistakenly try to get internally represented by an Int. They are now correctly represented using a UInt instead.

installation


DittoSwift Version 1.0.14

Released: Mon Oct 25, 2021, 1:31 am
Added
Add support for array projections to DittoQL.
Improved
Deprecate the online identity in favor of the new onlineWithAuthentication identity.
Improved
Deprecate the development identity in favor of the new offlinePlayground identity.
Added
Add an auth property to Ditto that provides access to a DittoAuthenticator when using an appropriate identity with your Ditto instance.
Added
Add support for using a document ID that is an object that conforms to Codable.

installation


DittoSwift Version 1.0.13

Released: Mon Oct 18, 2021, 10:02 am
Improved
Synchronized version bump release

installation


DittoSwift Version 1.0.12

Released: Mon Oct 18, 2021, 3:00 am
Added
Added global section to TransportConfig allowing P2P sync to be contained within certain groups of devices by putting them in the same "sync group".
Fixed
Fixed Xcode warning regarding .swiftsourceinfo files being present.

installation


DittoSwift Version 1.0.11

Released: Thu Oct 7, 2021, 10:09 pm
Added
Added DittoWriteStrategy enum.
Added
Added method insertWithStrategy() to DittoCollection, allowing to specify the behavior when inserting a document with an ID that matches the ID of a document already in the store.
Fixed
Fixed AWDL peers never re-connecting after transport is toggled.
Fixed
Fixed mDNS transport crash.
Fixed
Fixed sporadic hangs and crashes when using Online identity.
Added
Added isAuthenticated() method and userID property to DittoAuthenticator.
Fixed
Fixed Codable support for non-string IDs and Float and Double types.

installation


DittoSwift Version 1.0.10

Released: Fri Sep 10, 2021, 9:21 am
Fixed
Fix to stop a change in site ID from leading to an unnecessary error.
Improved
Improve handling of persisted authentication data. Note that this might lead to a one-off change to a peer's site ID if you weren't and continue to not be specifying an explicit site ID when creating your identity.

installation


DittoSwift Version 1.0.9

Released: Fri Sep 3, 2021, 3:38 pm
Added
Added support for getting information about all of the collections that the device is aware of. This is achieved by accessing collections() through the store object and then using the same sort of API used when getting documents in collections, i.e. exec/observe/etc.
Added
Added multicast as a transport option to the LAN config part of TransportConfig.
Added
Added new identity types: Online and OnlinePlayground. An Online identity should be used when running Ditto in secure production mode, logging on to Ditto Cloud, or using an on-premises authentication server. User permissions are centrally managed. Sync will not work until a successful login has occurred. An OnlinePlayground identity should be used when you want to test a Ditto Cloud app without authentication ("Playground mode"). This mode offers no security and must only be used for development.
Improved
The Production identity has been renamed to Manual.
Added
Added a DittoAuthenticator type, accessible via the Ditto object, which allows you to perform login operations when you're using an Online identity.
Added
Similarly, added an DittoAuthenticationDelegate type that needs to be used when using an Online identity.
Added
Report an error if more than one Ditto instance is started using the same working directory.

installation


DittoSwift Version 1.0.8

Released: Mon Aug 2, 2021, 9:19 am
Improved
Improved debug logging.

installation


DittoSwift Version 1.0.7

Released: Thu Jul 22, 2021, 4:38 pm
Fixed
Fix bug where sync may fail if an unusually long deviceName is configured
Fixed
Fix intermittent crash when Bluetooth L2CAP connections fail
Fixed
Fix intermittent crash when using the presence viewer component and the app is backgrounded

installation


DittoSwift Version 1.0.6

Released: Thu Jul 8, 2021, 11:22 am
Added
Add value accessor on DittoDocumentPath, DittoMutableDocumentPath, and DittoDocumentIDPath types to allow accessing a nested value in a document/ID as an Any?.

installation


DittoSwift Version 1.0.5

Released: Fri Jun 25, 2021, 3:36 pm
Added
Added a new find function that accepts a query containing placeholders in the form of $args.my_arg along with a map of query arguments in the form of { "my_arg": "some value" }. The placeholders in the query will be replaced by a query-appropriate representation of the relevant value from the map of query arguments. For example, a query of color == $args.color with a query arguments map of { "color": "red" } would internally be treated as a query of: color == "red".
Fixed
Added the ability to get a hash and/or a mnemonic (string) representation of the matching documents from a live query event. This means you can do something like this: let liveQuery = collection.findAll().observe() { docs, event in event.hash(docs); // e.g. `1950015808188223905` event.hashMnemonic(docs); // e.g. `locate-quality-tina--helena-remote-cat` // ... }
Fixed
Fix for using floats in queries.
Improved
Accessing the store property of a Ditto instance will no longer throw an error if you have not yet activated your Ditto instance with a valid license token.
Improved
Deprecated setAccessLicense and added a new function, setLicenseToken, which will throw an appropriate error if your provided license token is expired or invalid somehow.
Added
Deprecated startSync and added a new function, tryStartSync, which will throw an error if your Ditto instance hasn't yet been activated via a successful call to setLicenseToken.

installation


DittoSwift Version 1.0.4

Released: Fri Jun 11, 2021, 3:36 pm
Fixed
Fix issue with AWDL transport where it could end up in a stuck state.
Improved
Deprecate the find(query:) function on DittoScopedWriteTransaction and add a new version of find(:) that doesn't require the query argument label. This makes this consistent with the find(:) function on DittoCollection.

installation


DittoSwift Version 1.0.3

Released: Thu Jun 10, 2021, 9:34 am
Added
Bluetooth sync performance improvements with L2CAP support added.

installation


DittoSwift Version 1.0.2

Released: Thu May 20, 2021, 2:39 pm
Added
Add support for subscripting DittoDocumentIDs in order to get nested values when a document ID is based on an array or a dictionary.
Improved
Deprecated .toNative() on DittoDocumentID. You should use .value instead.

installation


DittoSwift Version 1.0.1

Released: Tue May 4, 2021, 9:02 am
Improved
If you provide an invalid query then you will now get a better error message.

installation


DittoSwift Version 1.0.0

Released: Wed Apr 21, 2021, 5:29 pm
Added
This release is not compatible with any previous SDK releases. There are a number of breaking changes both in terms of the SDK API and in terms of the internal systems used by the SDK to perform operations such as synchronization. If you have previously made use of the Ditto SDK and wish to update to this version then note that you will need to delete all existing Ditto data otherwise you will run into errors. If you have existing data that you need to keep then please contact us and we can advise you as to how you can migrate your data.
Fixed
The most notable API breaking changes are: Document IDs are no longer restricted to just strings. You can now create a document ID that is a string, integer, boolean, array, map, or null. This means that when making findByID or insert calls you now need to provide a DittoDocumentID object rather than a string. Similarly, when you access a document's ID it will now return a DittoDocumentID object instead of a string. The start() and stop() functions on the Ditto object have been renamed to startSync() and stopSync() respectively. They now also don't accept any arguments. If you wish to specify which transports you would like the Ditto SDK to make use of (along with any configuration that they might require) you now need to use the setTransportConfig function on the Ditto object, and pass to that a transport config object. The default transports that will be enabled are still the same as they were in previous releases of the SDK though, so if you have no custom requirements then you can simply change your start() call to startSync().
Improved
Lots of performance improvements and bug fixes.

installation


DittoSwift Version 1.0.0-alpha8

Released: Fri Jan 22, 2021, 7:09 am
Fixed
Fixed a bug where mDNS advertising may continue after Ditto is stopped.
Fixed
Fixed a hang that could occur creating an attachment fetcher while requesting many attachments at once.
Fixed
Fixed sync failure when there are multiple overlapping subscriptions or live queries with the same query string for the same collection.
Fixed
Fixed a potential crash and other sync failures that could occur under certain conditions.

installation