Releases: realm/realm-swift
Releases · realm/realm-swift
v10.49.2
Enhancements
- The default base url in
AppConfiguration
has been updated to point toservices.cloud.mongodb.com
. See https://www.mongodb.com/docs/atlas/app-services/domain-migration/ for more information. (#8512)
Fixed
- Fixed a crash that would occur when an http error 401 or 403 is returned upon
opening a watch stream for a MongoDB collection. (#8519) - Fix an assertion failure "m_lock_info && m_lock_info->m_file.get_path() == m_filename" that appears to be related to opening a Realm while the file is in the process of being closed on another thread. (#8507)
- Fixed diverging history due to a bug in the replication code when setting default null values (embedded objects included). (Core #7536)
- Null pointer exception may be triggered when logging out and async commits callbacks not executed. (Core #7434)
AppConfiguration.baseUrl
will now return the default value of the url when not set rather thannil
. (#8512)- Added privacy manifest to Core's Swift package (Swift #8535)
- Fixed crash when integrating removal of already removed dictionary key (Core #7488, since v10.0.0)
Compatibility
- Realm Studio: 15.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 15.3.0.
- CocoaPods: 1.10 or later.
- Xcode: 14.2-15.3.0.
Internal
- Upgraded realm-core from 14.4.1 to 14.5.2
v10.49.1
Enhancements
- Improve file compaction performance on arm64 platforms for encrypted files
between 16kB and 4MB in size. (PR #7492).
Fixed
- Opening a Realm with a cached user while offline would fail to retry some
steps of the connection process and instead report a fatal error.
(#7349, since v10.46.0)
Compatibility
- Realm Studio: 14.0.1 or later.
- APIs are backwards compatible with all previous releases in the 10.x.y series.
- Carthage release for Swift is built with Xcode 15.3.0.
- CocoaPods: 1.10 or later.
- Xcode: 14.2-15.3.0.
Internal
- Upgraded realm-core from v14.3.0 to 14.4.1
v10.49.0
This version introduces a new Realm file format version (v24). Opening existing
Realm files will automatically upgrade the files, making them unable to be
opened by older versions. This upgrade process should typically be very fast
unless you have large Sets of AnyRealmValue, String, or Data, which have to be rewritten.
A backup will automatically be created next to the Realm before performing the
upgrade. Downgrading to older versions of Realm will attempt to automatically
restore the backup, or it will be deleted after three months.
Enhancements
- Storage of Decimal128 properties has been optimised similarly to Int
properties so that the individual values will take up 0 bits (if all nulls),
32 bits, 64 bits or 128 bits depending on what is needed.
(Core #6111) - Improve file compaction performance on arm64 platforms for encrypted files
between 16kB and 4MB in size. (PR #7492).
Fixed
- Sorting on binary Data was done by comparing bytes as signed char rather than
unsigned char, resulting in very strange orders (since sorting on Data was
enabled in v6.0.4) - Sorting on AnyRealmValue did not use a valid total ordering, and certain
combinations of values could result in values not being sorted or potentially
even crashes. The resolution for this will result in some previously-valid
combinations of values of different types being sorted in different orders
than previously (since the introduction of AnyRealmValue in 10.8.0). - RLMSet/MutableSet was inconsistent about if it considered a String and a Data
containing the utf-8 encoded bytes of that String to be equivalent. They are
now always considered distinct. (since the introduction of sets in v10.8.0). - Equality queries on a Mixed property with an index could sometimes return
incorrect results if values of different types happened to have the same hash
code. (Core 6407 since v10.8.0). - Creating more than 8388606 links pointing to a single object would crash.
(Core #6577, since v5.0.0) - A Realm generated on a non-apple ARM 64 device and copied to another platform
(and vice-versa) were non-portable due to a sorting order difference. This
impacts strings or binaries that have their first difference at a non-ascii
character. These items may not be found in a set, or in an indexed column if
the strings had a long common prefix (> 200 characters).
(Core #6670, since 2.0.0 for indexes, and since since the introduction of sets in v10.8.0) - Fix a spurious crash related to opening a Realm on background thread while
the process was in the middle of exiting (Core #7420). - Opening a Realm with a cached user while offline would fail to retry some
steps of the connection process and instead report a fatal error.
(#7349, since v10.46.0)
Breaking Changes
- Drop support for opening pre-v5.0.0 Realm files.
Compatibility
- Realm Studio: 14.0.1 or later.
- APIs are backwards compatible with all previous releases in the 10.x.y series.
- Carthage release for Swift is built with Xcode 15.3.0.
- CocoaPods: 1.10 or later.
- Xcode: 14.2-15.3.0. Note that we will be dropping support for Xcode 14 when
Apple begins requiring Xcode 15 for app store submissions on April 29.
Internal
- Upgraded realm-core from 13.26.0 to 14.3.0
v10.48.1
Fixed
- The Realm.framework privacy manifest was missing
NSPrivacyAccessedAPICategoryDiskSpace, but we check free disk space before
attempting to automatically back up Realm files (since 10.46.0).
Compatibility
- Realm Studio: 14.0.1 or later.
- APIs are backwards compatible with all previous releases in the 10.x.y series.
- Carthage release for Swift is built with Xcode 15.3.0.
- CocoaPods: 1.10 or later.
- Xcode: 14.2-15.3.0.
v10.48.0
Enhancements
- Lifted a limitation that would prevent declaring a model with only computed properties. (#8414)
- Add Xcode 15.3 to the release package (PR #8502).
Fixed
- Fix multiple arguments support via the
REALM_EXTRA_BUILD_ARGUMENTS
environment variable inbuild.sh
. (PR #8413). Thanks, @hisaac! - Fix some of the new sendability warnings introduced in Xcode 15.3 (PR #8502).
Compatibility
- Realm Studio: 14.0.1 or later.
- APIs are backwards compatible with all previous releases in the 10.x.y series.
- Carthage release for Swift is built with Xcode 15.3.0.
- CocoaPods: 1.10 or later.
- Xcode: 14.2-15.3.0.
v10.47.0
Enhancements
- Added initial support for geospatial queries on points. There is no new dedicated type to store Geospatial points, instead points should be stored as (GeoJson-shaped) embedded object, as the example below:
Geospatial queries (
public class Location: EmbeddedObject { @Persisted private var coordinates: List<Double> @Persisted private var type: String = "Point" public var latitude: Double { return coordinates[1] } public var longitude: Double { return coordinates[0] } convenience init(_ latitude: Double, _ longitude: Double) { self.init() // Longitude comes first in the coordinates array of a GeoJson document coordinates.append(objectsIn: [longitude, latitude]) } }
geoWithin
) can only be executed on such a type of objects and will throw otherwise. The queries can be used to filter objects whose points lie within a certain area, using the following pre-established shapes (GeoBox
,GeoPolygon
,GeoCircle
).Aclass Person: Object { @Persisted var name: String @Persisted var location: Location? // GeoJson embedded object } let realm = realmWithTestPath() try realm.write { realm.add(PersonLocation(name: "Maria", location: Location(latitude: 55.6761, longitude: 12.5683))) } let shape = GeoBox(bottomLeft: (55.6281, 12.0826), topRight: (55.6762, 12.5684))! let locations = realm.objects(PersonLocation.self).where { $0.location.geoWithin(shape) })
filter
orNSPredicate
can be used as well to perform a Geospatial query.let shape = GeoPolygon(outerRing: [(-2, -2), (-2, 2), (2, 2), (2, -2), (-2, -2)], holes: [[(0, 0), (1, 1), (-1, 1), (0, 0)]])! let locations = realm.objects(PersonLocation.self).filter("location IN %@", shape) let locations = realm.objects(PersonLocation.self).filter(NSPredicate(format: "location IN %@", shape))
Compatibility
- Realm Studio: 14.0.1 or later.
- APIs are backwards compatible with all previous releases in the 10.x.y series.
- Carthage release for Swift is built with Xcode 15.2.0.
- CocoaPods: 1.10 or later.
- Xcode: 14.2-15.2.0.
Internal
- Migrated Release pipelines to Github Actions.
v10.46.0
Enhancements
- Add a privacy manifest to both frameworks.
- Internal C++ symbols are no longer exported from Realm.framework when installing via CocoaPods, which reduces the size of the binary by ~5%, improves app startup time a little, and eliminates some warnings when linking the framework. This was already the case when using Carthage or a prebuilt framework (PR #8464).
- The
baseURL
field ofAppConfiguration
can now be updated, rather than the value being persisted between runs of the application in the metadata storage. (Core #7201) - Allow in-memory synced Realms. This will allow setting an in-memory identifier on a flexible sync realm.
Fixed
@Persisted
's Encodable implementation did not allow the encoder to customize the encoding of values, which broke things like JSONEncoder'sdateEncodingStrategy
(#8425).- Fix running Package.swift on Linux to support tools like Dependabot which need to build the package description but not the package itself (#8458, since v10.40.1).
Breaking Changes
- The
schemaVersion
field ofRealm.Configuration
must now always be zero for synchronized Realms. Schema versions are currently not applicable to synchronized Realms and the field was previously not read.
Compatibility
- Realm Studio: 14.0.1 or later.
- APIs are backwards compatible with all previous releases in the 10.x.y series.
- Carthage release for Swift is built with Xcode 15.2.0.
- CocoaPods: 1.10 or later.
- Xcode: 14.2-15.2.0.
Internal
- Upgraded realm-core from 13.25.1 to 13.26.0
v10.45.3
Enhancements
- Update release packaging for Xcode 15.2. Prebuilt binaries for 14.1 and 15.0
have now been dropped from the release package.
Compatibility
- Realm Studio: 14.0.1 or later.
- APIs are backwards compatible with all previous releases in the 10.x.y series.
- Carthage release for Swift is built with Xcode 15.2.0.
- CocoaPods: 1.10 or later.
- Xcode: 14.2-15.2.0.
v10.45.2
Enhancements
- Greatly improve the performance of creating objects with a very large number
of pre-existing incoming links. This is primarily relevant to initial sync
bootstrapping when linking objects happen to be synchronized before the
target objects they link to (Core #7217, since v10.0.0).
Fixed
- Registering new notifications inside write transactions before actually
making any changes is now actually allowed. This was supposed to be allowed
in 10.39.1, but it did not actually work due to some redundant validation. SyncSession.ProgressDirection
andSyncSession.ProgressMode
were missing
Sendable
annotations (PR #8435).Realm.Error.subscriptionFailed
was reported with the incorrect error
domain, making it impossible to catch (since v10.42.2, PR #8435).
Compatibility
- Realm Studio: 14.0.1 or later.
- APIs are backwards compatible with all previous releases in the 10.x.y series.
- Carthage release for Swift is built with Xcode 15.1.0.
- CocoaPods: 1.10 or later.
- Xcode: 14.1-15.1.0.
Internal
- Upgraded realm-core from 13.25.0 to 13.25.1
v10.46.0-beta1
Fixed
- Registering new notifications inside write transactions before actually
making any changes is now actually allowed. This was supposed to be allowed
in 10.39.1, but it did not actually work due to some redundant validation. SyncSession.ProgressDirection
andSyncSession.ProgressMode
were missing
Sendable
annotations (PR #8435).Realm.Error.subscriptionFailed
was reported with the incorrect error
domain, making it impossible to catch (since v10.42.2, PR #8435).
Compatibility
- Realm Studio: 14.0.1 or later.
- APIs are backwards compatible with all previous releases in the 10.x.y series.
- Carthage release for Swift is built with Xcode 15.1.0.
- CocoaPods: 1.10 or later.
- Xcode: 14.1-15.1.0.