Enhancements
- Replace mentions of 'MongoDB Realm' with 'Atlas App Services' in the documentation and update appropriate links to documentation.
- Allow adding a subscription querying for all documents of a type in swift for flexible sync.
try await subscriptions.update {
subscriptions.append(QuerySubscription<SwiftPerson>(name: "all_people"))
}
- Add Combine API support for flexible sync beta.
- Add an
initialSubscriptions
parameter when retrieving the flexible sync configuration from a user,
which allows to specify a subscription update block, to bootstrap a set of flexible sync subscriptions
when the Realm is first opened.
There is an additional optional parameter flagrerunOnOpen
, which allows to run this initial
subscriptions on every app startup.
let config = user.flexibleSyncConfiguration(initialSubscriptions: { subs in
subs.append(QuerySubscription<SwiftPerson>(name: "people_10") {
$0.age > 10
})
}, rerunOnOpen: true)
let realm = try Realm(configuration: config)
- The sync client error handler will report an error, with detailed info about which object caused it, when writing an object to a flexible sync Realm outside of any query subscription. (#5528)
- Adding an object to a flexible sync Realm for a type that is not within a query subscription will now throw an exception. (#5488).
Fixed
- Flexible Sync query subscriptions will correctly complete when data is synced to the local Realm. (#5553, since v12.0.0)
Breaking Changes
- Rename
SyncSubscriptionSet.write
toSyncSubscriptionSet.update
to avoid confusion withRealm.write
. - Rename
SyncSubscription.update
toSyncSubscription.updateQuery
to avoid confusion withSyncSubscriptionSet.update
. - Rename
RLMSyncSubscriptionSet.write
toRLMSyncSubscriptionSet.update
to align it with swift API.
Compatibility
- Realm Studio: 11.0.0 or later.
- APIs are backwards compatible with all previous releases in the 10.x.y series.
- Carthage release for Swift is built with Xcode 13.4.
- CocoaPods: 1.10 or later.
- Xcode: 13.1-13.4.
Internal
- Upgraded realm-core from 12.0.0 to 12.1.0.