ios - Saving parseable string into core data -


i 'm developing uitableview based application sections , rows numbers different selecions determined data core data. need structure keeping user's choice.

to clear, password saving app , users can save informations according pre installed templates. seen in images below, different key value pairs, wireless router , instant messenger selections, shown in table view. keep rows information different types in core data rows can loaded dynamically according values core data...

typewireless routerinstant messngr

the application 1 user. user can change values of row including row in title header, "wireless router" value example... after user make changes in rows' value , click "save" bar button @ top right, third tab added below , display new data modified user.

my question how should keep new data modified user?

my core data structure is;

core data

a solution comes in mind keep values parseable string in table, "saveddata" in image above.

what approach can more suitable solve need. saving key value pairs 1 table parseable string sth proper , efficient? or there better way.

nsuserdefaults versatile solution. accepts nsarray, nsdata, nsdictionary, nsnumber, nsstring. there many different ways model this. if expect app have multiple users store dictionaries of usernames, passwords, url. if use case 1 single user should work fine. top line save , bottom line read anywhere in app.

[[nsuserdefaults standarduserdefaults] setobject:usernametextfield.text forkey:@"flickerusername"];   nsstring flickerusername = [[nsuserdefaults standarduserdefaults] object forkey:@"flickerusername"]; 

Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -