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
1 answer

Getting distinct rows from Realm table in iOS

I am using Realm database for iOS application where i have a use case in which i want to filter result set by distinct values for a particular field. This field is not a primary key of the realm table. I was not able to construct query for that.…
Rajeev
  • 4,762
  • 8
  • 41
  • 63
3
votes
2 answers

Realm Swift How to get notified when Result has been updated

I am using a Realm result object Resultas a datasource for uitableview. there is some late API calls in different view controller that load more AnObject objects. what I want is to get notified when my datasource has been update to update…
Ismail
  • 2,778
  • 2
  • 24
  • 39
3
votes
1 answer

How to retrieve an object that is in a list in another object using realm swift?

I have some Realm classes that look like this: class Friends: Object { dynamic var name = true dynamic var role = true dynamic var type = true dynamic var owner: Profile? } class Profile: Object { dynamic var uuid =…
eeschimosu
  • 633
  • 2
  • 10
  • 24
3
votes
1 answer

Using Realm Swift with initializers throws constant errors

Xcode 7.1 and Swift 2.1 with latest Realm Swift 0.96.2 I created a model class for Realm but it is constantly throwing errors about inits. I understand initializers to an extent for subclasses but I can't wrap my head around this and why it fails. …
ItsPronounced
  • 5,475
  • 13
  • 47
  • 86
3
votes
1 answer

How to compare Realm schemas from Android and iOS realm file

I've implemented database in realm on Android an iOS. I'm hardly sure that they are the same but if I'm replacing file from iOS and getting Realm instance using this file I get RealmMigrationNeededException. Is there any way to compare schemas in…
Dawid Hyży
  • 3,581
  • 5
  • 26
  • 41
3
votes
3 answers

Update Realm database version

I am using realm, version 0.79.0 in my current android project. Now I want to update realm version to 0.84.0 and also want to use RealmConfiguration at Application class to use Realm.getDefaultInstance() instead of Realm.getInstance(context) for…
Imtiaz Hossain
  • 347
  • 5
  • 16
3
votes
1 answer

Unrecoverable error. mremap(): failed: Out of memory in io_realm_internal_SharedGroup.cpp line 188

I have implemented Realm as my DB, and in my app I run a service on the phone contacts for checking any change in my phonebook. The service works for like 3 to 4 changes and then the app crashes with this error in my logcat. Unrecoverable error.…
3
votes
1 answer

RealmSwift Unit Test For Realm.io Migration

I need to write unit case for realm.io migration. How do i simulate a before and after Object Class?
perwyl
  • 323
  • 3
  • 14
3
votes
2 answers

Realm database object seems empty, but then isn't

I am using Realm for a small, simple project. I'm using the latest version of the framework (compiled from Github yesterday) and the current AppStore version of Xcode with Swift 2.1. I am handing a Realm database object over from one view controller…
NerdyTherapist
  • 520
  • 5
  • 15
3
votes
1 answer

How can I build a static Realm library for an OS X command-line utility?

I have a Foundation-based command-line utility that I'd like to add Realm support to. I can't use the Realm.framework, though, I don't have a bundle to add it to (and I prefer to avoid installation hacks that involve install_name_tool). It seems…
bombich
  • 33
  • 3
3
votes
1 answer

Realm Browser not allowing me to open files

I've updated Realm Browser this morning to version 0.95.2, using the previous version I had no issues opening and viewing realm files but it seems now that I'm unable to do this and when I want to open this file this is the message that I'm…
Tunds
  • 1,804
  • 2
  • 15
  • 30
3
votes
1 answer

Realm Unique ID with Swift 2

In Realm is there a way to set a unique id for every object stored in the database? I don't necessarily need it to be auto incremented just unique every time. I was just wondering is there a way to do it in Swift 2 on iOS 8 or above? I know you can…
Cody Weaver
  • 4,756
  • 11
  • 33
  • 51
3
votes
1 answer

Creating a realm record with a linked property

I am just starting with realm and I have two objects that I think I have created properly. A ColourCategory can have many objects of type PaletteColour class PaletteColour: Object { dynamic var name = "" dynamic var category:…
Stewart Lynch
  • 875
  • 9
  • 26
3
votes
3 answers

How to delete object from realm database in table view controller

if this is my code then why i get the error: Value of type 'RLMResults' has no member 'arraySortedByProperty' when I'm using realm fore saying data. var items = [NSManagedObject]() var todos: RLMResults { get { return…
Ashwini
  • 337
  • 1
  • 5
  • 10
3
votes
2 answers

Can't install Realm library via CocoaPods in Swift 2.0

I am making iOS app in Swift2.0. I tried to install Realm library via CocoaPod. It is fine when I execute 'pod install' in command line. But in Xcode project, I can't build my iOS app. There is an error and stop to build. error:…