iOS8 : Saving array into user defaults makes app "pause" -


this bug 1 hour old, recent ios8 update. basically, we're saving array of dictionaries in nsuserdefault preferences , working fine before, , isn't now.

symptoms : app reads line , stops without crashing or error. no message of kind. nothing logs after several minutes.

no idea why or how, suggestion welcome.

if of help, line crashes :

 [[nsuserdefaults standarduserdefaults] setobject:credentialslist forkey:config_credentials]; 

this array contains 1 dictionary per user credentials.

okay, found workaround issue.

i've read nsuserdefaults issue many people ( here example ) in case :

saving nsmutablearray in nsuserdefaults

now noticed saving arrays works fine, mutable ones caused problems ( reason unkown, see comments above ). created array , initiated mutable one, , saved array instead of mutable one.

like :

//my mutable array called credentialslist nsarray *temp = [[nsarray alloc]initwitharray:credentialslist]; [[nsuserdefaults standarduserdefaults] setobject:temp forkey:config_credentials]; 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -