Realm is a mobile database: a replacement for Core Data & SQLite

Overview

Realm

Realm is a mobile database that runs directly inside phones, tablets or wearables. This repository holds the source code for the iOS, macOS, tvOS & watchOS versions of Realm Swift & Realm Objective-C.

Why Use Realm

  • Intuitive to Developers: Realm’s object-oriented data model is simple to learn, doesn’t need an ORM, and lets you write less code.
  • Designed for Offline Use: Realm’s local database persists data on-disk, so apps work as well offline as they do online.
  • Built for Mobile: Realm is fully-featured, lightweight, and efficiently uses memory, disk space, and battery life.

Object-Oriented: Streamline Your Code

Realm was built for mobile developers, with simplicity in mind. The idiomatic, object-oriented data model can save you thousands of lines of code.

// Define your models like regular Swift classes
class Dog: Object {
    @Persisted var name: String
    @Persisted var age: Int
}
class Person: Object {
    @Persisted(primaryKey: true) var _id: String
    @Persisted var name: String
    @Persisted var age: Int
    // Create relationships by pointing an Object field to another Class
    @Persisted var dogs: List<Dog>
}
// Use them like regular Swift objects
let dog = Dog()
dog.name = "Rex"
dog.age = 1
print("name of dog: \(dog.name)")

// Get the default Realm
let realm = try! Realm()
// Persist your data easily with a write transaction 
try! realm.write {
    realm.add(dog)
}

Live Objects: Build Reactive Apps

Realm’s live objects mean data updated anywhere is automatically updated everywhere.

// Open the default realm.
let realm = try! Realm()

var token: NotificationToken?

let dog = Dog()
dog.name = "Max"

// Create a dog in the realm.
try! realm.write {
    realm.add(dog)
}

//  Set up the listener & observe object notifications.
token = dog.observe { change in
    switch change {
    case .change(let properties):
        for property in properties {
            print("Property '\(property.name)' changed to '\(property.newValue!)'");
        }
    case .error(let error):
        print("An error occurred: (error)")
    case .deleted:
        print("The object was deleted.")
    }
}

// Update the dog's name to see the effect.
try! realm.write {
    dog.name = "Wolfie"
}

SwiftUI

Realm integrates directly with SwiftUI, updating your views so you don't have to.

struct ContactsView: View {
    @ObservedResults(Person.self) var persons
    
    var body: some View {
        List {
            ForEach(persons) { person in
                Text(person.name)
            }
            .onMove(perform: $persons.move)
            .onDelete(perform: $persons.remove)
        }.navigationBarItems(trailing:
            Button("Add") {
                $persons.append(Person())
            }
        )
    }
}

Fully Encrypted

Data can be encrypted in-flight and at-rest, keeping even the most sensitive data secure.

// Generate a random encryption key
var key = Data(count: 64)
_ = key.withUnsafeMutableBytes { bytes in
    SecRandomCopyBytes(kSecRandomDefault, 64, bytes)
}

// Add the encryption key to the config and open the realm
let config = Realm.Configuration(encryptionKey: key)
let realm = try Realm(configuration: config)

// Use the Realm as normal
let dogs = realm.objects(Dog.self).filter("name contains 'Fido'")

Data Sync

The MongoDB Realm Sync service makes it simple to keep data in sync across users, devices, and your backend in real-time.

Getting Started

We support installing Realm via Swift Package Manager, CocoaPods, Carthage, or by importing a dynamic XCFramework.

For more information, see the detailed instructions in our docs.

Documentation

The documentation can be found at docs.mongodb.com/realm/sdk/ios/.
The API reference is located at docs.mongodb.com/realm-sdks/swift/latest/

Getting Help

  • Need help with your code?: Look for previous questions with therealm tag on Stack Overflow or ask a new question. For general discussion that might be considered too broad for Stack Overflow, use the Community Forum.
  • Have a bug to report? Open a GitHub issue. If possible, include the version of Realm, a full log, the Realm file, and a project that shows the issue.
  • Have a feature request? Open a GitHub issue. Tell us what the feature should do and why you want the feature.

Building Realm

In case you don't want to use the precompiled version, you can build Realm yourself from source.

Prerequisites:

  • Building Realm requires Xcode 11.x or newer.
  • Building Realm documentation requires jazzy

Once you have all the necessary prerequisites, building Realm.framework just takes a single command: sh build.sh build. You'll need an internet connection the first time you build Realm to download the core binary.

Run sh build.sh help to see all the actions you can perform (build ios/osx, generate docs, test, etc.).

Contributing

See CONTRIBUTING.md for more details!

Code of Conduct

This project adheres to the MongoDB Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

License

Realm Objective-C & Realm Swift are published under the Apache 2.0 license.
Realm Core is also published under the Apache 2.0 license and is available here.

This product is not being made available to any person located in Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, or to any other person that is not eligible to receive the product under U.S. law.

Feedback

If you use Realm and are happy with it, please consider sending out a tweet mentioning @realm to share your thoughts!

And if you don't like it, please let us know what you would like improved, so we can fix it!

analytics

