Skip to content

Releases: realm/realm-swift

v2.4.1

27 Jan 20:05
Compare
Choose a tag to compare

Bugfixes

  • Fix an issue where authentication tokens were not properly refreshed
    automatically before expiring.

v2.4.0

27 Jan 05:54
a0c5399
Compare
Choose a tag to compare

This release drops support for compiling with Swift 2.x.
Swift 3.0.0 is now the minimum Swift version supported.

API Breaking Changes

  • None.

Enhancements

  • Add change notifications for individual objects with an API similar to that
    of collection notifications.

Bugfixes

  • Fix Realm Objective-C compilation errors with Xcode 8.3 beta 1.
  • Fix several error handling issues when renewing expired authentication
    tokens for synchronized Realms.
  • Fix a race condition leading to bad_version exceptions being thrown in
    Realm's background worker thread.

v2.3.0

19 Jan 09:36
a26ff22
Compare
Choose a tag to compare

Sync Breaking Changes

  • Make SyncPermissionChange's id property a primary key.

API Breaking Changes

  • None.

Enhancements

  • Add SyncPermissionOffer and SyncPermissionOfferResponse classes to allow
    creating and accepting permission change events to synchronized Realms between
    different users.
  • Support monitoring sync transfer progress by registering notification blocks
    on SyncSession. Specify the transfer direction (.upload/.download) and
    mode (.reportIndefinitely/.forCurrentlyOutstandingWork) to monitor.

Bugfixes

  • Fix a call to commitWrite(withoutNotifying:) committing a transaction that
    would not have triggered a notification incorrectly skipping the next
    notification.
  • Fix incorrect results and crashes when conflicting object insertions are
    merged by the synchronization mechanism when there is a collection
    notification registered for that object type.

v2.2.0

12 Jan 21:27
b45da9f
Compare
Choose a tag to compare

Sync Breaking Changes (In Beta)

  • Underlying sync engine upgraded to version BETA-6.5.
  • Sync-related error reporting behavior has been changed. Errors not related
    to a particular user or session are only reported if they are classed as
    'fatal' by the underlying sync engine.

API Breaking Changes

  • The following Objective-C APIs have been deprecated in favor of newer or preferred versions:
Deprecated API New API
-[RLMArray sortedResultsUsingProperty:] -[RLMArray sortedResultsUsingKeyPath:]
-[RLMCollection sortedResultsUsingProperty:] -[RLMCollection sortedResultsUsingKeyPath:]
-[RLMResults sortedResultsUsingProperty:] -[RLMResults sortedResultsUsingKeyPath:]
+[RLMSortDescriptor sortDescriptorWithProperty:ascending] +[RLMSortDescriptor sortDescriptorWithKeyPath:ascending:]
RLMSortDescriptor.property RLMSortDescriptor.keyPath
  • The following Swift APIs have been deprecated in favor of newer or preferred versions:
Deprecated API New API
LinkingObjects.sorted(byProperty:ascending:) LinkingObjects.sorted(byKeyPath:ascending:)
List.sorted(byProperty:ascending:) List.sorted(byKeyPath:ascending:)
RealmCollection.sorted(byProperty:ascending:) RealmCollection.sorted(byKeyPath:ascending:)
Results.sorted(byProperty:ascending:) Results.sorted(byKeyPath:ascending:)
SortDescriptor(property:ascending:) SortDescriptor(keyPath:ascending:)
SortDescriptor.property SortDescriptor.keyPath

Enhancements

  • Introduce APIs for safely passing objects between threads. Create a
    thread-safe reference to a thread-confined object by passing it to the
    +[RLMThreadSafeReference referenceWithThreadConfined:]/ThreadSafeReference(to:)
    constructor, which you can then safely pass to another thread to resolve in
    the new Realm with -[RLMRealm resolveThreadSafeReference:]/Realm.resolve(_:).
  • Realm collections can now be sorted by properties over to-one relationships.

Bugfixes

  • Setting deleteRealmIfMigrationNeeded now also deletes the Realm if a file
    format migration is required, such as when moving from a file last accessed
    with Realm 0.x to 1.x, or 1.x to 2.x.
  • Fix queries containing nested SUBQUERY expressions.
  • Fix spurious incorrect thread exceptions when a thread id happens to be
    reused while an RLMRealm instance from the old thread still exists.

v2.1.2

20 Dec 00:53
50891fb
Compare
Choose a tag to compare

This release adds binary versions of Swift 3.0.2 frameworks built with Xcode 8.2.

Sync Breaking Changes (In Beta)

  • Rename occurences of "iCloud" with "CloudKit" in APIs and comments to match
    naming in the Realm Object Server.

API Breaking Changes

  • None.

Enhancements

  • Add support for 'LIKE' queries (wildcard matching).

Bugfixes

  • Fix authenticating with CloudKit.

v2.1.1

