Skip to content

RealmSwift multiple thread connection #8806

@ertucaglar

Description

@ertucaglar

Problem

I'm using RealmDB in my React Native app, and I need to access the database from both JavaScript and iOS native.

I have a module that handles all network requests for my app and reads and writes data to RealmDB after performing complex calculations. This module was developed as a separate package with react-native-nitro-modules.

My main problem is that I can only access RealmDB in Swift within the module I developed, via MainActor.run, which causes UI lag in my app.

My goal is to perform all operations within the module asynchronously and without blocking the main thread.

What advice can you give me? Am I going about this the wrong way? Or can I solve this problem in another way?

Solution

No response

Alternatives

No response

How important is this improvement for you?

Dealbreaker

Feature would mainly be used with

Local Database only

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions