if you suffer from this problem when trying to save data in APP extensions using userDefault , you may have written this code:
[[NSUserDefaults standardUserDefaults] initWithSuiteName:@"group.xxx.com"];
This code reset to default userDefault .
Actually, the correct code is:
[[NSUserDefaults alloc] initWithSuiteName:@"group.xxx.com"];
http://www.jianshu.com/p/e782104c3bc3
H u Y an g Oct 24 '16 at 5:22 2016-10-24 05:22
source share