Realm Cocoa Versions Save

Realm is a mobile database: a replacement for Core Data & SQLite

v10.49.1

3 weeks ago

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

4 weeks ago

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

1 month ago

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

1 month ago

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 in build.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

2 months ago

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:
    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])
      }
    }
    
    Geospatial queries (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).
    class 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) })
    
    A filter or NSPredicate 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

2 months ago

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 of AppConfiguration 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's dateEncodingStrategy (#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 of Realm.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

3 months ago

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

3 months ago

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 and SyncSession.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

3 months ago

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 and SyncSession.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.

v10.45.1

4 months ago

Fixed

  • Exceptions thrown while applying the initial download for a sync subscription change terminated the program rather than being reported to the sync error handler (Core #7196 and Core #7197).
  • Calling SyncSession.reconnect() while a reconnect after a non-fatal error was pending would result in an assertion failure mentioning "!m_try_again_activation_timer" if another non-fatal error was received (Core #6961).

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.24.1 to 13.25.0