Question

I have an application where multiple users can login(not simultaneously though!only a single user can login at a time.) and use the app. I need to save the user specific settings for each user using core data.I wish to know the steps to do the same.I went through a lot of tutorials but none of them had any clear information about it.

What i'm trying to do is to save these preferences and retrieve them again once the user has logged in.

I am new to ios hence any guide to tutorials/examples regarding this will be greatly appreciated.

Thanks in advance.

Était-ce utile?

La solution

In a core data store?

There is many ways to do that of course, depending on your schema. But the basis should be pretty much like that:

Option
- name: NSString // unique, indexed
- data: transformable
- user: NSString, -> user // uniquely identifies a user, by email, name, relationship if a user entity exists, etc.

You may want to add a preload flag to preload some options when the user logs it, or whatever suits your needs...

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top