Closed weiner closed 8 years ago
This is quite easy to do.. all you have to do is change this line
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
to
NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.company.appname"];
in AppPreferences.m
It would be great to have it implemented by default but for those in need of it right now you can do it yourself by changing that one line. I think it appears in 3 different places in the same file.
just got a clever idea how to implement this.
please checkout latest version
how to use:
var suitePrefs = plugins.appPreferences.iosSuite ("suiteName");
suitePrefs.fetch (...);
suitePrefs.store (...);
No response
Hi,
I would love to have the option to use this module in combination with a iOS Extension. To share NSUserDefaults between the App and a Extenion you need to use the NSUserDefaults initWithSuiteName.
https://developer.apple.com/library/prerelease/ios/documentation/Cocoa/Reference/Foundation/Classes/ NSUserDefaults_Class/index.html#//apple_ref/occ/instm/NSUserDefaults/initWithSuiteName: