Releases: realm/realm-swift
Releases · realm/realm-swift
v0.94.0
API breaking changes
- None.
Enhancements
- Reduce the amount of memory used by RLMRealm notification listener threads.
- Avoid evaluating results eagerly when filtering and sorting.
- Add nullability annotations to the Objective-C API to provide enhanced compiler
warnings and bridging to Swift. - Make
RLMResult
s andRLMArray
s support Objective-C generics. - Add support for building watchOS and bitcode-compatible apps.
- Make the exceptions thrown in getters and setters more informative.
- Add
-[RLMArray exchangeObjectAtIndex:withObjectAtIndex]
andList.swap(_:_:)
to allow exchanging the location of two objects in the givenRLMArray
/List
. - Added anonymous analytics on simulator/debugger runs.
- Add
-[RLMArray moveObjectAtIndex:toIndex:]
andList.move(from:to:)
to
allow moving objects in the givenRLMArray
/List
.
Bugfixes
- Processes crashing due to an uncaught exception inside a write transaction will
no longer cause other processes using the same Realm to hang indefinitely. - Fix incorrect results when querying for < or <= on ints that
require 64 bits to represent with a CPU that supports SSE 4.2. - An exception will no longer be thrown when attempting to reset the schema
version or encryption key on an open Realm to the current value. - Date properties on 32 bit devices will retain 64 bit second precision.
- Wrap calls to the block passed to
enumerate
in an autoreleasepool to reduce
memory growth when migrating a large amount of objects. - In-memory realms no longer write to the Documents directory on iOS or
Application Support on OS X.
v0.93.2
Bugfixes
- Fixed an issue where the packaged OS X Realm.framework was built with
GCC_GENERATE_TEST_COVERAGE_FILES
andGCC_INSTRUMENT_PROGRAM_FLOW_ARCS
enabled. - Fix a memory leak when constructing standalone Swift objects with NSDate
properties. - Throw an exception rather than asserting when an invalidated object is added
to an RLMArray. - Fix a case where data loss would occur if a device was hard-powered-off
shortly after a write transaction was committed which had to expand the Realm
file.
v0.93.1
Bugfixes
- Objects are no longer copied into standalone objects during object creation. This fixes an issue where nested objects with a primary key are sometimes duplicated rather than updated.
- Comparison predicates with a constant on the left of the operator and key path on the right now give correct results. An exception is now thrown for predicates that do not yet support this ordering.
- Fix some crashes in
index_string.cpp
with int primary keys or indexed int properties.
v0.93.0
API breaking changes
- Schema versions are now represented as
uint64_t
(Objective-C) andUInt64
(Swift) so that they have
the same representation on all architectures.
Enhancements
- Swift:
Results
now conforms toCVarArgType
so it can
now be passed as an argument toResults.filter(_:...)
andList.filter(_:...)
. - Swift: Made
SortDescriptor
conform to theEquatable
and
StringLiteralConvertible
protocols. - Int primary keys are once again automatically indexed.
- Improve error reporting when attempting to mark a property of a type that
cannot be indexed as indexed.
Bugfixes
- Swift:
RealmSwift.framework
no longer embedsRealm.framework
,
which now allows apps using it to pass iTunes Connect validation.
v0.92.4
API breaking changes
- None.
Enhancements
- Swift: Made
Object.init()
a required initializer. RLMObject
,RLMResults
,Object
andResults
can now be safely
deallocated (but still not used) from any thread.- Improve performance of
-[RLMArray indexOfObjectWhere:]
and-[RLMArray indexOfObjectWithPredicate:]
, and implement them for standalone RLMArrays. - Improved performance of most simple queries.
Bugfixes
- The interprocess notification mechanism no longer uses dispatch worker threads, preventing it from
starving other GCD clients of the opportunity to execute blocks when dozens of Realms are open at once.
v0.92.3
API breaking changes
- Swift:
Results.average(_:)
now returns an optional, which isnil
if and only if the results set is empty.
Enhancements
- Swift: Added
List.invalidated
, which returns if the givenList
is no longer safe to be accessed, and is analogous to-[RLMArray isInvalidated]
. - Assertion messages are automatically logged to Crashlytics if it's loaded into the current process to make it easier to diagnose crashes.
Bugfixes
- Swift: Enumerating through a standalone
List
whose objects themselves have list properties won't crash. - Swift: Using a subclass of
RealmSwift.Object
in an aggregate operator of a predicate no longer throws a spurious type error. - Fix incorrect results for when using OR in a query on a
RLMArray
/List<>
. - Fix incorrect values from
[RLMResults count]
/Results.count
when using!=
on an int property with no other query conditions. - Lower the maximum doubling threshold for Realm file sizes from 128MB to 16MB to reduce the amount of wasted space.
v0.92.2
API breaking changes
- None.
Enhancements
- Exceptions raised when incorrect object types are used with predicates now contain more detailed information.
- Added
-[RLMMigration deleteDataForClassName:]
andMigration.deleteData(_:)
to enable cleaning up after removing object subclasses
Bugfixes
- Prevent debugging of an application using an encrypted Realm to work around
frequent LLDB hangs. Until the underlying issue is addressed you may set
REALM_DISABLE_ENCRYPTION=YES
in your application's environment variables to
have requests to open an encrypted Realm treated as a request for an
unencrypted Realm. - Linked objects are properly updated in
createOrUpdateInRealm:withValue:
. - List properties on Objects are now properly initialized during fast enumeration.
v0.92.1
v0.92.0
API breaking changes
- Migration blocks are no longer called when a Realm file is first created.
- The following APIs have been deprecated in favor of newer method names:
Deprecated API | New API |
---|---|
-[RLMMigration createObject:withObject:] |
-[RLMMigration createObject:withValue:] |
-[RLMObject initWithObject:] |
-[RLMObject initWithValue:] |
+[RLMObject createInDefaultRealmWithObject:] |
+[RLMObject createInDefaultRealmWithValue:] |
+[RLMObject createInRealm:withObject:] |
+[RLMObject createInRealm:withValue:] |
+[RLMObject createOrUpdateInDefaultRealmWithObject:] |
+[RLMObject createOrUpdateInDefaultRealmWithValue:] |
+[RLMObject createOrUpdateInRealm:withObject:] |
+[RLMObject createOrUpdateInRealm:withValue:] |
Enhancements
Int8
properties defined in Swift are now treated as integers, rather than
booleans.- NSPredicates created using
+predicateWithValue:
are now supported.
Bugfixes
- Compound AND predicates with no subpredicates now correctly match all objects.