1- x.y.z Release notes (yyyy-MM-dd )
1+ 20.0.0 Release notes (2024-09-09 )
22=============================================================
33
44The minimum supported version of Xcode is now 15.3.
55
66### Enhancements
7+
78* Build in Swift 6 language mode when using Xcode 16. Libraries build in Swift
89 6 mode can be consumed by apps built in Swift 5 mode, so this should not have
910 any immediate effects beyond eliminating some warnings and ensuring that all
@@ -19,9 +20,6 @@ The minimum supported version of Xcode is now 15.3.
1920 of macros. It can still be used as a property wrapper for class properties
2021 and as a manual wrapper locally, but note that it does not combine well with
2122 actor-isolated Realms.
22- - In Swift 6 mode a few mongo client functions have changed from returning
23- `[AnyHashable: Any]` to `Document`. These should have been `Document` all
24- along, and the old return type no longer compiles due to not being Sendable.
2523* Some SwiftUI components are now explicitly marked as `@MainActor`. These
2624 types were implicitly `@MainActor` in Swift 5, but became nonisolated when
2725 using Xcode 16 in Swift 5 mode due to the removal of implicit isolation when
@@ -30,21 +28,59 @@ The minimum supported version of Xcode is now 15.3.
3028* Add Xcode 16 and 16.1 binaries to the release packages (currently built with
3129 beta 6 and beta 1 respectively).
3230
33- ### Fixed
34- * <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-swift/issues/????), since v?.?.?)
35- * None.
31+ ### Breaking Changes
3632
37- <!-- ### Breaking Changes - ONLY INCLUDE FOR NEW MAJOR version -->
33+ * All Atlas App Services and Atlas Device Sync functionality has been removed.
34+ Users of Atlas Device Sync should pin to v10.
35+ * Queries on AnyRealmValue properties previously considered strings to be
36+ equivalent to Data containing the UTF-8 encoded string. Strings and Data are
37+ now considered different types and queries for one of them will not match the
38+ other.
39+ * Realms are no longer autoreleased when initialized. This means that code
40+ along the lines of the following will no longer work:
41+
42+ ```Swift
43+ try! Realm().beginWrite()
44+ try! Realm().create(MyObject.self, value: ...)
45+ try! Realm().commitWrite()
46+ ```
47+
48+ This was a pattern which was somewhat natural with the original version of
49+ the objective-c API, but only worked in debug builds and would fail in
50+ release builds. We decided to make it consistently work by forcing the Realm
51+ to be autoreleased rather than let users write code which appeared to work
52+ but was actually broken. In modern Swift this code is very strange, and
53+ autoreleasing the Realm made it much more difficult to ensure that the
54+ file is actually closed at predictable times.
55+
56+ Realms are now returned retained in both debug and release modes, so this
57+ will always break rather than appearing to work. Note that there is still a
58+ weak cache of Realms and `Realm()` will still return a reference to the
59+ existing Realm if there is one open on the current thread.
60+ * Iterating a Map now produces the tuple `(key: KeyType, value: ValueType)`
61+ rather than a very similar struct, and `.asKeyValueSequence()` has been
62+ removed. This aligns `Map` with `Dictionary` and makes many operations
63+ defined by `Sequence` work on `Map`.
64+ * Passing an empty array for notification keypaths to filter on (e.g.
65+ `obj.observe(keyPaths: [])`) was treated the same as passing `nil`, i.e. no
66+ filtering was done. It now instead observes no keypaths. For objects this
67+ means it will only report the object being deleted, and for collections it
68+ will only report collection-level changes and not changes to the objects
69+ inside the collection.
70+ * `Decimal128(string:)` was marked as `throws`, but it never actually threw an
71+ error and instead returned `NaN` if the string could not be parsed as a
72+ decimal128. That behavior was kept and it is no longer marked as `throws`.
3873
3974### Compatibility
75+
4076* Realm Studio: 15.0.0 or later.
41- * APIs are backwards compatible with all previous releases in the 10.x.y series.
4277* Carthage release for Swift is built with Xcode 15.4.0.
4378* CocoaPods: 1.10 or later.
4479* Xcode: 15.3.0-16.1 beta.
4580
4681### Internal
47- * Upgraded realm-core from ? to ?
82+
83+ * Upgraded realm-core from v14.12.1 to v20.0.0.
4884
498510.53.1 Release notes (2024-09-05)
5086=============================================================
0 commit comments