wczekalski
wczekalski

Reputation: 745

Multiple user profiles/accounts in an app - Persistence

How to implement multiple user accounts/profiles in an app? I use Core Data in my project and I don't know how to design my model. Should I make a NSPersistentStore for every user or what? Or make some top-level entity ?

Upvotes: 1

Views: 142

Answers (1)

Mundi
Mundi

Reputation: 80273

Have a top level entity UserSession and store all messages, friends etc. below that. Now you can filter everything by some attribute of UserSession, such as userID.

Upvotes: 2

Related Questions