03 Dec 01:05
Compare
Choose a tag to compare

Enhancements

  • Add RealmSwift.ObjectiveCSupport.convert(object:) methods to help write
    code that interoperates between Realm Objective-C and Realm Swift APIs.
  • Throw exceptions when opening a Realm with an incorrect configuration, like:
    • readOnly set with a sync configuration.
    • readOnly set with a migration block.
    • migration block set with a sync configuration.
  • Greatly improve performance of write transactions which make a large number of
    changes to indexed properties, including the automatic migration when opening
    files written by Realm 1.x.

Bugfixes

  • Reset sync metadata Realm in case of decryption error.
  • Fix issue preventing using synchronized Realms in Xcode Playgrounds.
  • Fix assertion failure when migrating a model property from object type to
    RLMLinkingObjects type.
  • Fix a LogicError: Bad version number exception when using RLMResults with
    no notification blocks and explicitly called -[RLMRealm refresh] from that
    thread.
  • Logged-out users are no longer returned from +[RLMSyncUser currentUser] or
    +[RLMSyncUser allUsers].
  • Fix several issues which could occur when the 1001st object of a given type
    was created or added to an RLMArray/List, including crashes when rerunning
    existing queries and possibly data corruption.
  • Fix a potential crash when the application exits due to a race condition in
    the destruction of global static variables.
  • Fix race conditions when waiting for sync uploads or downloads to complete
    which could result in crashes or the callback being called too early.

v2.1.0

18 Nov 23:28
bf64b42
Compare
Choose a tag to compare

API breaking changes

  • None.

Enhancements

  • Add the ability to skip calling specific notification blocks when committing
    a write transaction.

Bugfixes

  • Deliver collection notifications when beginning a write transaction which
    advances the read version of a Realm (previously only Realm-level
    notifications were sent).
  • Fix some scenarios which would lead to inconsistent states when using
    collection notifications.
  • Fix several race conditions in the notification functionality.
  • Don't send Realm change notifications when canceling a write transaction.

v2.0.4

15 Nov 06:30
418f2f4
Compare
Choose a tag to compare

API breaking changes

  • Remove RLMAuthenticationActions and replace
    +[RLMSyncCredential credentialWithUsername:password:actions:] with
    +[RLMSyncCredential credentialsWithUsername:password:register:].
  • Rename +[RLMSyncUser authenticateWithCredential:] to
    +[RLMSyncUser logInWithCredentials:].
  • Rename "credential"-related types and methods to
    RLMSyncCredentials/SyncCredentials and consistently refer to credentials
    in the plural form.
  • Change +[RLMSyncUser all] to return a dictionary of identifiers to users and
    rename to:
    • +[RLMSyncUser allUsers] in Objective-C.
    • SyncUser.allUsers() in Swift 2.
    • SyncUser.all in Swift 3.
  • Rename SyncManager.sharedManager() to SyncManager.shared in Swift 3.
  • Change Realm.Configuration.syncConfiguration to take a SyncConfiguration
    struct rather than a named tuple.
  • +[RLMSyncUser logInWithCredentials:] now invokes its callback block on a
    background queue.

Enhancements

  • Add +[RLMSyncUser currentUser].
  • Add the ability to change read, write and management permissions for
    synchronized Realms using the management Realm obtained via the
    -[RLMSyncUser managementRealmWithError:] API and the
    RLMSyncPermissionChange class.

Bugfixes

  • None.

v2.0.3

27 Oct 21:25
bfcd87e
Compare
Choose a tag to compare

This release adds binary versions of Swift 3.0.1 frameworks built with Xcode 8.1
GM seed.

API breaking changes

  • None.

Enhancements

  • None.

Bugfixes

  • Fix a BadVersion exception caused by a race condition when delivering
    collection change notifications.
  • Fix an assertion failure when additional model classes are added and
    deleteRealmIfMigrationNeeded is enabled.
  • Fix a BadTransactLog exception when deleting an RLMResults in a synced
    Realm.
  • Fix an assertion failure when a write transaction is in progress at the point
    of process termination.
  • Fix a crash that could occur when working with a RLMLinkingObject property
    of an unmanaged object.

v2.0.2

06 Oct 00:21
Compare
Choose a tag to compare

This release is not protocol-compatible with previous version of the Realm
Mobile Platform.

API breaking changes

  • Rename Realm Swift's User to SyncUser to make clear that it relates to the
    Realm Mobile Platform, and to avoid potential conflicts with other User types.

Bugfixes

  • Fix Realm headers to be compatible with pre-C++11 dialects of Objective-C++.
  • Fix incorrect merging of RLMArray/List changes when objects with the same
    primary key are created on multiple devices.
  • Fix bad transaction log errors after deleting objects on a different device.
  • Fix a BadVersion error when a background worker finishes running while older
    results from that worker are being delivered to a different thread.