ios - Share data between targets in xcode project -
this question has answer here:
i have project 2 different targets (a free , paid version of same app) , have list
items save nsuserdefaults
. question is, there way share list between 2 version of app, without using keychain
or similar ?
your can use app group , save items in it. project -> capabilities -> app groups
add app group in targets
using
nsuserdefaults
ex:
nsuserdefaults *mydefaults = [[nsuserdefaults alloc] initwithsuitename:@"com.group.identifier"];
Comments
Post a Comment