Releases: realm/realm-swift
Releases · realm/realm-swift
v2.0.1
v2.0.0
This release introduces support for the Realm Mobile Platform!
See https://realm.io/news/introducing-realm-mobile-platform/ for an overview
of these great new features.
API breaking changes
- By popular demand,
RealmSwift.Error
has been moved from the top-level
namespace into aRealm
extension and is nowRealm.Error
, so that it no
longer conflicts withSwift.Error
. - Files written by Realm 2.0 cannot be read by 1.x or earlier versions. Old
files can still be opened.
Enhancements
- The .log, .log_a and .log_b files no longer exist and the state tracked in
them has been moved to the main Realm file. This reduces the number of open
files needed by Realm, improves performance of both opening and writing to
Realms, and eliminates a small window where committing write transactions
would prevent other processes from opening the file.
Bugfixes
- Fix an assertion failure when sorting by zero properties.
- Fix a mid-commit crash in one process also crashing all other processes with
the same Realm open. - Properly initialize new nullable float and double properties added to
existing objects to null rather than 0. - Fix a stack overflow when objects with indexed string properties had very
long common prefixes. - Fix a race condition which could lead to crashes when using async queries or
collection notifications. - Fix a bug which could lead to incorrect state when an object which links to
itself is deleted from the Realm.
v1.1.0
This release brings official support for Xcode 8, Swift 2.3 and Swift 3.0.
Prebuilt frameworks are now built with Xcode 7.3.1 and Xcode 8.0.
API breaking changes
- Deprecate
migrateRealm:
in favor of newperformMigrationForConfiguration:error:
method
that follows Cocoa's NSError conventions. - Fix issue where
RLMResults
usedid
instead of its generic type as the return
type of subscript.
Enhancements
- Improve error message when using NSNumber incorrectly in Swift models.
- Further reduce the download size of the prebuilt static libraries.
- Improve sort performance, especially on non-nullable columns.
- Allow partial initialization of object by
initWithValue:
, deferring
required property checks until object is added to Realm.
Bugfixes
- Fix incorrect truncation of the constant value for queries of the form
column < value
forfloat
anddouble
columns. - Fix crash when an aggregate is accessed as an
Int8
,Int16
,Int32
, orInt64
. - Fix a race condition that could lead to a crash if an RLMArray or List was
deallocated on a different thread than it was created on. - Fix a crash when the last reference to an observed object is released from
within the observation. - Fix a crash when
initWithValue:
is used to create a nested object for a class
with an uninitialized schema. - Enforce uniqueness for
RealmOptional
primary keys when using thevalue
setter.
v1.0.2
API breaking changes
- Attempting to add an object with no properties to a Realm now throws rather than silently
doing nothing.
Enhancements
- Swift: A
write
block may nowthrow
, reverting any changes already made in
the transaction. - Reduce address space used when committing write transactions.
- Significantly reduce the download size of prebuilt binaries and slightly
reduce the final size contribution of Realm to applications. - Improve performance of accessing RLMArray properties and creating objects
with List properties.
Bugfixes
- Fix a crash when reading the shared schema from an observed Swift object.
- Fix crashes or incorrect results when passing an array of values to
createOrUpdate
after reordering the class's properties. - Ensure that the initial call of a Results notification block is always passed
.Initial even if there is a write transaction between when the notification
is added and when the first notification is delivered. - Fix a crash when deleting all objects in a Realm while fast-enumerating query
results from that Realm. - Handle EINTR from flock() rather than crashing.
- Fix incorrect behavior following a call to
[RLMRealm compact]
. - Fix live updating and notifications for Results created from a predicate involving
an inverse relationship to be triggered when an object at the other end of the relationship
is modified.
v1.0.1
API breaking changes
- None.
Enhancements
- Significantly improve performance of opening Realm files, and slightly
improve performance of committing write transactions.
Bugfixes
- Swift: Fix an error thrown when trying to create or update
Object
instances via
add(:_update:)
with a primary key property of typeRealmOptional
. - Xcode playground in Swift release zip now runs successfully.
- The
key
parameter ofRealm.objectForPrimaryKey(_:key:)
/Realm.dynamicObjectForPrimaryKey(_:key:)
is now marked as optional. - Fix a potential memory leak when closing Realms after a Realm file has been
opened on multiple threads which are running in active run loops. - Fix notifications breaking on tvOS after a very large number of write
transactions have been committed. - Fix a "Destruction of mutex in use" assertion failure after an error while
opening a file. - Realm now throws an exception if an
Object
subclass is defined with a managed Swiftlazy
property.
Objects with ignoredlazy
properties should now work correctly. - Update the LLDB script to work with recent changes to the implementation of
RLMResults
. - Fix an assertion failure when a Realm file is deleted while it is still open,
and then a new Realm is opened at the same path. Note that this is still not
a supported scenario, and may break in other ways.
v1.0.0
v0.103.2
API breaking changes
- None.
Enhancements
- Improve the error messages when an I/O error occurs in
writeCopyToURL
.
Bugfixes
- Fix an assertion failure which could occur when opening a Realm after opening
that Realm failed previously in some specific ways in the same run of the
application. - Reading optional integers, floats, and doubles from within a migration block
now correctly returnsnil
rather than 0 when the stored value isnil
.
v0.103.1
v0.103.0
API breaking changes
- All functionality deprecated in previous releases has been removed entirely.
- Support for Xcode 6.x & Swift prior to 2.2 has been completely removed.
RLMResults
/Results
now become empty when aRLMArray
/List
or object
they depend on is deleted, rather than throwing an exception when accessed.- Migrations are no longer run when
deleteRealmIfMigrationNeeded
is set,
recreating the file instead.
Enhancements
- Added
invalidated
properties toRLMResults
/Results
,RLMLinkingObjects
/LinkingObjects
,
RealmCollectionType
andAnyRealmCollection
. These properties report whether the Realm
the object is associated with has been invalidated. - Some
NSError
s created by Realm now have more descriptive user info payloads.
Bugfixes
- None.
v0.102.1
API breaking changes
- None.
Enhancements
- Return
RLMErrorSchemaMismatch
error rather than the more genericRLMErrorFail
when a migration is required. - Improve the performance of allocating instances of
Object
subclasses
that haveLinkingObjects
properties.
Bugfixes
RLMLinkingObjects
properties declared in Swift subclasses ofRLMObject
now work correctly.- Fix an assertion failure when deleting all objects of a type, inserting more
objects, and then deleting some of the newly inserted objects within a single
write transaction when there is an active notification block for a different
object type which links to the objects being deleted. - Fix crashes and/or incorrect results when querying over multiple levels of
LinkingObjects
properties. - Fix opening read-only Realms on multiple threads at once.
- Fix a
BadTransactLog
exception when storing dates before the unix epoch (1970-01-01).