Sharing data between targets in xcode project
I have a project with two different goals (free and paid version of the same app) and I have one list
with items that I save before NSUserDefaults
. My question is, is there a way to share this list between two versions of the app without using KeyChain
or something similar?
+3
smeshko
source
to share
1 answer
You can use an application group and save items to it. Project → Features → Application Pools
-
Add an application group for your purposes
-
Using
NSUserDefaults
Example:
NSUserDefaults *myDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"com.group.identifier"];
+4
s100i29
source
to share