Comments
  • Syncing - Distant Future?

    Syncing - Distant Future?

    Super long term, maybe not even practical, but perhaps we could see a syncing mechanism similar to Ensembles. Ensembles is really great for syncing, and as of now it would be the biggest reason for me to use Core Data over Realm for projects that require syncing.

    T-Feature 
    opened by donald-pinckney 174
  • Support Xcode 11 things

    Support Xcode 11 things

    • [x] Get Realm/RealmSwift building in Xcode 11 (https://github.com/realm/realm-cocoa/pull/6164)
    • [x] Swift Package Manager support as that's finally included with Xcode (https://github.com/realm/realm-cocoa/pull/6187)
    • [x] SwiftUI
    • [x] Combine framework
    • [ ] PropertyWrapper-based RealmOptional
    • [ ] Make all property types PropertyWrapper-based rather than @objc dynamic?
    • [x] Support catalyst/UIKit for Mac (requires 10.15 to build)
    • [x] Catalyst installation example/tests
    • [x] Update release packaging
    • [ ] Login with Apple for sync auth

    More things to be discovered?


    Using Realm with Xcode betas requires building from source, and typically will require using dev branches rather than releases.

    Swift Package Manager

    dependencies: [
        .package(url: "https://github.com/realm/realm-cocoa", from: "3.17.3")
    ],
    

    Targets named "Realm" and "RealmSwift" (for the obj-c and swift APIs respectively) are exported from the package. SPM support is currently experimental and does not support Realm Sync.

    Carthage

    github "realm/realm-cocoa" "master"
    
    DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer carthage bootstrap -no-use-binaries
    

    CocoaPods

      pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true
      pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true
    

    Explicitly including the Realm pod as a dependency is required as otherwise it'll try to use the latest release of the obj-c part.

    Manual framework

    git clone --recursive https://github.com/realm/realm-cocoa.git
    cd realm-cocoa
    DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer sh build.sh build
    

    Built frameworks are in the build directory.

    T-Enhancement P-1-Required 
    opened by tgoyne 126
  • distinct query in Realm database

    distinct query in Realm database

    hello, realm is super fast db but very necessary distinct query from database e.g. schedules = Schedules.objectsWhere("areas.id = '(idAreas)' distict")

    T-Feature P-2-Expected 
    opened by alexwillrock 70
  • Realm as a C/C++ library, and API?

    Realm as a C/C++ library, and API?

    (Not sure this question belongs here, but couldn't find a better place...)

    Our app uses a shared C++ model layer across iOS/Android. Currently that layer uses sqlite3 for DB storage. We'd love to take a look at Realm, but we'd need to be able to link the core C/C++ library, and interface to it in C/C++.

    I seem to remember bringing this up about a year ago, and Realm said it should be do-able... I assume the core layer is already C/C++.

    Is it on the roadmap?

    T-Feature O-Community Pipeline-Idea-Backlog 
    opened by timcloss 65
  • iOS 14 + Xcode 12 (Beta 3, Beta 4, Beta 5 & Beta 6): When Realm is stored in a shared app group container, backgrounding the app triggers: Message from debugger: Terminated due to signal 9

    iOS 14 + Xcode 12 (Beta 3, Beta 4, Beta 5 & Beta 6): When Realm is stored in a shared app group container, backgrounding the app triggers: Message from debugger: Terminated due to signal 9

    Goals

    Have my app continue to run normally, when backgrounded, with Realm stored in a shared app group container.

    Expected Results

    Same as "Goals" [above].

    Actual Results

    When, I run the app on an actual device, and swipe up while my app is in the foreground to send it to the background, the app quits with the following message in Xcode:-

    Message from debugger: Terminated due to signal 9

    Additionally: This only happens if I'm holding a reference to a live RLMResults or a notification token (those are the two things I have tested this with so far).

    Interestingly, when I run the project with the default realm configurations (i.e. Realm is stored in the documents directory), this issue disappears.

    It might be worth mentioning: It appears that the crash report produced on device for this issue when debugger isn't attached shows: Termination Reason: Namespace RUNNINGBOARD, Code 0xdead10cc, which would indicate that the application is being terminated by the OS because it held on to a file-lock/database-lock during suspension. (Could be un-related, though there is nothing other than Realm in my project that would hold on to a file-lock/database-lock ever).

    Steps for others to Reproduce

    Build and run the sample project using Xcode 12 (Beta 3, Beta 4, Beta 5, or Beta 6) on an actual device running iOS 14 (Beta 3, Beta 4, Beta 5, or Beta 6). (I have tested this on an iPhone & an iPad)

    Code Sample

    Here is a (quick & dirty) sample project: https://github.com/kunalsood/KSRealmTerminationSample

    Most of the relevant code in the project is in: ViewController.m file & one realm model object file KSSampleObject.h.

    Version of Realm and Tooling

    Realm framework version: 5.3.2 (pre-built dynamic framework) UPDATE: Sample project has now been updated to include Realm using SPM.

    Realm Object Server version: N/A

    Xcode version: 12.0 (Beta 3, Beta 4, Beta 5 & Beta 6)

    iOS/OSX version: iOS 14 (Beta 3, Beta 4, Beta 5 & Beta 6)

    Dependency manager + version: N/A

    Reproduction-Required O-Community 
    opened by kunalsood 61
  • Support sorting by keypath

    Support sorting by keypath

    Lets say I have:

     class Quote: RLMObject {
       dynamic var sentence = ""
     }
    

    Could I sort an RLMResults, generated by a query, by the length of the sentence property?

    T-Enhancement 
    opened by webmagnets 61
  • mmap() failed: Cannot allocate memory size: 3221225472 offset: 0

    mmap() failed: Cannot allocate memory size: 3221225472 offset: 0

    Bug

    I am currently doing as you suggested and I am still seeing this issue appearing in production for close to 10% of our users. This is also extremely hard to debug since I am unable to get a copy of the database from our users in the alpha.

    I am running the shouldCompactOnLaunch as well as wrapping the writes in autoreleasepool so they aren't kept in memory, as well as accessing the items one by one for processing before syncing to the server. I have tried all the steps outlined in several users issues that around the same problem.

    Basically, I am using realm as an intermediate store for location data before sending up to the server, I went down the route of limiting the number of items choose to send up between sends but since they are lazily accessed this proves to be not the issue.

    Goals

    I would like to be able to simply read values that haven't been pushed up since the last sync to our servers and store new values as they come in, to be synced in the future. I am not using realm server for this.

    Expected Results

    I expect to be able to read the data from the database with the predicate set to get the new location data that has been created since the last sync.

    Actual Results

    All I keep getting is this message that other have seen elsewhere.

    mmap() failed: Cannot allocate memory size: 3221225472 offset: 0
    

    Which then causes an entire application to crash. Which also seems quite high considering my shouldCompactOnLaunch code.

    Steps to Reproduce

    All I am doing is a simple read and the application crashes from what I gather it isn't able to read from the database since it needs to move it into memory before the read and it cannot do so. I have tried the shouldCompactOnLaunch strategy as well as wrapping reads in autoreleasepool

    Code Sample

    Here is shouldCompactOnLaunch code

    RLMRealmConfiguration *config = [RLMRealmConfiguration defaultConfiguration];
      config.shouldCompactOnLaunch = ^BOOL(NSUInteger totalBytes, NSUInteger usedBytes){
        // totalBytes refers to the size of the file on disk in bytes (data + free space)
        // usedBytes refers to the number of bytes used by data in the file
        
        // Compact if the file is over 10MB in size and less than 50% 'used'
        NSUInteger tenMB = 10 * 1024 * 1024;
        return (totalBytes > tenMB) && (usedBytes / totalBytes) < 0.5;
      };
      
      NSError *error = nil;
      // Realm is compacted on the first open if the configuration block conditions were met.
      RLMRealm *realm = [RLMRealm realmWithConfiguration:config error:&error];
      if (error) {
        // handle error compacting or opening Realm
        NSLog(@"%@", error);
      }
      
    

    Here is read that is causing the crash

      NSDate *lastSync = [self getVisitAnchor];
    
      NSPredicate *_today = [NSPredicate predicateWithFormat:@"endTime >= %@", lastSync];
      RLMResults<Visit *> *visits = [Visit objectsWithPredicate:_today];
      
      NSDate *lastVisitTime = [visits lastObject].startTime;
      
      NSMutableArray *visitArray = [[NSMutableArray alloc] init];
      
      for (NSInteger i = 0; i < [visits count]; i++) {
        // create an array structure.
        NSDictionary *visitData = [self serializeRealmVisit:visits[i]];
        [visitArray addObject:visitData];
      }
      
    

    Which is what triggers the crash, here is the associated stack trace

    Fatal Exception: RLMException
    0  CoreFoundation                 0x191706fe0 __exceptionPreprocess
    1  libobjc.A.dylib                0x190168538 objc_exception_throw
    2  Realm                          0x10076f908 (Missing)
    3  Realm                          0x100750d34 (Missing)
    4  Realm                          0x100751e3c (Missing)
    5  Realm                          0x100751bcc (Missing)
    6  Realm                          0x1007502e8 (Missing)
    7  Realm                          0x1006e4a50 (Missing)
    8  Application                      0x10010e308 -[LocationManager sendVisits] (LocationManager.m:225)
    9  Application                      0x10010dd74 -[LocationManager sendData] (LocationManager.m:161)
    10 Application                      0x10010ddb0 -[LocationManager startMonitoring] (LocationManager.m:166)
    11 Application                      0x10010c9a4 -[AppDelegate startMonitoring] (AppDelegate.m:112)
    12 Application                      0x10010c818 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:106)
    13 UIKit                          0x1978a9e48 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:]
    14 UIKit                          0x197ab637c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:]
    15 UIKit                          0x197abbe24 -[UIApplication _runWithMainScene:transitionContext:completion:]
    16 UIKit                          0x197ad08b0 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3147
    17 UIKit                          0x197ab90b8 -[UIApplication workspaceDidEndTransaction:]
    18 FrontBoardServices             0x1932b0884 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
    19 FrontBoardServices             0x1932b06f0 -[FBSSerialQueue _performNext]
    20 FrontBoardServices             0x1932b0aa0 -[FBSSerialQueue _performNextFromRunLoopSource]
    21 CoreFoundation                 0x1916b542c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
    22 CoreFoundation                 0x1916b4d9c __CFRunLoopDoSources0
    23 CoreFoundation                 0x1916b29a8 __CFRunLoopRun
    24 CoreFoundation                 0x1915e2da4 CFRunLoopRunSpecific
    25 UIKit                          0x1978a2fc8 -[UIApplication _run]
    26 UIKit                          0x19789dc9c UIApplicationMain
    27 Application                      0x1001199d4 main (main.m:16)
    28 libdyld.dylib                  0x1905f159c start
    

    Version of Realm and Tooling

    Realm framework version: 3.0.2

    Xcode version: 9.1

    iOS/OSX version: 10, 11

    T-Help Reproduction-Required P-1-Required O-Community 
    opened by myusuf3 60
  • Confine on dispatch queue rather than thread

    Confine on dispatch queue rather than thread

    tl;dr Realm uses thread ids and throws exceptions when they change. Checking thread ID is not acceptable under GCD.

    Realm docs state objects are not gcd queue safe and when running under GCD:

    you must get an RLMRealm instance in each thread/dispatch_queue in which you want to read or write

    I do this:

        // Local copy of the persisted task valid for the worker queue.
    __block OFEPersistedTask* taskCopyOnWorkerQueue = nil;
    
    NSString* taskID = aTask.taskID;
    dispatch_sync(_workerQueue, ^{
        NSPredicate *pred = [NSPredicate predicateWithFormat:@"taskID = %@", taskID];
        RLMResults *results = [OFEPersistedTask objectsWithPredicate:pred];
        taskCopyOnWorkerQueue = [results firstObject];
    }
    

    To get a copy of my Task (RLMObject subclass) on the correct queue. Unfortunately, in RLMVerifyAttached Realm checks the thread ID through RLMCheckThread (i.e. not queue) which does not work under GCD.

    A GCD queue can run its tasks on many different threads - thats kindof the point. From the Apple docs:

    The currently executing task runs on a distinct thread (which can vary from task to task)

    My emphasis... So, even if I grab a RLMObject on my queue I still risk getting killed (actually, no risk, I do get killed) later for running on the wrong thread.

    The only workaround I can think of is to store a primary key with __block scope and then perform another Realm fetch at the beginning of every task. That feels so suboptimal I don't think you can claim Realm is compatible with GCD at all.

    T-Enhancement Blocked 
    opened by rogernolan 58
  • Support storing arrays of primitives (string, int, etc.) as RLMObject properties

    Support storing arrays of primitives (string, int, etc.) as RLMObject properties

    Reading over issue #1028 it looks like RLMObject doesn't support properties that are arrays of non-RLMObjects. Instead the individual strings each have to be declared as a property of an RLMObject and then stored in an RLMArray.

    I'm curious to understand why your support for primitives doesn't extend to collections of objects of those types. As far as Realm is concerned, what's the difference between storing a string or an array of strings? And would you ever add this support to a future release?


    Subtasks:

    • [x] Non-breaking changes for arrays of primitives (#5148)
    • [x] Breaking API changes for arrays of primitives (#5149)
    • [x] Basic support for arrays of primitives (#5274)
    • [x] Query support for arrays of primitives (#5334)
    T-Feature P-2-Expected 
    opened by andrewjl 53
  • pod install 0.95.0 failed

    pod install 0.95.0 failed

    Try to install realm with Cocoapods, I got the message below

    Installing Realm (0.95.0)
    [!] /bin/bash -c
    set -e
    sh build.sh cocoapods-setup
    
    core is not a symlink. Deleting...
    Downloading dependency: core 0.92.1.1
    Downloading core failed. Please try again once you have an Internet connection.
    

    and pod version:

    pod --version
    0.38.2
    
    opened by goreycn 49
  • Only TestFlight Crash (iOS ... <15)

    Only TestFlight Crash (iOS ... <15)

    {"app_name":"test","app_cohort":"2|date=1639096200000&sf=143469&tid=ce768aa66a3d199a9fca7ebbc6d5301ffc41fd4426e910468d2e396485202005&ttype=i","app_version":"1.1.6","timestamp":"2021-12-10 03:45:14.54 +0300","slice_uuid":"aa178c58-89ec-38b1-905b-4134f9770992","adam_id":1533641502,"build_version":"108","bundleID":"xxx.test","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 12.5.5 (16H62)","incident_id":"6C234363-78C3-4962-A52D-0F7C276F8E40","is_beta":true,"name":"test"} Incident Identifier: 6C234363-78C3-4962-A52D-0F7C276F8E40 Beta Identifier: 7E045794-93A6-4129-84B4-2C8A5D9EA5FF Hardware Model: iPhone6,2 Process: test [147] Path: /private/var/containers/Bundle/Application/7EECE82C-35E1-42B1-B8E3-710F040DD726/test.app/test Identifier: xxx.test Version: 108 (1.1.6) AppStoreTools: 13C88a AppVariant: 1:iPhone6,2:12.2 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: xxx.test [248]

    Date/Time: 2021-12-10 03:45:11.8437 +0300 Launch Time: 2021-12-10 03:45:04.7125 +0300 OS Version: iPhone OS 12.5.5 (16H62) Baseband Version: 10.80.02 Report Version: 104

    Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Description: DYLD, Library not loaded: @rpath/libswift_Concurrency.dylib | Referenced from: /private/var/containers/Bundle/Application/7EECE82C-35E1-42B1-B8E3-710F040DD726/test.app/Frameworks/RealmSwift.framework/RealmSwift | Reason: image not found Triggered by Thread: 0

    O-Community Waiting-For-Reporter 
    opened by AdlibBeats 48
  • Crash while writing object

    Crash while writing object

    How frequently does the bug occur?

    Sometimes

    Description

    Writing object to Realm results in crash.

    Stacktrace & log output

    0   ???                           	0x0000000000000000 0x0 + 0
    1   Realm                         	0x0000000102a3883c realm::ArrayString::init_from_mem(realm::MemRef) + 564
    2   Realm                         	0x0000000102a48aa4 void realm::Cluster::do_insert_row<realm::ArrayString>(unsigned long, realm::ColKey, realm::Mixed, bool) + 120
    3   Realm                         	0x0000000102a481b4 realm::util::FunctionRef<realm::IteratorControl (realm::ColKey)>::FunctionRef<realm::Cluster::insert_row(unsigned long, realm::ObjKey, realm::FieldValues const&)::$_1&>(realm::Cluster::insert_row(u... + 456
    4   Realm                         	0x0000000102b6bd2c realm::TableClusterTree::for_each_and_every_column(realm::util::FunctionRef<realm::IteratorControl (realm::ColKey)>) const + 84
    5   Realm                         	0x0000000102a43900 realm::Cluster::insert_row(unsigned long, realm::ObjKey, realm::FieldValues const&) + 208
    6   Realm                         	0x0000000102a458b8 realm::Cluster::insert(realm::ObjKey, realm::FieldValues const&, realm::ClusterNode::State&) + 240
    7   Realm                         	0x0000000102a5590c realm::ClusterNodeInner::insert(realm::ObjKey, realm::FieldValues const&, realm::ClusterNode::State&)::$_1::operator()(realm::ClusterNode*, realm::ClusterNodeInner::ChildInfo&) const + 72
    8   Realm                         	0x0000000102a50bf4 realm::ClusterNodeInner::insert(realm::ObjKey, realm::FieldValues const&, realm::ClusterNode::State&) + 232
    9   Realm                         	0x0000000102a543d8 realm::ClusterTree::insert_fast(realm::ObjKey, realm::FieldValues const&, realm::ClusterNode::State&) + 48
    10  Realm                         	0x0000000102a54640 realm::ClusterTree::insert(realm::ObjKey, realm::FieldValues const&) + 48
    11  Realm                         	0x0000000102b6b878 realm::TableClusterTree::insert(realm::ObjKey, realm::FieldValues const&) + 52
    12  Realm                         	0x0000000102b5d1f0 realm::Table::create_object_with_primary_key(realm::Mixed const&, realm::FieldValues&&, realm::Table::UpdateMode, bool*) + 860
    13  Realm                         	0x00000001028e786c realm::Table::create_object_with_primary_key(realm::Mixed const&, bool*) + 80 (table.hpp:263)
    14  Realm                         	0x00000001028dd1e8 realm::Object realm::Object::create<objc_object* __strong, RLMAccessorContext>(RLMAccessorContext&, std::__1::shared_ptr<realm::Realm> const&, realm::ObjectSchema const&, objc_object* __strong, rea... + 620 (object_accessor.hpp:306)
    15  Realm                         	0x00000001028dcbfc RLMAccessorContext::createObject(objc_object*, realm::CreatePolicy, bool, realm::ObjKey) + 744 (RLMAccessor.mm:1102)
    16  Realm                         	0x000000010292c7b8 RLMAddObjectToRealm + 184 (RLMObjectStore.mm:119)
    17  RealmSwift                    	0x000000010336f5c0 Realm.add(_:update:) + 16 (Realm.swift:540)
    18  RealmSwift                    	0x000000010336f5c0 Realm.add<A>(_:update:) + 316 (Realm.swift:564)
    19  MyAppName                         	0x00000001023acb48 closure #1 in closure #1 in closure #1 in writeObjectsToDatabase(qos:objectsToWrite:completion:) + 72 (DatabaseManagement.swift:104)
    20  MyAppName                         	0x00000001023acb48 partial apply for closure #1 in closure #1 in closure #1 in writeObjectsToDatabase(qos:objectsToWrite:completion:) + 100 (<compiler-generated>:0)
    21  RealmSwift                    	0x000000010336e9e4 Realm.write<A>(withoutNotifying:_:) + 228 (Realm.swift:258)
    22  MyAppName                         	0x00000001023aa080 closure #1 in closure #1 in writeObjectsToDatabase(qos:objectsToWrite:completion:) + 924 (DatabaseManagement.swift:102)
    23  MyAppName                         	0x00000001023a9cb4 specialized autoreleasepool<A>(invoking:) + 28 (DatabaseManagement.swift:78)
    24  MyAppName                         	0x00000001023a9cb4 closure #1 in writeObjectsToDatabase(qos:objectsToWrite:completion:) + 28 (<compiler-generated>:0)
    25  MyAppName                         	0x00000001023a9cb4 partial apply for closure #1 in writeObjectsToDatabase(qos:objectsToWrite:completion:) + 56
    26  MyAppName                         	0x00000001023e2710 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:0)
    27  libdispatch.dylib             	0x00000001ccf0b4b4 _dispatch_call_block_and_release + 32 (init.c:1518)
    28  libdispatch.dylib             	0x00000001ccf0cfdc _dispatch_client_callout + 20 (object.m:560)
    29  libdispatch.dylib             	0x00000001ccf1eb8c _dispatch_root_queue_drain + 684 (inline_internal.h:2632)
    30  libdispatch.dylib             	0x00000001ccf1f284 _dispatch_worker_thread2 + 164 (queue.c:7052)
    31  libsystem_pthread.dylib       	0x0000000213981dbc _pthread_wqthread + 228 (pthread.c:2631)
    32  libsystem_pthread.dylib       	0x0000000213981b98 start_wqthread + 8 (:-1)
    

    Can you reproduce the bug?

    No

    Reproduction Steps

    Version

    10.33.0

    What SDK flavour are you using?

    Local Database only

    Are you using encryption?

    Yes, using encryption

    Platform OS and version(s)

    iOS 16.1, iOS 16.2

    Build environment

    Xcode 14.2

    T-Bug O-Community Needs-Attention 
    opened by NZQN23 2
  • Slow Sectioned Results Performance

    Slow Sectioned Results Performance

    How frequently does the bug occur?

    All the time

    Description

    We have started using the new sectioned results API’s for loading data directly from realm into sorted sections. We noticed this was unusually slow.

    Example (Loading 80k Items from DB):

    0.003s
    realm.objects(Item.self).count
    
    ~1.3s
    realm.objects(Item.self).sectioned(by: \.isRead).count
    
    

    We thought this was very slow and tried implementing this with core data’s sectioned api. The results were much faster, being only ~0.1s, to do the same sectioning & sorting.

    Stacktrace & log output

    Using a simple example just to access the number of sections

    let now = CFAbsoluteTimeGetCurrent()
    let objects = realm.objects(RealmItem.self)
                .sectioned(
                    by: \.isRead,
                    sortDescriptors: [
                        SortDescriptor(keyPath: "isRead", ascending: true),
                        SortDescriptor(keyPath: "date", ascending: false)
                    ]
                )
    print("constructed query: \(CFAbsoluteTimeGetCurrent() - now)s")
    print(objects.count)
    print("calculated count: \(CFAbsoluteTimeGetCurrent() - now)s")
    
    Console Output
    constructed query: 0.006084084510803223s
    2
    calculated count: 1.1383650302886963s
    
    Stack Trace

    Stack Trace.txt

    Can you reproduce the bug?

    Yes, always

    Reproduction Steps

    Our realm Model is as simple as this:

    class Item: Object {
        @Persisted(primaryKey: true) var id: String
        @Persisted var isRead: Bool
        @Persisted var date: Date
    }
    

    Code examples for loading the results via sections or normal results were provided above

    Version

    10.33.0

    What SDK flavour are you using?

    Local Database only

    Are you using encryption?

    No, not using encryption

    Platform OS and version(s)

    iOS 16.1

    Build environment

    Xcode version: 14.1 Dependency manager and version: SPM

    T-Bug O-Community 
    opened by alexjameslittle 2
  • mac catalyst error when archive: could not build Objective-C module 'Realm'

    mac catalyst error when archive: could not build Objective-C module 'Realm'

    How frequently does the bug occur?

    All the time

    Description

    I create a demo project, only adding 'pod 'RealmSwift', and set this project's supported destinations including 'Mac(Mac catalyst)', when I archive the project, error occur:

    1. Could not build Objective-C module 'Realm' in Aliases.swift file
    2. Umbrella header 'Realm.h' not found in module.modulemap file

    Stacktrace & log output

    Could not build Objective-C module 'Realm'
    Umbrella header 'Realm.h' not found
    

    Can you reproduce the bug?

    Yes, always

    Reproduction Steps

    No response

    Version

    realm:10.33.0

    What SDK flavour are you using?

    Local Database only

    Are you using encryption?

    No, not using encryption

    Platform OS and version(s)

    macOS:12.6 (21G115), Xcode:Version 14.2 (14C18)

    Build environment

    Xcode version: 14.2 Dependency manager and version: ...

    T-Bug O-Community Waiting-For-Reporter 
    opened by Norwa9 1
  • Filter and compare aggregates of 2 lists in object

    Filter and compare aggregates of 2 lists in object

    How frequently does the bug occur?

    All the time

    Description

    I have an object that contains 2 lists, I'm trying to filter these objects where the count of both lists is the same. The app always crashes when I try it. I tried using Query and NSPredicate methods.

    class X: Object {
        @Persisted(primaryKey: true) var id: Int
        @Persisted var listA: List<Int>
        @Persisted var listB: List<Int>
    }
    
    let realm = try! Realm()
    realm.objects(X.self).where { $0.listA.count == $0.listB.count } // crash
    realm.objects(X.self).filter("listA.@count == listB.@count") // crash
    

    is there any way to do this?

    Stacktrace & log output

    No response

    Can you reproduce the bug?

    Yes, always

    Reproduction Steps

    No response

    Version

    10.33

    What SDK flavour are you using?

    Local Database only

    Are you using encryption?

    No, not using encryption

    Platform OS and version(s)

    iOS 16.1

    Build environment

    Xcode version: 14.1 Dependency manager and version: Cocoapods

    T-Bug O-Community Waiting-For-Reporter 
    opened by KamalElShazly 1
  • Enable building with strict concurrency checking enabled

    Enable building with strict concurrency checking enabled

    This drops Xcode 13.1 and 13.2 support because @preconcurrency was added in Swift 5.6 and guarding it with #if swift would have required a large amount of duplication. 13.2 is over a year old, so it's about time to drop it anyway.

    Everything except for the Realm Swift tests are now built with complete strict concurrency checks. The RS tests are built with targeted due to them otherwise hitting a very large number of warnings related to various Apple frameworks not yet being updated for Sendable checking yet. Hopefully Xcode 15 will finish annotating the SDKs.

    XCTestCase.wait(for:) is @MainActor, so all the tests which wait for expectations need to be as well. I ended up just marking SwiftSyncTestCase as @MainActor as a result. Xcode 13 has a bug where overridden setUp and tearDown methods don't inherit this, so they need to be explicitly marked as @MainActor as well.

    I introduced a @Locked property wrapper for the tests which guards access to a value with a lock. This is required for all the tests where we declare a variable, set it in a Sendable closure, and then check it afterwards. Unfortunately, sendability checking for property wrappers is currently buggy (https://github.com/apple/swift/issues/61358), so silly things are required to avoid warnings from this.

    A pile of test things have been hoisted out of their containing scope to avoid having to pointlessly capture self when self isn't actually used in the function and isn't Sendable.

    I rewrote the watch tests to use expectations rather than semaphores. This both fixed a pile of warnings and made them work a bit better.

    There turned out to be a whole bunch more obj-c things which needed to be marked as Sendable. I also marked the sendable types which already couldn't be reasonably subclassed as final as subclassing is complicated for sendability.

    Migration is now a typealias for RLMMigration rather than a wrapper. This has no effect on the user-visible API but it eliminates some complications around translating the migration blocks between the obj-c and swift versions (and it really didn't work correctly before).

    RLMMigrationRealm was just long-obsolete; object store has taken care of what it was doing for years.

    RLMSyncManager wasn't actually particularly thread-safe. It has some properties which had to be set before the first synchronized Realm is opened so in practice it'd work out as ensuring you set the properties in time would sort of inherently involve doing something single-threaded, but it wasn't properly Sendable. All of the properties are now atomic instead. In the process I noticed that the appID property is long obsolete and doesn't make sense any more.

    Future's callback currently isn't Sendable. I am fairly confident that's a bug as that's the entire point of a Future, so I'm unsafeBitCasting it to Sendable. Similarly, DynamicProperty.update() currently isn't marked as @MainActor but I don't see how it could possibly work otherwise, so that uses an unsafe cast as well.

    BoundCollection.remove() turned out to have a bug: it looked up an index, started a write transaction, then deleted the object at the index. This could possibly delete the wrong object if a write modifying the collection happened on a background thread.

    MongoClient had some pointless overloads which could simply be default function arguments instead.

    cla: yes 
    opened by tgoyne 0
  • $sort order for BSON RealmSwift document

    $sort order for BSON RealmSwift document

    How frequently does the bug occur?

    All the time

    Description

    I stumbled across very strange behaviour in my aggregate query that I am running in Swift (using RealmSwift package) through:

    db.collection(withName: "Example")..aggregate(pipeline: aggregatePipeline) { ... }
    

    This is the stage that is behaving very strangely:

    let aggregatePipeline: [Document] = [
                    [
                        "$sort": [ "seen": 1 , "score": -1, "_id": -1 ]
                    ]
    ]
    

    The results I get are sorted by these three keys, but in seemingly arbitrary sorting order each time I run the query. So sometimes the "seen" sorting is prioritised (as it should be) but sometimes it sorts first by "_id", or "score". When I print the stage right after defining it by running:

    print(aggregatePipeline[0])
    

    I do see a the probable reason for those odd results... first run prints:

    ["$sort": Optional(RealmSwift.AnyBSON.document(["_id": Optional(RealmSwift.AnyBSON.int64(-1)), "seen": Optional(RealmSwift.AnyBSON.int64(1)), "score": Optional(RealmSwift.AnyBSON.int64(-1))]))]
    

    second run prints:

    ["$sort": Optional(RealmSwift.AnyBSON.document(["seen": Optional(RealmSwift.AnyBSON.int64(1)), "score": Optional(RealmSwift.AnyBSON.int64(-1)), "_id": Optional(RealmSwift.AnyBSON.int64(-1))]))]
    

    In the relevant docs or especially this it is stated that sorting should be done like this. Am I missing something or is this a bug?

    Stacktrace & log output

    No response

    Can you reproduce the bug?

    Yes, always

    Reproduction Steps

    
    let aggregatePipeline: [Document] = [
                    [
                        "$sort": [ "seen": 1 , "score": -1, "_id": -1 ]
                    ]
    ]
    
    print(aggregatePipeline[0])
    

    Version

    10.33

    What SDK flavour are you using?

    MongoDB Realm (i.e. Sync, auth, functions)

    Are you using encryption?

    Yes, using encryption

    Platform OS and version(s)

    MacOS

    Build environment

    Xcode version: 14.1

    T-Bug O-Community 
    opened by davidkessler-ch 0
Releases(v10.33.0)
  • v10.33.0(Dec 1, 2022)

    Enhancements

    • Flexible sync subscription state will change to SyncSubscriptionState.pending (RLMSyncSubscriptionStatePending) while waiting for the server to have sent all pending history after a bootstrap and before marking a subscription as Complete. (#5795)
    • Add custom column names API, which allows to set a different column name in the realm from the one used in your object declaration.
      class Person: Object {
          @Persisted var firstName: String
          @Persisted var birthDate: Date
          @Persisted var age: Int
      
          override class public func propertiesMapping() -> [String: String] {
              ["firstName": "first_name",
               "birthDate": "birth_date"]
          }
      }
      

      This is very helpful in cases where you want to name a property differently from your Device Sync JSON schema. This API is only available for old and modern object declaration syntax on the RealmSwift SDK.

    • Flexible sync bootstraps now apply 1MB of changesets per write transaction rather than applying all of them in a single write transaction. (Core PR #5999).

    Fixed

    • Fix a race condition which could result in "operation cancelled" errors being delivered to async open callbacks rather than the actual sync error which caused things to fail (Core PR #5968, since the introduction of async open).
    • Fix database corruption issues which could happen if an application was terminated at a certain point in the process of comitting a write transaciton. (Core PR #5993, since v10.21.1)
    • @AsyncOpen and @AutoOpen would begin and then cancel a second async open operation (PR #8038, since v10.12.0).
    • Changing the search text when using the searchable SwiftUI extension would trigger multiple updates on the View for each change (PR #8038, since v10.19.0).
    • Changing the filter or search properties of an @ObservedResults or @ObservedSectionedResults would trigger up to three updates on the View (PR #8038, since v10.6.0).
    • Fetching a user's profile while the user logs out would result in an assertion failure. (Core PR #6017, since v10.8.0)

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 14.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14.1.

    Internal

    • Upgraded realm-core from 12.11.0 to 12.13.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(110.21 MB)
    Carthage.xcframework.zip(78.75 MB)
    realm-objc-10.33.0.zip(488.25 MB)
    realm-swift-10.33.0.zip(972.20 MB)
  • v10.32.3(Nov 11, 2022)

    Fixed

    • Fix name lookup errors when importing Realm Swift built in library evolution mode ((#8014).
    • The prebuilt watchOS library in the objective-c release package was missing an arm64 slice. The Swift release package was uneffected (PR #8016).
    • Fix issue where RLMUserAPIKey.key/UserAPIKey.key incorrectly returned the name of the API key instead of the key itself. (#8021, since v10.0.0)

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 14.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14.1.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(110.17 MB)
    Carthage.xcframework.zip(78.76 MB)
    realm-objc-10.32.3.zip(487.73 MB)
    realm-swift-10.32.3.zip(971.39 MB)
  • v10.32.2(Nov 3, 2022)

    Switch to building the Carthage release with Xcode 14.1.

    Fixed

    • Fix linker errors when building a release build with Xcode 14.1 when installing via SPM (#7995).

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 14.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14.1.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(110.17 MB)
    Carthage.xcframework.zip(78.76 MB)
    realm-objc-10.32.2.zip(484.83 MB)
    realm-swift-10.32.2.zip(971.39 MB)
  • v10.32.1(Oct 26, 2022)

    Enhancements

    • Improve performance of client reset with automatic recovery and converting top-level tables into embedded tables (Core #5897).
    • Realm.Error is now a typealias for RLMError rather than a manually-defined version of what the automatic bridging produces. This should have no effect on existing working code, but the manual definition was missing a few things supplied by the automatic bridging.
    • Some sync errors sent by the server include a link to the server-side logs associated with that error. This link is now exposed in the serverLogURL property on SyncError (or RLMServerLogURLKey userInfo field when using NSError).

    Fixed

    • Many sync and app errors were reported using undocumented internal error codes and/or domains and could not be programmatically handled. Some notable things which now have public error codes instead of unstable internal ones:
      • Realm.Error.subscriptionFailed: The server rejected a flexible sync subscription.
      • AppError.invalidPassword: A login attempt failed due to a bad password.
      • AppError.accountNameInUse: A registration attempt failed due to the account name being in use.
      • AppError.httpRequestFailed: A HTTP request to Atlas App Services completed with an error HTTP code. The failing code is available in the httpStatusCode property.
      • Many other less common error codes have been added to AppError.
      • All sync errors other than SyncError.clientResetError reported incorrect error codes. (since v10.0.0).
    • UserAPIKey.objectId was incorrectly bridged to Swift as RLMObjectId to ObjectId. This may produce warnings about an unneccesary cast if you were previously casting it to the correct type (since v10.0.0).
    • Fixed an assertion failure when observing change notifications on a sectioned result, if the first modification was to a linked property that did not cause the state of the sections to change. (Core #5912, since the introduction of sectioned results in v10.29.0)
    • Fix a use-after-free if the last external reference to an encrypted synchronized Realm was closed between when a client reset error was received and when the download of the new Realm began. (Core #5949, since 10.28.4).
    • Fix an assertion failure during client reset with recovery when recovering a list operation on an embedded object that has a link column in the path prefix to the list from the top level object. (Core #5957, since introduction of automatic recovery in v10.32.0).
    • Creating a write transaction which is rejected by the server due to it exceeding the maximum transaction size now results in a client reset error instead of synchronization breaking and becoming stuck forever (Core #5209, since v10).
    • Opening an unencrypted file with an encryption key would sometimes report a misleading error message that indicated that the problem was something other than a decryption failure (Core #5915, since 0.89.0).
    • Fix a rare deadlock which could occur when closing a synchronized Realm immediately after committing a write transaction when the sync worker thread has also just finished processing a changeset from the server (Core #5948).

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 14.0.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14.1.

    Internal

    • Upgraded realm-core from 12.9.0 to 12.11.0.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(110.07 MB)
    Carthage.xcframework.zip(78.70 MB)
    realm-objc-10.32.1.zip(484.83 MB)
    realm-swift-10.32.1.zip(971.11 MB)
  • v10.32.0(Oct 10, 2022)

    Enhancements

    • Add .recoverUnsyncedChanges (RLMClientResetModeRecoverUnsyncedChanges) and .recoverOrDiscardUnsyncedChanges (RLMClientResetModeRecoverOrDiscardUnsyncedChanges) behaviors to ClientResetMode (RLMClientResetMode).
      • The newly added recover modes function by downloading a realm which reflects the latest state of the server after a client reset. A recovery process is run locally in an attempt to integrate the server state with any local changes from before the client reset occurred. The changes are integrated with the following rules:
        1. Objects created locally that were not synced before client reset, will be integrated.
        2. If an object has been deleted on the server, but was modified on the client, the delete takes precedence and the update is discarded.
        3. If an object was deleted on the client, but not the server, then the client delete instruction is applied.
        4. In the case of conflicting updates to the same field, the client update is applied.
      • The client reset process will fallback to ClientResetMode.discardUnsyncedChanges if the recovery process fails in .recoverOrDiscardUnsyncedChanges.
      • The client reset process will fallback to ClientResetMode.manual if the recovery process fails in .recoverUnsyncedChanges.
      • The two new swift recovery modes support client reset callbacks: .recoverUnsyncedChanges(beforeReset: ((Realm) -> Void)? = nil, afterReset: ((Realm, Realm) -> Void)? = nil).
      • The two new Obj-C recovery modes support client reset callbacks in notifyBeforeReset and notifyAfterResetfor both [RLMUser configurationWithPartitionValue] and [RLMUser flexibleSyncConfigurationWithClientResetMode] For more detail on client reset callbacks, see ClientResetMode, RLMClientResetBeforeBlock, RLMClientResetAfterBlock, and the 10.25.0 changelog entry.
    • Add two new additional interfaces to define a manual client reset handler:
      • Add a manual callback handler to ClientResetMode.manual -> ClientResetMode.manual(ErrorReportingBlock? = nil).
      • Add the RLMSyncConfiguration.manualClientResetHandler property (type RLMSyncErrorReportingBlock).
      • These error reporting blocks are invoked in the event of a RLMSyncErrorClientResetError.
      • See ErrorReportingBlock (RLMSyncErrorReportingBlock), and ClientResetInfo for more detail.
      • Previously, manual client resets were handled only through the SyncManager.ErrorHandler. You have the option, but not the requirement, to define manual reset handler in these interfaces. Otherwise, the SyncManager.ErrorHandler is still invoked during the manual client reset process.
      • These new interfaces are only invoked during a RLMSyncErrorClientResetError. All other sync errors are still handled in the SyncManager.ErrorHandler.
      • See 'Breaking Changes' for information how these interfaces interact with an already existing SyncManager.ErrorHandler.

    Breaking Changes

    • The default clientResetMode (RLMClientResetMode) is switched from .manual (RLMClientResetModeManual) to .recoverUnsyncedChanges (RLMClientResetModeRecoverUnsyncedChanges).
      • If you are currently using .manual and continue to do so, the only change you must explicitly make is designating manual mode in your Realm.Configuration.SyncConfigurations, since they will now default to .recoverUnsyncedChanges.
      • You may choose to define your manual client reset handler in the newly introduced manual(ErrorReportingBlock? = nil) or RLMSyncConfiguration.manualClientResetHandler, but this is not required. The SyncManager.errorHandler will still be invoked during a client reset if no callback is passed into these new interfaces.

    Deprecations

    • ClientResetMode.discardLocal is deprecated in favor of ClientResetMode.discardUnsyncedChanges. The reasoning is that the name better reflects the effect of this reset mode. There is no actual difference in behavior.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 14.0.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14.1.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(110.21 MB)
    Carthage.xcframework.zip(78.90 MB)
    realm-objc-10.32.0.zip(484.49 MB)
    realm-swift-10.32.0.zip(972.55 MB)
  • v10.31.0(Oct 5, 2022)

    The prebuilt binary for Carthage is now build with Xcode 14.0.1.

    Enhancements

    • Cut the runtime of aggregate operations on large dictionaries in half (Core #5864).
    • Improve performance of aggregate operations on collections of objects by 2x to 10x (Core #5864). Greatly improve the performance of sorting or distincting a Dictionary's keys or values. The most expensive operation is now performed O(log N) rather than O(N log N) times, and large Dictionaries can see upwards of 99% reduction in time to sort. (Core #5166)
    • Add support for changing the deployment location for Atlas Apps. Previously this was assumed to be immutable (Core #5648).
    • The sync client will now yield the write lock to other threads which are waiting to perform a write transaction even if it still has remaining work to do, rather than always applying all changesets received from the server even when other threads are trying to write. (Core #5844).
    • The sync client no longer writes an unused temporary copy of the changesets received from the server to the Realm file (Core #5844).

    Fixed

    • Setting a List property with Results no longer throws an unrecognized selector exception (since 10.8.0-beta.2)
    • RLMProgressNotificationToken and ProgressNotificationToken now hold a strong reference to the sync session, keeping it alive until the token is deallocated or invalidated, as the other notification tokens do. (#7831, since v2.3.0).
    • Results permitted some nonsensical aggregate operations on column types which do not make sense to aggregate, giving garbage results rather than reporting an error (Core #5876, since v5.0.0).
    • Upserting a document in a Mongo collection would crash if the document's id type was anything other than ObjectId (since v10.0.0).
    • Fix a use-after-free when a sync session is closed and the app is destroyed at the same time (Core #5752, since v10.19.0).

    Deprecations

    • RLMUpdateResult.objectId has been deprecated in favor of RLMUpdateResult.documentId to support reporting document ids which are not object ids.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 14.0.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14.1.

    Internal

    • Upgraded realm-core from 12.7.0 to 12.9.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(110.12 MB)
    Carthage.xcframework.zip(78.72 MB)
    realm-objc-10.31.0.zip(484.33 MB)
    realm-swift-10.31.0.zip(970.94 MB)
  • v10.30.0(Sep 20, 2022)

    Fixed

    • Incoming links from RealmAny properties were not handled correctly when migrating an object type from top-level to embedded. RealmAny properties currently cannot link to embedded objects. (Core #5796, since 10.8.0).
    • Realm.refresh() sometimes did not actually advance to the latest version. It attempted to be semi-non-blocking in a very confusing way which resulted in it sometimes advancing to a newer version that is not the latest version, and sometimes blocking until notifiers are ready so that it could advance to the latest version. This behavior was undocumented and didn't work correctly, so it now always blocks if needed to advance to the latest version. (#7625, since v0.98.0).
    • Fix the most common cause of thread priority inversions when performing writes on the main thread. If beginning the write transaction has to wait for the background notification calculations to complete, that wait is now done in a QoS-aware way. (#7902)
    • Subscribing to link properties in a flexible sync Realm did not work due to a mismatch between what the client sent and what the server needed. (Core #5409)
    • Attempting to use AsymmetricObject with partition-based sync now reports a sensible error much earlier in the process. Asymmetric sync requires using flexible sync. (Core #5691, since 10.29.0).
    • Case-insensitive but diacritic-sensitive queries would crash on 4-byte UTF-8 characters (Core #5825, since v2.2.0)
    • Accented characters are now handled by case-insensitive but diacritic-sensitive queries. (Core #5825, since v2.2.0)

    Breaking Changes

    • -[RLMASLoginDelegate authenticationDidCompleteWithError:] has been renamed to -[RLMASLoginDelegate authenticationDidFailWithError:] to comply with new app store requirements. This only effects the obj-c API. (#7945)

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1 - 14.

    Internal

    • Upgraded realm-core from 12.6.0 to 12.7.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(292.83 MB)
    Carthage.xcframework.zip(247.65 MB)
    realm-objc-10.30.0.zip(481.84 MB)
    realm-swift-10.30.0.zip(1135.78 MB)
  • v10.29.0(Sep 10, 2022)

    Enhancements

    • Add support for asymmetric sync. When a class inherits from AsymmetricObject, objects created are synced unidirectionally to the server and cannot be queried or read locally.
        class PersonObject: AsymmetricObject {
           @Persisted(primaryKey: true) var _id: ObjectId
           @Persisted var name: String
           @Persisted var age: Int
        }
    
        try realm.write {
           // This will create the object on the server but not locally.
           realm.create(PersonObject.self, value: ["_id": ObjectId.generate(),
                                                   "name": "Dylan",
                                                   "age": 20])
        }
    
    • Add ability to section a collection which conforms to RealmCollection, RLMCollection. Collections can be sectioned by a unique key retrieved from a keyPath or a callback and will return an instance of SectionedResults/RLMSectionedResults. Each section in the collection will be an instance of ResultsSection/RLMSection which gives access to the elements corresponding to the section key. SectionedResults/RLMSectionedResults and ResultsSection/RLMSection have the ability to be observed.
      class DemoObject: Object {
          @Persisted var title: String
          @Persisted var date: Date
          var firstLetter: String {
              return title.first.map(String.init(_:)) ?? ""
          }
      }
      var sectionedResults: SectionedResults<String, DemoObject>
      // ...
      sectionedResults = realm.objects(DemoObject.self)
          .sectioned(by: \.firstLetter, ascending: true)
      
    • Add @ObservedSectionedResults for SwiftUI support. This property wrapper type retrieves sectioned results from a Realm using a keyPath or callback to determine the section key.
      struct DemoView: View {
          @ObservedSectionedResults(DemoObject.self,
                                    sectionKeyPath: \.firstLetter) var demoObjects
      
          var body: some View {
              VStack {
                  List {
                      ForEach(demoObjects) { section in
                          Section(header: Text(section.key)) {
                              ForEach(section) { object in
                                  MyRowView(object: object)
                              }
                          }
                      }
                  }
              }
          }
      }
      
    • Add automatic handing for changing top-level objects to embedded objects in migrations. Any objects of the now-embedded type which have zero incoming links are deleted, and objects with multiple incoming links are duplicated. This happens after the migration callback function completes, so there is no functional change if you already have migration logic which correctly handles this. (Core #5737).
    • Improve performance when a new Realm file connects to the server for the first time, especially when significant amounts of data has been written while offline. (Core #5772)
    • Shift more of the work done on the sync worker thread out of the write transaction used to apply server changes, reducing how long it blocks other threads from writing. (Core #5772)
    • Improve the performance of the sync changeset parser, which speeds up applying changesets from the server. (Core #5772)

    Fixed

    • Fix all of the UBSan failures hit by our tests. It is unclear if any of these manifested as visible bugs. (Core #5665)
    • Upload completion callbacks were sometimes called before the final step of interally marking the upload as complete, which could result in calling Realm.writeCopy() from the completion callback failing due to there being unuploaded changes. (Core #4865).
    • Writing to a Realm stored on an exFAT drive threw the exception "fcntl() with F_BARRIERFSYNC failed: Inappropriate ioctl for device" when a write transaction needed to expand the file. (Core #5789, since 10.27.0)
    • Syncing a Decimal128 with big significand could result in a crash. (Core #5728)

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14 RC.

    Internal

    • Upgraded realm-core from 12.5.1 to 12.6.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(292.05 MB)
    Carthage.xcframework.zip(246.53 MB)
    realm-objc-10.29.0.zip(479.97 MB)
    realm-swift-10.29.0.zip(1131.20 MB)
  • v10.28.7(Sep 2, 2022)

    Enhancements

    • Add prebuilt binaries for Xcode 14 to the release package.

    Fixed

    • Fix archiving watchOS release builds with Xcode 14.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14 beta 6.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(283.90 MB)
    Carthage.xcframework.zip(241.29 MB)
    realm-objc-10.28.7.zip(471.18 MB)
    realm-swift-10.28.7.zip(1103.84 MB)
  • v10.28.6(Aug 19, 2022)

    Fixed

    • Fixed an issue where having realm-swift as SPM sub-target dependency leads to missing symbols error during iOS archiving (Core #7645).

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14 beta 5.

    Internal

    • Upgraded realm-core from 12.5.0 to 12.5.1
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(283.89 MB)
    Carthage.xcframework.zip(241.29 MB)
    realm-objc-10.28.6.zip(471.18 MB)
    realm-swift-10.28.6.zip(1012.91 MB)
  • v10.28.5(Aug 9, 2022)

    Enhancements

    • Improve performance of accessing SubscriptionSet properties when no writes have been made to the Realm since the last access.

    Fixed

    • A use-after-free could occur if a Realm with audit events enabled was destroyed while processing an upload completion for the events Realm on a different thread. (Core PR #5714)
    • Opening a read-only synchronized Realm for the first time via asyncOpen did not set the schema version, which could lead to m_schema_version != ObjectStore::NotVersioned assertion failures later on.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14 beta 4.

    Internal

    • Upgraded realm-core from 12.4.0 to 12.5.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(284.15 MB)
    Carthage.xcframework.zip(241.41 MB)
    realm-objc-10.28.5.zip(471.55 MB)
    realm-swift-10.28.5.zip(1013.38 MB)
  • v10.28.4(Aug 3, 2022)

    Enhancements

    • Add support for building arm64 watchOS when installing Realm via CocoaPods.
    • Reduce the amount of virtual address space used (Core #5645).

    Fixed

    • Fix some warnings when building with Xcode 14 (Core #5577).
    • Fix compilation failures on watchOS platforms which do not support thread-local storage. (#7694, #7695 since v10.21.1)
    • Fix a data race when committing a transaction while multiple threads are waiting to begin write transactions. This appears to not have caused any functional problems.
    • Fix a data race when writing audit events which could occur if the sync client thread was busy with other work when the event Realm was opened.
    • Fix some cases of running out of virtual address space (seen/reported as mmap failures) (Core #5645).
    • Audit event scopes containing only write events and no read events would occasionally throw a BadVersion exception when a write transaction was committed (since v10.26.0).
    • The client reset callbacks for the DiscardLocal mode would be passed invalid Realm instances if the callback was invoked at a point where the Realm was not otherwise open. (Core #5654, since the introduction of DiscardLocal reset mode in v10.25.0)

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14 beta 4.

    Internal

    • Upgraded realm-core from 12.3.0 to 12.4.0.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(283.21 MB)
    Carthage.xcframework.zip(240.82 MB)
    realm-objc-10.28.4.zip(469.67 MB)
    realm-swift-10.28.4.zip(1011.15 MB)
  • v10.28.3(Jul 27, 2022)

    Enhancements

    • Greatly improve the performance of obtaining cached Realm instances in Swift when using a sync configuration.

    Fixed

    • Add missing initialSubscription and rerunOnOpen to copyWithZone method on RLMRealmConfiguration. This resulted in incorrect values when using RLMRealmConfiguration.defaultConfiguration.
    • The sync error handler did not hold a strong reference to the sync session while dispatching the error from the worker thread to the main thread, resulting in the session passed to the error handler being invalid if there were no other remaining strong references elsewhere.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14 beta 3.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(280.85 MB)
    Carthage.xcframework.zip(240.51 MB)
    realm-objc-10.28.3.zip(465.20 MB)
    realm-swift-10.28.3.zip(1009.94 MB)
  • v10.28.2(Jun 30, 2022)

    Fixed

    • Using seedFilePath threw an exception if the Realm file being opened already existed (#7840, since v10.26.0).
    • The intialSubscriptions callback was invoked every time a Realm was opened regardless of the value of rerunOnOpen and if the Realm was already open on another thread (since v10.28.0).
    • Allow using RLMSupport.Swift from RealmSwift's Cocoapods (#6886).
    • Fix a UBSan failure when mapping encrypted pages. Fixing this did not change the resulting assembly, so there were probably no functional problems resulting from this (since v5.0.0).
    • Improved performance of sync clients during integration of changesets with many small strings (totalling > 1024 bytes per changeset) on iOS 14, and devices which have restrictive or fragmented memory. (Core #5614)
    • Fix a data race when opening a flexible sync Realm (since v10.28.0).
    • Add a missing backlink removal when assigning null or a non-link value to an AnyRealmValue property which previously linked to an object. This could have resulted in "key not found" exceptions or assertion failures such as mixed.hpp:165: [realm-core-12.1.0] Assertion failed: m_type when removing the destination link object. (Core #5574, since the introduction of AnyRealmValue in v10.8.0)

    Compatibility

    • Realm Studio: 12.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14 beta 2.

    Internal

    • Upgraded realm-core from 12.1.0 to 12.3.0.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(281.18 MB)
    Carthage.xcframework.zip(240.89 MB)
    realm-objc-10.28.2.zip(465.21 MB)
    realm-swift-10.28.2.zip(1011.52 MB)
  • v10.28.1(Jun 10, 2022)

    Enhancements

    • Add support for Xcode 14. When building with Xcode 14, the minimum deployment target is now iOS 11.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-14 beta 1.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(280.74 MB)
    Carthage.xcframework.zip(240.25 MB)
    realm-objc-10.28.1.zip(464.16 MB)
    realm-swift-10.28.1.zip(1008.90 MB)
  • v10.28.0(Jun 3, 2022)

    Enhancements

    • Replace mentions of 'MongoDB Realm' with 'Atlas App Services' in the documentation and update appropriate links to documentation.
    • Allow adding a subscription querying for all documents of a type in swift for flexible sync.
       try await subscriptions.update {
          subscriptions.append(QuerySubscription<SwiftPerson>(name: "all_people"))
       }
    
    • Add Combine API support for flexible sync beta.
    • Add an initialSubscriptions parameter when retrieving the flexible sync configuration from a user, which allows to specify a subscription update block, to bootstrap a set of flexible sync subscriptions when the Realm is first opened. There is an additional optional parameter flag rerunOnOpen, which allows to run this initial subscriptions on every app startup.
        let config = user.flexibleSyncConfiguration(initialSubscriptions: { subs in
            subs.append(QuerySubscription<SwiftPerson>(name: "people_10") {
                $0.age > 10
            })
        }, rerunOnOpen: true)
        let realm = try Realm(configuration: config)
    
    • The sync client error handler will report an error, with detailed info about which object caused it, when writing an object to a flexible sync Realm outside of any query subscription. (#5528)
    • Adding an object to a flexible sync Realm for a type that is not within a query subscription will now throw an exception. (#5488).

    Fixed

    • Flexible Sync query subscriptions will correctly complete when data is synced to the local Realm. (#5553, since v12.0.0)

    Breaking Changes

    • Rename SyncSubscriptionSet.write to SyncSubscriptionSet.update to avoid confusion with Realm.write.
    • Rename SyncSubscription.update to SyncSubscription.updateQuery to avoid confusion with SyncSubscriptionSet.update.
    • Rename RLMSyncSubscriptionSet.write to RLMSyncSubscriptionSet.update to align it with swift API.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-13.4.

    Internal

    • Upgraded realm-core from 12.0.0 to 12.1.0.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(280.72 MB)
    Carthage.xcframework.zip(240.22 MB)
    realm-objc-10.28.0.zip(464.16 MB)
    realm-swift-10.28.0.zip(1003.68 MB)
  • v10.27.0(May 27, 2022)

    Enhancements

    • @AsyncOpen/@AutoOpen property wrappers can be used with flexible sync.

    Fixed

    • When installing via SPM, debug builds could potentially hit an assertion failure during flexible sync bootstrapping. (Core #5527)
    • Flexible sync now only applies bootstrap data if the entire bootstrap is received. Previously orphaned objects could result from the read snapshot on the server changing. (Core #5331)
    • Partially fix a performance regression in write performance introduced in v10.21.1. v10.21.1 fixed a case where a kernel panic or device's battery dying at the wrong point in a write transaction could potentially result in a corrected Realm file, but at the cost of a severe performance hit. This version adjusts how file synchronization is done to provide the same safety at a much smaller performance hit. (#7740).

    Compatibility

    • Realm Studio: 11.0.0 or later (but see note below).
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-13.4.

    Internal

    • Upgraded realm-core from 11.17.0 to 12.0.0.
    • Bump the version number for the lockfile used for interprocess synchronization. This has no effect on persistent data, but means that versions of Realm which use pre-12.0.0 realm-core cannot open Realm files at the same time as they are opened by this version. Notably this includes Realm Studio, and v11.1.2 (the latest at the time of this release) cannot open Realm files which are simultaneously open in the simulator.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(279.86 MB)
    Carthage.xcframework.zip(239.44 MB)
    realm-objc-10.27.0.zip(462.13 MB)
    realm-swift-10.27.0.zip(1000.39 MB)
  • v10.26.0(May 19, 2022)

    Xcode 13.1 is now the minimum supported version of Xcode, as Apple no longer allows submitting to the app store with Xcode 12.

    Enhancements

    • Add Xcode 13.4 binaries to the release package.
    • Add Swift API for asynchronous transactions
        try? realm.writeAsync {
            realm.create(SwiftStringObject.self, value: ["string"])
        } onComplete: { error in
            // optional handling on write complete
        }
    
        try? realm.beginAsyncWrite {
            realm.create(SwiftStringObject.self, value: ["string"])
            realm.commitAsyncWrite()
        }
    
        let asyncTransactionId = try? realm.beginAsyncWrite {
            // ...
        }
        try! realm.cancelAsyncWrite(asyncTransactionId)
    
    • Add Obj-C API for asynchronous transactions
       [realm asyncTransactionWithBlock:^{
            [StringObject createInRealm:realm withValue:@[@"string"]];
        } onComplete:^(NSError *error) {
            // optional handling
        }];
    
        [realm beginAsyncWriteTransaction:^{
            [StringObject createInRealm:realm withValue:@[@"string"]];
            [realm commitAsyncWriteTransaction];
        }];
    
        RLMAsyncTransactionId asyncTransactionId = [realm beginAsyncWriteTransaction:^{
            // ...
        }];
        [realm cancelAsyncTransaction:asyncTransactionId];
    
    • Improve performance of opening a Realm with objectClasses/objectTypes set in the configuration.
    • Implement the Realm event recording API for reporting reads and writes on a Realm file to Atlas.

    Fixed

    • Lower minimum OS version for async login and FunctionCallables to match the rest of the async functions. ([#7791]https://github.com/realm/realm-swift/issues/7791)
    • Consuming a RealmSwift XCFramework with library evolution enabled would give the error 'Failed to build module 'RealmSwift'; this SDK is not supported by the compiler' when the XCFramework was built with an older XCode version and is then consumed with a later version. (#7313, since v3.18.0)
    • A data race would occur when opening a synchronized Realm with the client reset mode set to discardLocal on one thread at the same time as a client reset was being processed on another thread. This probably did not cause any functional problems in practice and the broken timing window was very tight (since 10.25.0).
    • If an async open of a Realm triggered a client reset, the callbacks for discardLocal could theoretically fail to be called due to a race condition. The timing for this was probably not possible to hit in practice (since 10.25.0).
    • Calling [RLMRealm freeze]/Realm.freeze on a Realm which had been created from writeCopy would not produce a frozen Realm. (#7697, since v5.0.0)
    • Using the dynamic subscript API on unmanaged objects before first opening a Realm or if objectTypes was set when opening a Realm would throw an exception (#7786).
    • The sync client may have sent a corrupted upload cursor leading to a fatal error from the server due to an uninitialized variable. (#5460, since v10.25.1)
    • Flexible sync would not correctly resume syncing if a bootstrap was interrupted (#5466, since v10.21.1).

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.4.
    • CocoaPods: 1.10 or later.
    • Xcode: 13.1-13.4.

    Internal

    • Upgraded realm-core from v11.15.0 to v11.17.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(279.03 MB)
    Carthage.xcframework.zip(238.25 MB)
    realm-objc-10.26.0.zip(460.30 MB)
    realm-swift-10.26.0.zip(995.66 MB)
  • v10.25.2(Apr 27, 2022)

    Enhancements

    • Replace Xcode 13.3 binaries with 13.3.1 binaries.

    Fixed

    • List<AnyRealmValue> would contain an invalidated object instead of null when the object linked to was deleted by a difference sync client (Core #5215, since v10.8.0).
    • Adding an object to a Set, deleting the parent object of the Set, and then deleting the object which was added to the Set would crash (Core #5387, since v10.8.0).
    • Synchronized Realm files which were first created using v10.0.0-beta.3 would be redownloaded instead of using the existing file, possibly resulting in the loss of any unsynchronized data in those files (since v10.20.0).

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.3.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.3.1.

    Internal

    • Upgraded realm-core from v11.14.0 to v11.15.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(273.40 MB)
    Carthage.xcframework.zip(228.50 MB)
    realm-objc-10.25.2.zip(452.61 MB)
    realm-swift-10.25.2.zip(1217.98 MB)
  • v10.25.1(Apr 12, 2022)

    Fixed

    • Fixed various memory corruption bugs when encryption is used caused by not locking a mutex when needed. (#7640, #7659, since v10.21.1)
    • Changeset upload batching did not calculate the accumulated size correctly, resulting in “error reading body failed to read: read limited at 16777217 bytes” errors from the server when writing large amounts of data (Core #5373, since 11.13.0).

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.3.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.3.

    Internal

    • Upgraded realm-core from v11.13.0 to v11.14.0.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(273.38 MB)
    Carthage.xcframework.zip(228.53 MB)
    realm-objc-10.25.1.zip(452.65 MB)
    realm-swift-10.25.1.zip(1218.17 MB)
  • v10.25.0(Mar 30, 2022)

    Synchronized Realm files written by this version cannot be opened by older versions of Realm. Existing files will be automatically upgraded when opened.

    Non-synchronized Realm files remain backwards-compatible.

    Enhancements

    • Add ability to use Swift Query syntax in @ObservedResults, which allows you to filter results using the where parameter.
    • Add ability to use MutableSet with StateRealmObject in SwiftUI.
    • Async/Await extensions are now compatible with iOS 13 and above when building with Xcode 13.3.
    • Sync changesets waiting to be uploaded to the server are now compressed, reducing the disk space needed when large write transactions are performed while offline or limited in bandwidth.(Core #5260).
    • Added new SyncConfiguration.clientResetMode and RLMSyncConfiguration.clientResetMode properties.
      • The values of these properties will dictate client behavior in the event of a client reset.
      • See below for information on ClientResetMode values.
      • clientResetMode defaults to .manual if not set otherwise.
    • Added new ClientResetMode and RLMClientResetMode enums.
      • These enums represent possible client reset behavior for SyncConfiguration.clientResetMode and RLMSyncConfiguration.clientResetMode, respectively.
      • .manual and RLMClientResetModeManual
        • The local copy of the Realm is copied into a recovery directory for safekeeping, and then deleted from the original location. The next time the Realm for that partition value is opened, the Realm will automatically be re-downloaded from MongoDB Realm, and can be used as normal.
        • Data written to the Realm after the local copy of the Realm diverged from the backup remote copy will be present in the local recovery copy of the Realm file. The re-downloaded Realm will initially contain only the data present at the time the Realm was backed up on the server.
        • rlmSync_clientResetBackedUpRealmPath and SyncError.clientResetInfo() are used for accessing the recovery directory.
      • .discardLocal and RLMClientResetDiscardLocal
        • All unsynchronized local changes are automatically discarded and the local state is automatically reverted to the most recent state from the server. Unsynchronized changes can then be recovered in a post-client-reset callback block (See changelog below for more details).
        • If RLMClientResetModeDiscardLocal is enabled but the client reset operation is unable to complete then the client reset process reverts to manual mode.
        • The realm's underlying object accessors remain bound so the UI may be updated in a non-disruptive way.
    • Added support for client reset notification blocks for .discardLocal and RLMClientResetDiscardLocal
      • RealmSwift implementation: discardLocal(((Realm) -> Void)? = nil, ((Realm, Realm) -> Void)? = nil)
        • RealmSwift client reset blocks are set when initializing the user configuration
        var configuration = user.configuration(partitionValue: "myPartition", clientResetMode: .discardLocal(beforeClientResetBlock, afterClientResetBlock))
        
        • The before client reset block -- ((Realm) -> Void)? = nil -- is executed prior to a client reset. Possible usage includes:
        let beforeClientResetBlock: (Realm) -> Void = { beforeRealm in
          var recoveryConfig = Realm.Configuration()
            recoveryConfig.fileURL = myRecoveryPath
            do {
              beforeRealm.writeCopy(configuration: recoveryConfig)
                /* The copied realm could be used later for recovery, debugging, reporting, etc. */
            } catch {
                /* handle error */
            }
        }
        
        • The after client reset block -- ((Realm, Realm) -> Void)? = nil) -- is executed after a client reset. Possible usage includes:
        let afterClientResetBlock: (Realm, Realm) -> Void = { before, after in
        /* This block could be used to add custom recovery logic, back-up a realm file, send reporting, etc. */
        for object in before.objects(myClass.self) {
            let res = after.objects(myClass.self)
            if (res.filter("primaryKey == %@", object.primaryKey).first != nil) {
                 /* ...custom recovery logic... */
            } else {
                 /* ...custom recovery logic... */
            }
        }
        
      • Realm Obj-c implementation: Both before and after client reset callbacks exist as properties on RLMSyncConfiguration and are set at initialization.
          RLMRealmConfiguration *config = [user configurationWithPartitionValue:partitionValue
                                                                clientResetMode:RLMClientResetModeDiscardLocal
                                                              notifyBeforeReset:beforeBlock
                                                               notifyAfterReset:afterBlock];
        

        where beforeBlock is of type RLMClientResetBeforeBlock. And afterBlock is of type RLMClientResetAfterBlock.

    Breaking Changes

    • Xcode 13.2 is no longer supported when building with Async/Await functions. Use Xcode 13.3 to build with Async/Await functionality.

    Fixed

    • Adding a Realm Object to a ObservedResults or a collections using StateRealmObject that is managed by the same Realm would throw if the Object was frozen and not thawed before hand.
    • Setting a Realm Configuration for @ObservedResults using it's initializer would be overrode by the Realm Configuration stored in .environment(\.realmConfiguration, ...) if they did not match (Cocoa #7463, since v10.6.0).
    • Fix searchable component filter overriding the initial filter on @ObservedResults, (since v10.23.0).
    • Comparing Results, LinkingObjects or AnyRealmCollection when using Realm via XCFramework would result in compile time errors (Cocoa #7615, since v10.21.0)
    • Opening an encrypted Realm while the keychain is locked on macOS would crash (#7438).
    • Updating subscriptions while refreshing the access token would crash (Core #5343, since v10.22.0)
    • Fix several race conditions in SyncSession related to setting customRequestHeaders while using the SyncSession on a different thread.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.3.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.3.

    Internal

    • Upgraded realm-core from v11.12.0 to v11.13.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(273.38 MB)
    Carthage.xcframework.zip(228.57 MB)
    realm-objc-10.25.0.zip(452.71 MB)
    realm-swift-10.25.0.zip(1218.35 MB)
  • v10.24.2(Mar 19, 2022)

    Fixed

    • Application would sometimes crash with exceptions like 'KeyNotFound' or assertion "has_refs()". Other issues indicating file corruption may also be fixed by this. The one mentioned here is the one that lead to solving the problem. (Core #5283, since v5.0.0)

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.3.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.3.

    Internal

    • Upgraded realm-core from 11.11.0 to 11.12.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(272.25 MB)
    Carthage.xcframework.zip(227.98 MB)
    realm-objc-10.24.2.zip(451.94 MB)
    realm-swift-10.24.2.zip(1215.95 MB)
  • v10.24.1(Mar 14, 2022)

    Switch to building the Carthage binary with Xcode 13.3. This release contains no functional changes from 10.24.0.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.3.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.3.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(272.27 MB)
    Carthage.xcframework.zip(228.05 MB)
    realm-objc-10.24.1.zip(452.01 MB)
    realm-swift-10.24.1.zip(1216.25 MB)
  • v10.24.0(Mar 6, 2022)

    Enhancements

    • Add ability to use Swift Query syntax in @ObservedResults, which allows you to filter results using the where parameter.

    Fixed

    • If a list of objects contains links to objects not included in the synchronized partition, collection change notifications for that list could be incorrect (Core #5164, since v10.0.0).
    • Adding a new flexible sync subscription could crash with "Assertion failed: !m_unbind_message_sent" in very specific timing scenarios (Core #5149, since v10.22.0).
    • Converting floats/doubles into Decimal128 would yield imprecise results (Core #5184, since v10.0.0)
    • Using accented characters in class and field names in a synchronized Realm could result in sync errors (Core #5196, since v10.0.0).
    • Calling Realm.invalidate() from inside a Realm change notification could result in the write transaction which produced the notification not being persisted to disk (since v10.22.0).
    • When a client reset error which results in the current Realm file being backed up and then deleted, deletion errors were ignored as long as the copy succeeded. When this happens the deletion of the old file is now scheduled for the next launch of the app. (Core #5180, since v2.0.0)
    • Fix an error when compiling a watchOS Simulator target not supporting Thread-local storage (#7623, since v10.21.0).
    • Add a validation check to report a sensible error if a Realm configuration indicates that an in-memory Realm should be encrypted. (Core #5195)
    • The Swift package set the linker flags on the wrong target, resulting in linker errors when SPM decides to build the core library as a dynamic library (#7266).
    • The download-core task failed if run in an environment without TMPDIR set (#7688, since v10.23.0).

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.2.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.3 beta 3.

    Internal

    • Upgraded realm-core from 11.9.0 to 11.11.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(288.01 MB)
    Carthage.xcframework.zip(242.16 MB)
    realm-objc-10.24.0.zip(452.01 MB)
    realm-swift-10.24.0.zip(1216.27 MB)
  • v10.23.0(Mar 1, 2022)

    Enhancements

    • Add Realm.writeCopy(configuration:)/[RLMRealm writeCopyForConfiguration:] which gives the following functionality:
      • Export a local non-sync Realm to be used with MongoDB Realm Sync when the configuration is derived from a sync RLMUser/User.
      • Write a copy of a local Realm to a destination specified in the configuration.
      • Write a copy of a synced Realm in use with user A, and open it with user B.
      • Note that migrations may be required when using a local realm configuration to open a realm file that was copied from a synchronized realm. An exception will be thrown if a Realm exists at the destination.
    • Add a seedFilePath option to RLMRealmConfiguration and Configuration. If this option is set then instead of creating an empty Realm, the realm at the seedFilePath will be copied to the fileURL of the new Realm. If a Realm file already exists at the destination path, the seed file will not be copied and the already existing Realm will be opened instead. Note that to use this parameter with a synced Realm configuration the seed Realm must be appropriately copied to a destination with Realm.writeCopy(configuration:)/[RLMRealm writeCopyForConfiguration:] first.
    • Add ability to permanently delete a User from a MongoDB Realm app. This can be invoked with User.delete()/[RLMUser deleteWithCompletion:].
    • Add NSCopying conformance to RLMDecimal128 and RLMObjectId.
    • Add Xcode 13.3 binaries to the release package (and remove 13.0).

    Fixed

    • Add support of arm64 in Carthage build (#7154
    • Adding missing support for IN queries to primitives types on Type Safe Queries.
      let persons = realm.objects(Person.self).where {
        let acceptableNames = ["Tom", "James", "Tyler"]
        $0.name.in([acceptableNames])
      }
      

      (Cocoa #7633, since v10.19.0)

    • Work around a compiler crash when building with Swift 5.6 / Xcode 13.3. CustomPersistable's PersistedType must now always be a built-in type rather than possibly another CustomPersistable type as Swift 5.6 has removed support for infinitely-recursive associated types (#7654).
    • Fix redundant call to filter on @ObservedResults from searchable component (since v10.19.0).

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.2.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.3 beta 3.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(294.10 MB)
    Carthage.xcframework.zip(248.62 MB)
    realm-objc-10.23.0.zip(460.91 MB)
    realm-swift-10.23.0.zip(1248.96 MB)
  • v10.22.0(Jan 25, 2022)

    Enhancements

    • Add beta support for flexible sync. See the backend and SDK documentation for more information. Please report any issues with the beta through Github.

    Fixed

    • UserIdentity metadata table grows indefinitely. (#5152, since v10.20.0)
    • We now report a useful error message when opening a sync Realm in non-sync mode or vice-versa.(#5161, since v5.0.0).

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.2.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.2.1.

    Internal

    • Upgraded realm-core from 11.8.0 to 11.9.0
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(293.73 MB)
    Carthage.xcframework.zip(248.34 MB)
    realm-objc-10.22.0.zip(460.59 MB)
    realm-swift-10.22.0.zip(1260.55 MB)
  • v10.21.1(Jan 12, 2022)

    Fixed

    • The sync client will now drain the receive queue when a send fails with ECONNRESET, ensuring that any error message from the server gets received and processed. (#5078)
    • Schema validation was missing for embedded objects in sets, resulting in an unhelpful error being thrown if a Realm object subclass contained one (since v10.0.0).
    • Opening a Realm with a schema that has an orphaned embedded object type performed an extra empty write transaction (since v10.0.0).
    • Freezing a Realm with a schema that has orphaned embedded object types threw a "Wrong transactional state" exception (since v10.19.0).
    • @sum and @avg queries on Dictionaries of floats or doubles used too much precision for intermediates, resulting in incorrect rounding (since v10.5.0).
    • Change the exception message for calling refresh on an immutable Realm from "Continuous transaction through DB object without history information." to "Can't refresh a read-only Realm." (#5061, since v10.8.0).
    • Queries of the form "link.collection.@sum = 0" where link is null matched when collection was a List or Set, but not a Dictionary (#5080, since v10.8.0).
    • Types which require custom obj-c bridging (such as PersistableEnum or CustomPersistable) would crash with exceptions mentioning __SwiftValue in a variety of places on iOS versions older than iOS 14 (#7604, since v10.21.0)

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.2.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.2.1.

    Internal

    • Upgraded realm-core from 11.6.1 to 11.8.0.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(289.93 MB)
    Carthage.xcframework.zip(245.22 MB)
    realm-objc-10.21.1.zip(454.12 MB)
    realm-swift-10.21.1.zip(1245.33 MB)
  • v10.21.0(Jan 11, 2022)

    Enhancements

    • Add metadata property to RLMUserProfile/UserProfile.
    • Add class Projection to allow creation of light weight view models out of Realm Objects.
    public class Person: Object {
        @Persisted var firstName = ""
        @Persisted var lastName = ""
        @Persisted var address: Address? = nil
        @Persisted var friends = List<Person>()
    }
    
    public class Address: EmbeddedObject {
        @Persisted var city: String = ""
        @Persisted var country = ""
    }
    
    class PersonProjection: Projection<Person> {
        // `Person.firstName` will have same name and type
        @Projected(\Person.firstName) var firstName
        // There will be the only String for `city` of the original object `Address`
        @Projected(\Person.address.city) var homeCity
        // List<Person> will be mapped to list of firstNames
        @Projected(\Person.friends.projectTo.firstName) var firstFriendsName: ProjectedCollection<String>
    }
    
    // `people` will contain projections for every `Person` object in the `realm`
    let people: Results<PersonProjection> = realm.objects(PersonProjection.self)
    
    • Greatly improve performance of reading AnyRealmValue and enum types from Realm collections.
    • Allow using Swift enums which conform to PersistableEnum as the value type for all Realm collections.
    • AnyRealmCollection now conforms to Encodable.
    • AnyRealmValue and PersistableEnum values can now be passed directly to an NSPredicate used in a filter() call rather than having to pass the rawValue (the rawValue is still allowed).
    • Queries on collections of PersistableEnums can now be performed with where().
    • Add support for querying on the rawValue of an enum with where().
    • .count is supported for Maps of all types rather than just numeric types in where().
    • Add support for querying on the properties of objects contained in dictionaries (e.g. "[email protected] CONTAINS 'a'").
    • Improve the error message for many types of invalid predicates in queries.
    • Add support for comparing @allKeys to another property on the same object.
    • Add Numeric conformance to Decimal128.
    • Make some invalid property declarations such as List<AnyRealmValue?> a compile-time error instead of a runtime error.
    • Calling .sorted(byKeyPath:) on a collection with an Element type which does not support sorting by keypaths is now a compile-time error instead of a runtime error.
    • RealmCollection.sorted(ascending:) can now be called on all non-Object/EmbeddedObject collections rather than only ones where the Element conforms to Comparable.
    • Add support for using user-defined types with @Persistable and in Realm collections by defining a mapping to and from a type which Realm knows how to store. For example, URL can be made persistable with:
      extension URL: FailableCustomPersistable {
          // Store URL values as a String in Realm
          public typealias PersistedType = String
          // Convert a String to a URL
          public init?(persistedValue: String) { self.init(string: persistedValue) }
          // Convert a URL to a String
          public var persistableValue: String { self.absoluteString }
      }
      

      After doing this, @Persisted var url: URL is a valid property declaration on a Realm object. More advanced mappings can be done by mapping to an EmbeddedObject which can store multiple values.

    Fixed

    • Accessing a non object collection inside a migration would cause a crash
    • #5633.
    • Accessing a Map of objects dynamically would not handle nulled values correctly (since v10.8.0).
    • where() allowed constructing some nonsensical queries due to boolean comparisons returning Query<T> rather than Query<Bool> (since v10.19.0).
    • @allValues queries on dictionaries accidentally did not require "ANY".
    • Case-insensitive and diacritic-insensitive modifiers were ignored when comparing the result of an aggregate operation to another property in a query.
    • Object.init(value:) did not allow initializing RLMDictionary<NSString, RLMObject>/Map<String, Object?> properties with null values for map entries (since v10.8.0).
    • @ObservedResults did not refresh when changes were made to the observed collection. (since v10.6.0)

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.2.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.2.1.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(283.80 MB)
    Carthage.xcframework.zip(241.50 MB)
    realm-objc-10.21.0.zip(442.22 MB)
    realm-swift-10.21.0.zip(1226.73 MB)
  • v10.20.2(Dec 20, 2021)

    Rebuild 10.20.1 with Xcode 13.2.1 rather than 13.2.0. This version has no changes if you are not using a prebuilt binary for Realm.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.2.1.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.4-13.2.1.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(285.00 MB)
    Carthage.xcframework.zip(240.86 MB)
    realm-objc-10.20.2.zip(444.04 MB)
    realm-swift-10.20.2.zip(1223.80 MB)
  • v10.20.1(Dec 14, 2021)

    Xcode 12.4 is now the minimum supported version of Xcode.

    Fixed

    • Add missing Indexable support for UUID. (Cocoa #7545, since v10.10.0)

    Breaking Changes

    • All async functions now require Xcode 13.2 to work around an App Store/TestFlight bug that results in apps built with 13.0/13.1 which do not use libConcurrency but link a library which does crashing on startup.

    Compatibility

    • Realm Studio: 11.0.0 or later.
    • APIs are backwards compatible with all previous releases in the 10.x.y series.
    • Carthage release for Swift is built with Xcode 13.2.
    • CocoaPods: 1.10 or later.
    • Xcode: 12.2-13.2.
    Source code(tar.gz)
    Source code(zip)
    Carthage.framework.zip(285.00 MB)
    Carthage.xcframework.zip(240.86 MB)
    realm-objc-10.20.1.zip(444.04 MB)
    realm-swift-10.20.1.zip(1223.78 MB)
Owner
Realm
Realm is a mobile database: a replacement for SQLite & ORMs. SDKs for Swift, Objective-C, Java, Kotlin, C#, and JavaScript.
Realm
BucketServer - Small API with SQLite database that saves notes for an iOS appliction called Bucket list

BucketList Server-Side Small API with SQLite database that saves notes for an iO

null 0 Dec 30, 2021
Realm-powered Core Data persistent store

RealmIncrementalStore Realm-powered Core Data persistent store Wait, what? I like Realm. Realm's memory-mapped DB blows other databases out of the wat

Eureka 227 Jun 24, 2022
Sync Realm Database with CloudKit

IceCream helps you sync Realm Database with CloudKit. It works like magic! Features Realm Database Off-line First Thread Safety Reactive Programming O

Soledad 1.8k Jan 6, 2023
A simple order manager, created in order to try Realm database

Overview A simple order manager, created in order to get acquainted with the features and limitations of the local Realm database. The project is writ

Kirill Sidorov 0 Oct 14, 2021
Innova CatchKennyGame - The Image Tap Fun Game with keep your scores using Core Database

Innova_CatchKennyGame The Image Tap Fun Game with keep your scores using Core Da

Alican Kurt 0 Dec 31, 2021
A library that provides the ability to import/export Realm files from a variety of data container formats.

Realm Converter Realm Converter is an open source software utility framework to make it easier to get data both in and out of Realm. It has been built

Realm 212 Dec 9, 2022
SQLite.swift - A type-safe, Swift-language layer over SQLite3.

SQLite.swift provides compile-time confidence in SQL statement syntax and intent.

Stephen Celis 8.7k Jan 3, 2023
A toolkit for SQLite databases, with a focus on application development

A toolkit for SQLite databases, with a focus on application development

Gwendal Roué 5.6k Jan 8, 2023
YapDB is a collection/key/value store with a plugin architecture. It's built atop sqlite, for Swift & objective-c developers.

YapDatabase is a collection/key/value store and so much more. It's built atop sqlite, for Swift & Objective-C developers, targeting macOS, iOS, tvOS &

Yap Studios 3.3k Dec 29, 2022
A Cocoa / Objective-C wrapper around SQLite

FMDB v2.7 This is an Objective-C wrapper around SQLite. The FMDB Mailing List: https://groups.google.com/group/fmdb Read the SQLite FAQ: https://www.s

August 13.7k Dec 28, 2022
Implement Student Admission System using SQlite

StudentAdmissionSQLiteApp Implement Student Admission System using SQlite. #Func

Hardik 2 Apr 27, 2022
macOS Sqlite tableView 샘플 - objective c

목적 Objective C언어를 이용하여 macOS를 개발해본다. Sqlite를 이용하여 데이터를 저장하고, 불러와본다. FMDB를 이용한다. 데이터를 NSTableView를 이용하여 불러와본다. 추가적으로 NSOutlineView 구현해본다. 추가적으로 KVOCont

HyunSu Park 0 Jan 10, 2022
A Swift wrapper for SQLite databases

Squeal, a Swift interface to SQLite Squeal provides access to SQLite databases in Swift. Its goal is to provide a simple and straight-forward base API

Christian Niles 297 Aug 6, 2022
A stand-alone Swift wrapper around the SQLite 3 client library.

Perfect - SQLite Connector This project provides a Swift wrapper around the SQLite 3 library. This package builds with Swift Package Manager and is pa

PerfectlySoft Inc. 47 Nov 19, 2022
Swift APIs for SQLite: Type-safe down to the schema. Very, very, fast. Dependency free.

Lighter Lighter is a set of technologies applying code generation to access SQLite3 databases from Swift, e.g. in iOS applications or on the server. L

Lighter.swift 330 Dec 26, 2022
Synco - Synco uses Firebase's Realtime Database to synchronize data across multiple devices, in real time

Synco Synco uses Firebase's Realtime Database to synchronize a color across mult

Alessio 0 Feb 7, 2022
CoreData/Realm sweet wrapper written in Swift

What is SugarRecord? SugarRecord is a persistence wrapper designed to make working with persistence solutions like CoreData in a much easier way. Than

Modo 2.1k Dec 9, 2022
Unrealm is an extension on RealmCocoa, which enables Swift native types to be saved in Realm.

Unrealm enables you to easily store Swift native Classes, Structs and Enums into Realm . Stop inheriting from Object! Go for Protocol-Oriented program

Artur  Mkrtchyan 518 Dec 13, 2022
Realm GeoQueries made easy

RealmGeoQueries simplifies spatial queries with Realm Cocoa. In the absence of and official functions, this library provide the possibility to do prox

Marc Hervera 142 Jul 21, 2022