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

Realm.io. How to refresh replaced realm?

I've just created a dropBox backup/restore in my Realm based iOS app. I'm replacing current defaultRealm with the imported one. If I kill the app and restart it, everything works as expected and I see my new imported data but I can't make it appears…
rmvz3
  • 1,133
  • 2
  • 16
  • 27
3
votes
0 answers

Realm Xcode Archive issue

Using: Realm 2.0 Swift 2.0 Xcode 7 My app builds fine and simulates with no problem. But when I try to archive I get the following error: bash:…
3
votes
1 answer

Realm format date JSON swift

I had JSON with a date "date_use" : {"expense": {"id":1, "amount":123.3, "date_use":"2015-07-04T00:00:00Z"} } I had an error on date format when I execute this code : self.realm!.create(Expense.self, value:json["expense"].object,…
3
votes
1 answer

How to perform equal-to comparison on multiple columns in Realm

I'm trying to create a method for querying a table in Realm with the option for excluding certain rows (by their IDs). Since Realm doesn't support multiple equal parameters similar to its findAllSorted(String[], boolean[]) method, I'm performing it…
Saket
  • 2,945
  • 1
  • 29
  • 31
3
votes
0 answers

Realm for ios is not saving, ending debug

My code is handling the response from an API client object, as a delegate of that object. I've confirmed in the debugger that I'm getting the data I expect and everything seems fine. It populates the RLMObject subclass "Question" object just…
Dan Ray
  • 21,623
  • 6
  • 63
  • 87
3
votes
1 answer

Realm Swift 2.0: "Operation not permitted" - only on device

Right now I'm in the process of migrating from Swift 1.2 to Swift 2.0. The project I'm working on uses Realm as a database. Everything works fine in Swift 1.2 on both, device and simulator. But I get this error with Swift 2.0 when running app on…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
3
votes
1 answer

How can I fix the error of installing Realm for swift 2.0?

I've try to install realm for swift 2.0, but error shown. Please tell me how to solve this problem. I've already done "sudo gem update cocoa pods", and "sudo gem install cocoapods --pre". /Users/*******/App/BandApp% pod…
Yosuke.Y
  • 33
  • 5
3
votes
2 answers

"Any" field in .realm file

I have a pre-initialized .realm file that I'm trying to access in Android Studio. I have used Realm browser to figure out the exact schema to model my classes after (i.e. field names and types), but I can't figure out what the Any type of the…
asaini007
  • 858
  • 5
  • 19
3
votes
2 answers

Deleting with one-to-many relationship

I have a one-to-many relationship: class GameSystem: Object { dynamic var gameSystemName = "" } class games: Object { dynamic var gameSystemName = gameSystemName().name dynamic var gameTitle = "" dynamic var gameGenre = "" } The gameSystemNames…
ultraflex
  • 164
  • 3
  • 8
3
votes
2 answers

Easiest way to query nested optional realm objects in swift

I am using Realm for Swift. I have two Realm objects structures like this: class outerObject : Object { dynamic var innerObject : innerInfo? } class innerInfo : Object { dynamic var sortId = 5 } I want to make a query that gets every…
blackpool
  • 485
  • 2
  • 8
  • 16
3
votes
1 answer

Realm - Can I save a object after delete the object?

I want to add an object to favorites. In that case, when users press a button to add an object to favorites, the object will be saved to realm. then he press a button to remove the object from favorites and it will be removed. Afterwards, he press…
user3225917
  • 2,991
  • 2
  • 13
  • 17
3
votes
1 answer

Android Realm Java 0.82.1 ArrayIndexOutOfBoundsException

I'm getting this error when trying to update an objet from realm (0.82.1): rowIndex > available rows: 0 > 0 Realm realm = null; try{ realm = Realm. getInstance ( context ); RealmResults results = realm.allObjects( Track.class ) …
mrpep
  • 131
  • 3
  • 12
3
votes
2 answers

Realm.objects() returns empty objects

My class has all properties as dynamic but still when retrieving them from realm i get a collection of empty objects, and check the realm db with the realm browser and the data is there, this is my class: class ProjectEntity: Object { /** …
3
votes
1 answer

search nearby places from database [swift]

I am developing an app which allows users to search nearby place according to the radius provided by the user. I have some places stored in a realm database with the latitude and longitude of that place. I am able to get the users current latitude…
sunny k
  • 330
  • 1
  • 4
  • 13
3
votes
4 answers

How to use random and limit in realm

I used realm.io in swift. I have 6 and more data. I wanna select random 4 data. var words: Results { get { return Realm().objects(Word).filter("Limit(4)") } }
user4526616