Questions tagged [realm]

Realm, formally known as MongoDB Realm, is an object-oriented database widely used as an alternative to SQLite & ORMs that includes a built-in device-to-cloud data sync. Realm supports a variety of platforms including Android, iOS, Linux, macOS, and Windows.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

How to nest navigator inside a RealmProvider?

The problem seems pretty simple. I want my ToDo screen to have access to the RealmProvider. The issue is I don't have access to the navigator in the LoginScreen when called as fallback for ...
S Roy's user avatar
  • 1
0 votes
0 answers
18 views

How to begin with Realm in Android with Kotlin

Can anyone tell me how to begin with Realm DB, I am new to Realm and not able to add a proper dependency of Realm, to begin with it. I am copying all the dependencies from Realm documentation and ...
user23060754's user avatar
1 vote
1 answer
26 views

How can I copy results from Realm in a background thread while still listening for changes from the main thread?

java.lang.IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created. on realm.copyFromRealm(results) see the code snipper below ...
Andrew's user avatar
  • 2,568
0 votes
0 answers
7 views

Opening Realm file in browser always requires an encryption key and I want alternative

When I tried to open a Realm file using Realm Browser it tells that I have to enter a key How can I open them or get that key ? I've tried to read old answers but with no help , and I have some issues ...
Mohammad Al-Haimouni's user avatar
-1 votes
0 answers
15 views

Why RealmSwift SDK for watchOS is taking 42 MB but for iOS it is just 14 MB?

Recently I have added offline saving support to my watch app using RealmSwift. But while uploading the app to TestFlight, It gave me an error ITMS-90389: Size limit exceeded - The size of the watchOS ...
Arun's user avatar
  • 481
0 votes
0 answers
21 views

Unable to loop through connected objects on realm swift

I am completely flumixed as to what and why this is happening. However, following the tutorials, this should not be happening. I am getting the following error "Referencing initializer 'init(_:...
jNimble's user avatar
0 votes
0 answers
26 views

How to update Realm subscription with Network Data using Combine and SwiftUI [closed]

I have a function fetch current which gets the current user from Realm or the network. I'm trying to change this to create a subscription where it will fetch the user from Realm and update the Realm ...
Rush B's user avatar
  • 29
0 votes
0 answers
31 views

Cannot use realm with react native and expo in web

I'm trying to use realm in react-native web (by running npm run start and then pressing w), but I'm getting the following error: Web Bundling failed 4940ms The package at "node_modules\realm\dist\...
luis enrique vargas azcona's user avatar
0 votes
1 answer
70 views

How to set a linked object property by ObjectId in the Realm Swift SDK

TLDR: How can one set a to-one reference object property without initialising the full object? e.g. by knowing the ObjectId of the linked object (something like DBRef in JS) Setup: Suppose there are ...
ambassador's user avatar
-3 votes
0 answers
173 views

How can I list and update data with Realm in React Native?

I have two schemas named ModelA and ModelB. ModelA has a list containing ModelB's objects. After querying and listing ModelA, I want to show only the previously determined data in modelB. Then, I want ...
Blogger Klik's user avatar
0 votes
0 answers
20 views

Using exactly same configuration but still get “Configurations cannot be different” error in Realm Java SDK

I'm using Realm Android Java SDK with Sync feature. I'm getting Configurations cannot be different if used to open the same file error, although I'm using code in both the activities. These are the ...
hkchakladar's user avatar
-1 votes
1 answer
52 views

Using a realm outside of react components

I am using @realm/react in my react native application. Unfortunately, the docs are not that great. They offer a ContextProvider and hooks that you can use to access the realm but there is no ...
Fuzzyma's user avatar
  • 7,894
0 votes
0 answers
43 views

MongoDB Atlas Device Sync client reset

Made breaking changes in DB schema (renamed document property), so client reset is needed. I have implemented ClientResetHandler in realm config (just for logging for now). But none of this handlers ...
Arvis's user avatar
  • 8,311
0 votes
0 answers
19 views

Error: Cannot find module '../generated/ts/realm.node'

I am trying to create a node script to seed a realm database as per https://www.mongodb.com/docs/realm/sdk/react-native/realm-files/bundle/ I am trying to create the bundle file for a react-native app....
jesmeister's user avatar
1 vote
1 answer
43 views

How to get a Flutter Stream from RealmResults?

I have created as Realm object and got it connected to MongoDB Atlas. In Flutter StreamBuilder widget the stream parameter takes RealmResults.changes as a stream and it works. StreamBuilder<...
Ant D's user avatar
  • 2,533
2 votes
0 answers
51 views

Error during mongo realm function call from flutter using realm sdk

i currently am building a flutter app and using mongo realm for authentication ,index searching as well as function call capabilities. Everything was working fine until i ran the command: flutter ...
Djamel Abbou's user avatar
0 votes
0 answers
135 views

Why do I get "Could not find the Realm binary" in bare bones app?

I created a bare bones expo project to test Realm and continue to get "Could not find the Realm binary". I have tried every possible solution offered up in the documentation to no avail. ...
S Roy's user avatar
  • 1
