i have followed "generickeychain" sample app apple & able write string keychain & able read keychain.
but wondering how can store array of string inside keychain, possible ? how ?
you can store objects of type cfdataref (which toll-free bridged nsdata) in keychain.
to store array of strings typically use property list serialization:
nsarray *myarray = @[@"my", @"strings"]; nsdata *data = [nspropertylistserialization datawithpropertylist:myarray format: nspropertylistbinaryformat_v1_0 options:0 error:null]; now can put data keychain.
Comments
Post a Comment