0
votes

I want to store RLMObjects in an array to keep their order. I need to save the array to resist the order of my objects. Is it possible to make a singleton RLMObject?

1

1 Answers

0
votes

Why not have the following models?

@interface MyObject : RLMObject
// MyObject contents...
@end
RLM_ARRAY_TYPE(MyObject);

@interface MyDataStore : RLMObject
@property RLMArray<MyObject> *myOrderedObjects;
@end

You could make a singleton for MyObject and store your ordered RLMObjects in its array property.