Changelog History
Page 17
-
v3.2.0-beta.2 Changes
February 28, 2018๐ Realm Object Server v3.0.0-alpha.8 or newer is required when using synchronized Realms.
โจ Enhancements
- โ Added
findOrCreate(forRoleNamed:)
andfindOrCreate(forRole:)
toList<Permission>
to simplify the process of adding permissions for a role. - โ Added
+permissionForRoleNamed:inArray:
,+permissionForRoleNamed:onRealm:
,+permissionForRoleNamed:onClass:realm:
,+permissionForRoleNamed:onClassNamed:realm:
, and+permissionForRoleNamed:onObject:
toRLMSyncPermission
to simplify the process of adding permissions for a role. - โ Added
+[RLMSyncSession sessionForRealm:]
to retrieve the sync session corresponding to aRLMRealm
.
๐ Bugfixes
PermissionRole.users
andPermissionUser.roles
are now public as intended.- ๐ Fixed the handling of
setPermissions
in-[RLMRealm privilegesForRealm]
and related methods.
- โ Added
-
v3.2.0-beta.1 Changes
February 19, 2018โจ Enhancements
- โ Added an improved API for adding subscriptions in partially-synchronized Realms.
Results.subscribe()
can be used to subscribe to any result set, and the returnedSyncSubscription
object can be used to observe the state of the subscription and ultimately to remove the subscription. - โ Added a fine-grained permissions system for use with partially-synchronized Realms. This allows permissions to be
defined at the level of individual objects or classes. See
Permission
and related types for more information.
๐ Bugfixes
- ๐ Fix some warnings when running with UBsan.
- โ Added an improved API for adding subscriptions in partially-synchronized Realms.
-
v3.1.1 Changes
February 03, 2018Prebuilt Swift frameworks for Carthage are now built with Xcode 9.2.
๐ Bugfixes
- ๐ Fix a memory leak when opening Realms with an explicit
objectTypes
array from Swift.
- ๐ Fix a memory leak when opening Realms with an explicit
-
v3.1.0 Changes
January 16, 2018- Prebuilt frameworks are now included for Swift 3.2.3 and 4.0.3.
- Prebuilt frameworks are no longer included for Swift 3.0.x.
- ๐ Building from source with Xcode versions prior to Xcode 8.3 is no longer supported.
โจ Enhancements
- โ Add
Results.distinct(by:)
/-[RLMResults distinctResultsUsingKeyPaths:]
, which return aResults
containing only objects with unique values at the given key paths. - ๐ Improve performance of change checking for notifications in certain cases.
- Realm Object Server errors not explicitly recognized by the client are now reported to the application regardless.
- โ Add support for JSON Web Token as a sync credential source.
- โ Add support for Nickname and Anonymous Auth as a sync credential source.
- ๐ Improve allocator performance when writing to a highly fragmented file. This should significantly improve performance when inserting large numbers of objects which have indexed properties.
- ๐ Improve write performance for complex object graphs involving many classes linking to each other.
๐ Bugfixes
- โ Add a missing check for a run loop in the permission API methods which require one.
- ๐ Fix some cases where non-fatal sync errors were being treated as fatal errors.
-
v3.0.2 Changes
November 08, 2017Prebuilt frameworks are now included for Swift 3.2.2 and 4.0.2.
๐ Bugfixes
- ๐ Fix a crash when a linking objects property is retrieved from a model object instance via Swift subscripting.
- ๐ Fix incorrect behavior if a call to
posix_fallocate
is interrupted.
-
v3.0.1 Changes
October 26, 2017๐ Bugfixes
- Explicitly exclude KVO-generated object subclasses from the schema.
- ๐ Fix regression where the type of a Realm model class is not properly determined, causing crashes
when a type value derived at runtime by
type(of:)
is passed into certain APIs. - ๐ Fix a crash when an
Object
subclass has implicitly ignoredlet
properties. - ๐ Fix several cases where adding a notification block from within a notification callback could produce incorrect results.
-
v3.0.0 Changes
October 16, 2017๐ฅ Breaking Changes
- ๐ iOS 7 is no longer supported.
- ๐ Synchronized Realms require a server running Realm Object Server v2.0 or higher.
- Computed properties on Realm object types are detected and no longer added to the automatically generated schema.
- โก๏ธ The Objective-C and Swift
create(_:, value: update:)
APIs now correctly nil out nullable properties when updating an existing object when thevalue
argument specifies nil orNSNull
for the property value. - โก๏ธ
-[RLMRealm addOrUpdateObjects:]
and-[RLMRealm deleteObjects:]
now require their argument to conform toNSFastEnumeration
, to match similar APIs that also take collections. - ๐ The way interactive sync errors (client reset and permission denied)
are delivered to the user has been changed. Instead of a block which can
be invoked to immediately delete the offending Realm file, an opaque
token object of type
RLMSyncErrorActionToken
will be returned in the error object'suserInfo
dictionary. This error object can be passed into the new+[RLMSyncSession immediatelyHandleError:]
API to delete the files. - ๐ The return types of the
SyncError.clientResetInfo()
andSyncError.deleteRealmUserInfo()
APIs have been changed. They now returnRLMSyncErrorActionToken
s orSyncError.ActionToken
s instead of closures. - The class methods
Object.className()
,Object.objectUtilClass()
, and the propertyObject.isInvalidated
can no longer be overriden. - ๐ The callback which runs when a sync user login succeeds or fails
now runs on the main queue by default, or can be explicitly specified
by a new
callbackQueue
parameter on the{RLM}SyncUser.logIn(...)
API. - ๐ Fix empty strings, binary data, and null on the right side of
BEGINSWITH
,ENDSWITH
andCONTAINS
operators in predicates to match Foundation's semantics of never matching any strings or data. - Swift
Object
comparison and hashing behavior now works the same way as that ofRLMObject
(objects are now only considered equatable if their model class defines a primary key). - ๐ Fix the way the hash property works on
Object
when the object model has no primary key. - ๐ Fix an issue where if a Swift model class defined non-generic managed
properties after generic Realm properties (like
List<T>
), the schema would be constructed incorrectly. Fixes an issue where creating such models from an array could fail. - Loosen
RLMArray
andRLMResults
's generic constraint fromRLMObject
toNSObject
. This may result in having to add some casts to disambiguate types. - โ Remove
RLMSyncPermissionResults
.RLMSyncPermission
s are now vended out using aRLMResults
. This results collection supports all normal collection operations except for setting values using key-value coding (sinceRLMSyncPermission
s are immutable) and the property aggregation operations. - ๐
RLMSyncUserInfo
has been significantly enhanced. It now contains metadata about a user stored on the Realm Object Server, as well as a list of all user account data associated with that user. - Starting with Swift 4,
List
now conforms toMutableCollection
instead ofRangeReplaceableCollection
. For Swift 4, the empty collection initializer has been removed, and default implementations of range replaceable collection methods that make sense forList
have been added. - ๐
List.removeLast()
now throws an exception if the list is empty, to more closely match the behavior of the standard library'sCollection.removeLast()
implementation. RealmCollection
's associated typeElement
has been renamedElementType
.- The following APIs have been renamed:
Old API New API NotificationToken.stop()
NotificationToken.invalidate()
-[RLMNotificationToken stop]
-[RLMNotificationToken invalidate]
RealmCollection.addNotificationBlock(_:)
RealmCollection.observe(_:)
RLMSyncProgress
RLMSyncProgressMode
๐ List.remove(objectAtIndex:)
List.swap(_:_:)
List.swapAt(_:_:)
๐ SyncPermissionValue
RLMSyncPermissionValue
RLMSyncPermission
-[RLMSyncPermission initWithRealmPath:userID:accessLevel]
-[RLMSyncPermission initWithRealmPath:identity:accessLevel:]
RLMSyncPermission.userId
RLMSyncPermission.identity
โก๏ธ -[RLMRealm addOrUpdateObjectsInArray:]
- ๐ The following APIs have been removed:
๐ | Removed API | Replacement | |:-------------------------------------------------------------|:------------------------------------------------------------------------------------------| |
Object.className
| None, was erroneously present. | |RLMPropertyTypeArray
|RLMProperty.array
| |PropertyType.array
|Property.array
| |-[RLMArray sortedResultsUsingProperty:ascending:]
|-[RLMArray sortedResultsUsingKeyPath:ascending:]
| |-[RLMCollection sortedResultsUsingProperty:ascending:]
|-[RLMCollection sortedResultsUsingKeyPath:ascending:]
| |-[RLMResults sortedResultsUsingProperty:ascending:]
|-[RLMResults sortedResultsUsingKeyPath:ascending:]
| |+[RLMSortDescriptor sortDescriptorWithProperty:ascending:]
|+[RLMSortDescriptor sortDescriptorWithKeyPath:ascending:]
| |RLMSortDescriptor.property
|RLMSortDescriptor.keyPath
| |AnyRealmCollection.sorted(byProperty:ascending:)
|AnyRealmCollection.sorted(byKeyPath:ascending:)
| |List.sorted(byProperty:ascending:)
|List.sorted(byKeyPath:ascending:)
| |LinkingObjects.sorted(byProperty:ascending:)
|LinkingObjects.sorted(byKeyPath:ascending:)
| |Results.sorted(byProperty:ascending:)
|Results.sorted(byKeyPath:ascending:)
| |SortDescriptor.init(property:ascending:)
|SortDescriptor.init(keyPath:ascending:)
| |SortDescriptor.property
|SortDescriptor.keyPath
| ๐ง |+[RLMRealm migrateRealm:configuration:]
|+[RLMRealm performMigrationForConfiguration:error:]
| |RLMSyncManager.disableSSLValidation
|RLMSyncConfiguration.enableSSLValidation
| ๐ |SyncManager.disableSSLValidation
|SyncConfiguration.enableSSLValidation
| |RLMSyncErrorBadResponse
|RLMSyncAuthErrorBadResponse
| |RLMSyncPermissionResults
|RLMResults
| ๐ |SyncPermissionResults
|Results
| |RLMSyncPermissionChange
|-[RLMSyncUser applyPermission:callback]
/-[RLMSyncUser deletePermission:callback:]
| |-[RLMSyncUser permissionRealmWithError:]
|-[RLMSyncUser retrievePermissionsWithCallback:]
| |RLMSyncPermissionOffer
|-[RLMSyncUser createOfferForRealmAtURL:accessLevel:expiration:callback:]
| |RLMSyncPermissionOfferResponse
|-[RLMSyncUser acceptOfferForToken:callback:]
| |-[NSError rlmSync_clientResetBlock]
|-[NSError rlmSync_errorActionToken]
/-[NSError rlmSync_clientResetBackedUpRealmPath]
| โ |-[NSError rlmSync_deleteRealmBlock]
|-[NSError rlmSync_errorActionToken]
|โจ Enhancements
List
can now contain values of typesBool
,Int
,Int8
,Int16
,Int32
,Int64
,Float
,Double
,String
,Data
, andDate
(and optional versions of all of these) in addition toObject
subclasses. QueryingList
s containing values other thanObject
subclasses is not yet implemented.RLMArray
can now be constrained with the protocolsRLMBool
,RLMInt
,RLMFloat
,RLMDouble
,RLMString
,RLMData
, andRLMDate
in addition to protocols defined withRLM_ARRAY_TYPE
. By defaultRLMArray
s of non-RLMObject
types can contain null. Indicating that the property is required (by overriding+requiredProperties:
) will instead make the values within the array required. QueryingRLMArray
s containing values other thanRLMObject
subclasses is not yet implemented.- โ Add a new error code to denote 'permission denied' errors when working
with synchronized Realms, as well as an accompanying block that can be
called to inform the binding that the offending Realm's files should be
deleted immediately. This allows recovering from 'permission denied'
errors in a more robust manner. See the documentation for
RLMSyncErrorPermissionDeniedError
for more information. - โ Add Swift
Object.isSameObject(as:_)
API to perform the same function as the existing Objective-C API-[RLMObject isEqualToObject:]
. - ๐ Opening a synced Realm whose local copy was created with an older version of
Realm Mobile Platfrom when a migration is not possible to the current version
will result in an
RLMErrorIncompatibleSyncedFile
/incompatibleSyncedFile
error. When such an error occurs, the original file is moved to a backup location, and future attempts to open the synchronized Realm will result in a new file being created. If you wish to migrate any data from the backup Realm you can open it using the backup Realm configuration available on the error object. - โ Add a preview of partial synchronization. Partial synchronization allows a
synchronized Realm to be opened in such a way that only objects requested by
the user are synchronized to the device. You can use it by setting the
isPartial
property on aSyncConfiguration
, opening the Realm, and then callingRealm.subscribe(to:where:callback:)
with the type of object you're interested in, a string containing a query determining which objects you want to subscribe to, and a callback which will report the results. You may add as many subscriptions to a synced Realm as necessary.
๐ Bugfixes
- ๐ป Realm no longer throws an "unsupported instruction" exception in some cases when opening a synced Realm asynchronously.
- Realm Swift APIs that filter or look up the index of an object based on a format string now properly handle optional arguments in their variadic argument list.
-[RLMResults<RLMSyncPermission *> indexOfObject:]
now properly accounts for access level.- ๐ Fix a race condition that could lead to a crash accessing to the freed configuration object if a default configuration was set from a different thread.
- ๐ Fixed an issue that crash when enumerating after clearing data during migration.
- ๐ Fix a bug where a synced Realm couldn't be reopened even after a successful client reset in some cases.
- ๐ Fix a bug where the sync subsystem waited too long in certain cases to reconnect to the server.
- ๐ Fix a bug where encrypted sync-related metadata was incorrectly deleted from upgrading users, resulting in all users being logged out.
- ๐ Fix a bug where permission-related data continued to be synced to a client even after the user that data belonged to logged out.
- ๐ Fix an issue where collection notifications might be delivered inconsistently if a notification callback was added within another callback for the same collection.
-
v3.0.0-rc.2 Changes
October 14, 2017โจ Enhancements
- Reinstate
RLMSyncPermissionSortPropertyUserID
to allow users to sort permissions to their own Realms they've granted to others.
๐ Bugfixes
-[RLMResults<RLMSyncPermission *> indexOfObject:]
now properly accounts for access level.- ๐ Fix a race condition that could lead to a crash accessing to the freed configuration object if a default configuration was set from a different thread.
- ๐ Fixed an issue that crash when enumerating after clearing data during migration.
- ๐ Fix a bug where a synced Realm couldn't be reopened even after a successful client reset in some cases.
- ๐ Fix a bug where the sync subsystem waited too long in certain cases to reconnect to the server.
- ๐ Fix a bug where encrypted sync-related metadata was incorrectly deleted from upgrading users, resulting in all users being logged out.
- ๐ Fix a bug where permission-related data continued to be synced to a client even after the user that data belonged to logged out.
- ๐ Fix an issue where collection notifications might be delivered inconsistently if a notification callback was added within another callback for the same collection.
- Reinstate
-
v3.0.0-rc.1 Changes
October 03, 2017๐ฅ Breaking Changes
- โ Remove
RLMSyncPermissionSortPropertyUserID
to reflect changes in how the Realm Object Server reports permissions for a user. - โ Remove
RLMSyncPermissionOffer
andRLMSyncPermissionOfferResponse
classes and associated helper methods and functions. Use the-[RLMSyncUser createOfferForRealmAtURL:accessLevel:expiration:callback:]
and-[RLMSyncUser acceptOfferForToken:callback:]
methods instead.
๐ Bugfixes
- The keychain item name used by Realm to manage the encryption keys for sync-related metadata is now set to a per-app name based on the bundle identifier. Keys that were previously stored within the single, shared Realm keychain item will be transparently migrated to the per-application keychain item.
- ๐ Fix downloading of the Realm core binaries when Xcode's command-line tools are set as the active developer directory for command-line interactions.
- ๐ Fix a crash that could occur when resolving a ThreadSafeReference to a
List
whose parent object had since been deleted.
- โ Remove
-
v3.0.0-beta.4 Changes
September 22, 2017๐ฅ Breaking Changes
- ๐ Rename
List.remove(objectAtIndex:)
toList.remove(at:)
to match the name used by 'RangeReplaceableCollection'. - ๐ Rename
List.swap()
toList.swapAt()
to match the name used by 'Array'. - Loosen
RLMArray
andRLMResults
's generic constraint fromRLMObject
toNSObject
. This may result in having to add some casts to disambiguate types. - โ Remove
RLMPropertyTypeArray
in favor of a separate boolarray
property onRLMProperty
/Property
. - โ Remove
RLMSyncPermissionResults
.RLMSyncPermission
s are now vended out using aRLMResults
. This results collection supports all normal collection operations except for setting values using KVO (sinceRLMSyncPermission
s are immutable) and the property aggregation operations. RealmCollection
's associated typeElement
has been renamedElementType
.- Realm Swift collection types (
List
,Results
,AnyRealmCollection
, andLinkingObjects
have had their generic type parameter changed fromT
toElement
). RealmOptional
's generic type parameter has been changed fromT
toValue
.- ๐
RLMSyncUserInfo
has been significantly enhanced. It now contains metadata about a user stored on the Realm Object Server, as well as a list of all user account data associated with that user. - Starting with Swift 4,
List
now conforms toMutableCollection
instead ofRangeReplaceableCollection
. For Swift 4, the empty collection initializer has been removed, and default implementations of range replaceable collection methods that make sense forList
have been added. - ๐
List.removeLast()
now throws an exception if the list is empty, to more closely match the behavior of the standard library'sCollection.removeLast()
implementation.
โจ Enhancements
List
can now contain values of typesBool
,Int
,Int8
,Int16
,Int32
,Int64
,Float
,Double
,String
,Data
, andDate
(and optional versions of all of these) in addition toObject
subclasses. QueryingList
s containing values other thanObject
subclasses is not yet implemented.RLMArray
can now be constrained with the protocolsRLMBool
,RLMInt
,RLMFloat
,RLMDouble
,RLMString
,RLMData
, andRLMDate
in addition to protocols defined withRLM_ARRAY_TYPE
. By defaultRLMArray
s of non-RLMObject
types can contain null. Indicating that the property is required (by overriding+requiredProperties:
) will instead make the values within the array required. QueryingRLMArray
s containing values other thanRLMObject
subclasses is not yet implemented.- ๐ Opening a synced Realm whose local copy was created with an older version of
Realm Mobile Platfrom when a migration is not possible to the current version
will result in an
RLMErrorIncompatibleSyncedFile
/incompatibleSyncedFile
error. When such an error occurs, the original file is moved to a backup location, and future attempts to open the synchronized Realm will result in a new file being created. If you wish to migrate any data from the backup Realm you can open it using the backup Realm configuration available on the error object. - โ Add preview support for partial synchronization. Partial synchronization is
allows a synchronized Realm to be opened in such a way that only objects
requested by the user are synchronized to the device. You can use it by setting
the
isPartial
property on aSyncConfiguration
, opening the Realm, and then callingRealm.subscribe(to:where:callback:)
with the type of object you're interested in, a string containing a query determining which objects you want to subscribe to, and a callback which will report the results. You may add as many subscriptions to a synced Realm as necessary.
๐ Bugfixes
- Realm Swift APIs that filter or look up the index of an object based on a format string now properly handle optional arguments in their variadic argument list.
- ๐ Rename