I am writing a demo messaging app to learn Core Data. In my model, an entity Conversation has a to-many relationship messages to Message. A Message has a timeStamp. I intend to display these messages in a collection view/table view with an NSFetchedResultsController. I want to know what would be the most efficient way to sort these messages. I searched around and found that I could sort the messages using:
- an
NSSortDescriptoronmessage.timeStamp - making the
messagesrelationship ordered - adding a
sequenceproperty tomessage
What should be the best way to sort the messages?