In my Application we are using Realm Storage for storing values locally. I can Able To Store my Array Values As Sting. But Not Able To Store and Retrive Values As Array. Is It Possible To Store NSArray Values To Realm Object and Retrieve It As NSArray. Here Is The Code I Have Used To Store String Values:
class PracticeView: Object
{
dynamic var PracticeArray = ""
}
And Usage:
let realm:Realm = try! Realm()
let PracticeDetails = PracticeView()
PracticeDetails.PracticeArray = "Test String Values"
try! realm.write
{
realm.add(PracticeDetails)
}
print("Values In Realm Object: \(PracticeDetails.PracticeArray)")
//Result Will Be
Values In Realm Object: Test String Values