Realm Objective-C & Swift 0.97
This is the last version of Realm Swift to support Swift 1.2.
This release contains official support for tvOS, better Carthage support, more Objective-C API generics, performance & query improvements, deprecation removals and more!
You can now build Realm apps for the Apple TV! Although some enterprising users have been building & shipping apps for months already using our unofficial Apple TV development branch, it’s now a platform we officially support! 🎉
Because writing to the Documents directory is prohibited on tvOS, the default Realm path is set to
NSCachesDirectory. However, please be mindful that tvOS can purge files in the Caches directory at any point, so we encourage you to rely on Realm as a rebuildable cache rather than storing important user data.
Building Realm Swift From Source Using Carthage
We’ve drastically simplified our build system to use a single Xcode project for both Realm Objective-C and Realm Swift, which means that Realm Swift can now be built using
Debugging Encrypted Realms
We’ve reworked the implementation of encryption so that it no longer relies on Mach exceptions, which means that it’s now possible to use LLDB to debug a process using an encrypted Realm. This also means that encryption no longer interferes with the behavior of crash reporters, which typically also rely on Mach exception handling. Finally, avoiding Mach exceptions means that platforms like tvOS & watchOS (which mark Mach APIs as unavailable) can now support encryption! Although we have yet to enable this for watchOS & tvOS pending further testing.
Generic Type Annotations in Realm Objective-C
Why let Swift have all the fun? Our Objective-C APIs have been updated to use generic type annotations wherever possible.
- All functionality deprecated in previous releases has been removed entirely.
- Adding a Realm notification block on a thread not currently running from within a run loop throws an exception rather than silently never calling the notification block.
- The block parameter of
Realm.write(_:)is now marked as
- Many forms of queries with key paths on both sides of the comparison operator are now supported.
- Add support for KVC collection operators in
- Fail instead of deadlocking in
+[RLMRealm sharedSchema], if a Swift property is initialized to a computed value, which attempts to open a Realm on its own.
- Fix poor performance when calling
-[RLMRealm deleteObjects:]on an
RLMResultswhich filtered the objects when there are other classes linking to the type of the deleted objects.
- An exception is now thrown when defining
Objectproperties of an unsupported type.