0

lets say I want to make an app only read data from employee realmObject like

employee: {EmpNo String, EmpName String, DeptNo int, Sal int, comm int }

now I want to add about 1000 employee to realm database to use it in my app. Is there any way to do this in design / development phase ?

or I have to build another project to add these records?

note: I have the data as csv or json, the important point that I want to add these records by developer not by user, how to do this?

Eng. Samer T
  • 6,465
  • 6
  • 36
  • 43

1 Answers1

0

I found the answer after some searching for it.

realm studio offers a way for this.

We can create new realm database file from csv file.

realm Studio>file menu>create realm from> csv.

Or after opening realm file, we can import csv data into current realm database file (one condition is: file name must match realm object in database).

realm Studio>file menu>import data from> csv.

Eng. Samer T
  • 6,465
  • 6
  • 36
  • 43