ITADN

RealmSwift multiple thread connection

#8806Openertucaglar 创建于 2025-11-21
T-EnhancementO-CommunitySDK-Use:LocalImportance:Dealbraker
E
ertucaglarcommented
### 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
0 条评论