-1 votes
0 answers
62 views

Mac App's container changing when the app is signed

Context I have an unexpected scenario, where singing the app causes the container to change location. I'll provide all the details I have. For context, I have an app that uses the container for two ...
Daniel Reina's user avatar
  • 5,902
0 votes
1 answer
32 views

Navigation Object Not Initialised Error when trying to Navigate from Login Page to Signup Page when Login Page placed on UserProvider Fallback Prop

I have implemented realm device sync and I am using email/password authentication method to login. I am following the steps provided in the template and I have placed the Navigation Container at Top ...
Revanth Shalon's user avatar
0 votes
1 answer
32 views

Case Insensitive Search in Xcode 15 Using Realm List

I am developing a database app for storing famous quotations and I would like the users to search and the realm database. The search feature works, but it is case sensitive. I have tried the sample ...
Q. Preau's user avatar
0 votes
0 answers
13 views

How to resolve the warning : DefaultRealmModuleMediator.java uses unchecked or unsafe operations?

When I run my app, which is also working, with Android Studio Giraffe 2022.3.1 Patch 3, Gradle displays the following warning: Note: C:\AndroidStudioProjects\simsim\app\build\generated\source\kapt\...
Renzo Sampietro's user avatar
1 vote
0 answers
52 views

Realm Error No Subscription for WRITE: When doing multiple subscriptions of different type

I am trying to configure the realm with the help of the below function. Initially, there was only EmailAccount class after adding ApplicationAccount class while writing to EmailAccount cluster it is ...
Meet Soni's user avatar
0 votes
0 answers
44 views

Is it possible to use realm-java and realm-kotlin (kmm) in the same android project?

I have several different realm database instances in the same project and I would like to migrate them one at a time from realm-java to realm-kotlin. Is it feasible? What were the pitfalls encountered?...
Cadu's user avatar
  • 11
0 votes
0 answers
41 views

Running react-native iOS app fails due to RealmJS framwork

I am creating a react-native app where I am using MongoDB with Realm. When I run in Android. it works properly but in iOS I am having some issues with RealmJS. I have tried deleting and reinstalling ...
Besart's user avatar
  • 349
0 votes
0 answers
46 views

Flutter, the app keeps restoring cache from cloud backup and result conflict

Im using Realm to cache data from the app, im still developing the data field so it will not match in the local which has been saved so we can reistall the app to have clean cache and prevent any ...
CCP's user avatar
  • 993
0 votes
1 answer
66 views

Do I need to check for object existence when creating new Realm objects?

Using Realm, I noticed the app will crash if I try to save an object that its' ID already exists. This causes my code look like this for every Realm Object type I want to create: func fetchOrCreate(......
gerbil's user avatar
  • 869
0 votes
0 answers
38 views

Realm and MongoDB Atlas on NodeJS error: Failed to Login Cannot write to class Workstation when no flexible sync subscription has been created

I'm running the following code and running into the following problem, would anyone have any idea what might be missing from being configured or something? import Realm from "realm"; import '...
Brayan Vinicius Jordan's user avatar
0 votes
1 answer
66 views

How can I set up subscriptions to queries on queryable fields with Realm and MongoDB?

I am trying to make a cross platform desktop app, which needs to be available offline with online sync. So I have set it up using .NET Maui and MongoDB, connecting using Realm. I have never used Realm ...
Fred Roaldset's user avatar
0 votes
1 answer
55 views

RealmModule gets replaced in the library

MongoDB Realm: io.realm:realm-gradle-plugin:10.16.1 I have a library which defines @RealmModule(library=true, allClasses=true) class LibraryModule() {} and has a function LibraryDatabaseConfiguration(...
Andriy's user avatar
  • 737
0 votes
0 answers
42 views

Type of the key BsonObjectId is not supported

I try to fetch manual document from MongoDB and I receive this error: java.lang.IllegalArgumentException: Type of the key BsonObjectId(6532afe7f695fa3e25408090) is not supported. On Android you can ...
vuoncog's user avatar
1 vote
1 answer
107 views

Do WPF list based controls support two-way binding to Realm-dotnet live queries?

This is my first question on stack overflow. I'm trying to replace LiteDB with Realm DB in my WPF application. My goal is to bind ListBoxes and DataGrids to live Queries in my view models, so as UI ...
Mohamed Boulmers's user avatar
0 votes
1 answer
38 views

How to detached realm objects in swift

We are using realm and and want to detach the realm Objects, that is: create a static copy of the object that is a swift class / struct and can be passed around and modified independently of realm. We ...
ambassador's user avatar
1 vote
0 answers
41 views

Convert Realm objects to non-third-party objects in a lazy way: Results<Item> to [Item]

I'm trying to map Realm Persisted Objects to another Type for separation of concerns. I have something like a protocol repository retrieving an array of items: [Item] I've one implementation of this ...
Lory Huz's user avatar
  • 1,577
0 votes
1 answer
79 views

MongoDB Realm Sync session automatically disconnects after connecting

I am trying to connect to my Mongo DB collection as an app user, with flexible sync. But the sync connection disconnects automatically after a few seconds it seems. Here's my code. class Person ...
Teshan Shanuka J's user avatar
0 votes
0 answers
22 views

What is the best way to Realm migrate a field from one class to another?

I have a Realm class A containing a Realm class B with a 1 to 1 relationship. I've had enough of this and want to put all the B fields and content in class A. What would be the easiest way to make the ...
lorenzo's user avatar
  • 1,551
1 vote
0 answers
131 views

How to make realm objects Sendable?

TLDR: Realm introduces actor isolated realms, but realm objects are not Sendable. How is one supposed to use these actor isolated realms then? Or how do I make my Objects Sendable? Realm recently ...
ambassador's user avatar
1 vote
1 answer
42 views

Importing CSV Data to Realm Results in "null" String Instead of Swift nil for Optional String

I am importing data from a CSV file into a local Realm database. One of the properties in my Realm model is a String that's defined as optional (String?). When I encounter a CSV field with an empty ...
Zack's user avatar
  • 1,538
-1 votes
1 answer
42 views

How can I find a document by it's objectid with MongoDB atlas app service functions

Seems simple enough. I have a collection with existing records. When I query for it with MongoDB compass: use SomeDatabase db.MyCollection.findOne({}) It finds the result. When I try and create a ...
raininglemons's user avatar
0 votes
0 answers
28 views

MongoDB Realm: Create User is Slow

We have MongoDB Atlas with App Services & Data Services and are using this method to create a user but it consistently takes 1200ms to 1800ms Is there any way to speed this up? https://realm....
Marcus's user avatar
  • 705
-3 votes
1 answer
126 views

Realm Objective-C to Swift Migration (Dynamic Migration) [duplicate]

In Local Database we moved from Realm (Obj-C) to RealmSwift. After migration we have an issue in local db like all the properties were declared as Optional in Obj-C. Whereas, we used non-optional in ...
Vishnu's user avatar
  • 1
0 votes
0 answers
77 views

iOS RealmSwift DB Migration Primary Keys

I was migrating from Obj-C realm to RealmSwift. I have some changes in primary keys and data types I used following code, migrationBlock: { migration, oldSchemaVersion in if (...
Vishnu's user avatar
  • 1
0 votes
0 answers
63 views

Realm sync with swiftUI widget?

How we can use realm sync in swiftUI widget? I used the same method to opening realm from swiftUI app by flexibleSyncConfiguration in getTimeline function but as user login on the main app it seems it ...
fdvfarzin's user avatar
  • 1,145
0 votes
1 answer
51 views

there is an question, i want query all data from realm in Swift and there

this is a question, i want read all data from realm in swift, and throw an error EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff8) but I can insert data, please help me find where goes wrong ...
bp zhang's user avatar
  • 2,480
0 votes
0 answers
24 views

Android app crash Error: Missing Realm constructor. Did you run "pod install"? in react native android

Previously we used react-native 0.66.4 and realm 10.21.1. Then we updated our project into react-native 0.72.4 and realm 12.1.0. Newly build android apps are working fine without any issues. But old ...
Dulaj Madusanka's user avatar
1 vote
1 answer
58 views

Conforming class to protocol using RealmSwift

I've defined a protocol ExampleProtocol with a property exampleArray of type [Stuff]. This protocol is defined within a framework so that I can use it in my AppClip version as well. Stuff is another ...
MjDev's user avatar
  • 62
0 votes
1 answer
14 views

Realm Mongodb missing permission with HTTPS Endpoint and Function

i create a function to insert document via https endpoint in mongodb realm. exports = async function(arg){ let body = arg.body.text(); let map = JSON.parse(body); const serviceName = &...
Sayyid J's user avatar
  • 1,320
0 votes
1 answer
29 views

Unable to retrieve some property values of the saved objects in Realm Xamarin iOS

I'm new to Realm and Xamarin.iOS and I'm a bit confused as to why my saved objects are not persisted after retrieving it once in Realm. Below is the main object which I am using to save the inputs by ...
Musikero31's user avatar
  • 3,125
1 vote
0 answers
42 views

Getting String representation of Swift ReferenceWritableKeyPath is failed (returns pointer instead of type)

I have a Product class inherited from Realm Object: @objc class Product: Object { @Persisted(primaryKey: true) var id: String = "" @Persisted var externalId: String? @Persisted ...
Alex Sh.'s user avatar
  • 589
0 votes
0 answers
40 views

Need to update UITableViewCell data real time

Im working on bluetooth application getting device data from broadcasting devices, all data coming with out any issue, this code we use to test our devices and this code base filtering only those ...
Madushan Senavirathna's user avatar
0 votes
1 answer
54 views

SwiftUI TabView and Realm: Removing first and last element doesn't work

We have a realm database: Album which Items. We open Album in TabView and try to scroll through items and remove each Item. Moreover, we can open the Album in TabView with any current Item. For ...
Олег Мосейко's user avatar

1
2 3 4 5
189