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.

Realm formally known as MongoDB Realm, is an object-oriented database widely used as an alternative to CoreDate, SQLite & ORMs. Realm supports a variety of platforms including Android, iOS, Linux, macOS, and Windows.

Realm can be used as a local-only data store or synchronized to MongoDB’s multi-cloud database platform Atlas via a built-in, real-time device-to-cloud sync service – Realm Sync.

Originally released in 2016, Realm was acquired by MongoDB in 2019. It remains open source under the Apache License.

Useful Links

9370 questions
3
votes
0 answers

Delete objects in Realm List

How do you properly delete objects in a realm list? Is this the proper way: class Parent: Object { dynamic var children: List } realm.write { realm.delete(parent.children) parent.childList.removeAll() } My tests…
Nate Mann
  • 695
  • 6
  • 17
3
votes
1 answer

If I make a database on Realm, will it be accessible to my user without internet access?

I'm trying to build my first Swift app and I think Realm may be a good option for my database. This might be a totally stupid question, but will my users be able to access the data on my database without an internet connection? I'm fairly certain…
Kulan
  • 57
  • 1
  • 5
3
votes
0 answers

Cannot open an encrypted Realm with a debugger attached to the process Error

How can I prevent this error from crashing my app, while still keeping my realms encrypted? I noticed that the example projects provided by Realm work fine, why does mine throw this exception? Cannot open an encrypted Realm with a debugger attached…
3
votes
0 answers

Many-to-many relationship in Android-Realm (n-to-m)

I need to model a many-to-many (n:m) relationship with Realm in Android. E.g., A Country has many Rivers, but there are also Rivers, that flow through many Countries. I need to query in both directions. As read here we should avoid these…
A2i_
  • 398
  • 3
  • 13
3
votes
2 answers

adding and removing Realm.Object during a migration

I am doing a migration which requires removing objects from the realm and replacing them with a different type. In short, I used to have a single type, and am now creating a hierarchy, so BaseItem now needs to be a DerivedItem. I'm not sure the best…
voidref
  • 1,113
  • 11
  • 15
3
votes
1 answer

Cant add new object to RealmList due to null object reference

I have to realm objects, one is a basic RealmObject with a two strings and a boolean, the other is just a RealmList for that object for easier access. When I try to get the list from my instance of the ContactBook and add a new object I get the…
Brady131313
  • 313
  • 2
  • 5
  • 13
3
votes
1 answer

Realm accessed from incorrect thread when saving object

I'm using Realm for a messaging app. I need to modify some of the queried objects, for example if the object is a media message that does not yet have a thumbnail. I then download it and attempt to save it to the object. I could have multiple…
Marcos Curvello
  • 873
  • 13
  • 25
3
votes
2 answers

Watchkit & Realm 0.92.3

The Swift integration of a new Realm-DB (realm 0.92.3) under Xcode 6.3 and iOS10.10.3 basically works for the iPhone (not for the Apple-Watch yet). The integration of the same realm-framework under Watchkit (i.e. Apple-Watch) does not work yet. The…
iKK
  • 6,394
  • 10
  • 58
  • 131
3
votes
1 answer

Using Realm with Swift on iOS 7

I have an app written in Swift that supports iOS 7. I want to use Realm for my database, but according to their documentation the Swift library supports iOS 8 only. I don't want to write Objective-C code in my app. Is there any way around this?
Ron.Kliffer
  • 248
  • 1
  • 9
3
votes
1 answer

How can a Realm object become invalidated w/out being deleted

I'm using RealmSwift in a project and from time to time I get a Terminating app due to uncaught exception 'RLMException', reason: 'Object has been deleted or invalidated.' I don't delete any objects from my realm database so issue isn't that the…
3
votes
1 answer

How to do Abstract Entities in Realm.io in Swift

I am converting from CoreData to Realm.io I did a little experiment to see how Realm.io handles situations where I need to have subclasses of a class that is an RLMObject. Model import Realm @objc enum RecurrenceEnum : Int { case Daily = 1 …
Scott Lewis
  • 437
  • 4
  • 18
3
votes
1 answer

Using NSCoding with Realm Model Objects

I have been banging my head on my monitor for weeks on this, and after taking a break by skirting around my issue, I find I'm running in to the very same issue all over again. First off, the closest thing I could find relating to my issue: NSCoding…
Tiki McFee
  • 228
  • 3
  • 11
3
votes
1 answer

Backup and Restore realm.io database

I need to backup my default realm.io database and restore it from Dropbox. I'm using the Dropbox-iOS-SDK to upload and download it. When I tried to replace the current database file (Ex. default.realm) with the backup, the RLMRealm object was on the…
Nicopuri
  • 901
  • 2
  • 11
  • 17
3
votes
1 answer

How can I use both Realm.io and Dagger (or any multiple dependencies that need annotation processing)?

I'm trying to use both Realm.io and Dagger in my android app, but I seem to be getting conflict issues with the META-INF/services/javax.annotation.processing.Processor file. I've tried adding the following to my build.gradle file: packagingOptions…
rharter
  • 2,495
  • 18
  • 34
3
votes
3 answers

Realm - Share Database between Apps

So I have a application that is comprised of 3 APK/Apps. How do I share the database between apps? I am assuming the reason it is currently not visible between the apps is because they are passing in different contexts. Thanks
Alan
  • 9,331
  • 14
  • 52
  • 97
1 2 3
99
100