mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Fix issue with class method and correct test
This commit is contained in:
parent
ac5983cc1f
commit
ee72e4b9c1
2 changed files with 7 additions and 3 deletions
|
@ -34,7 +34,7 @@
|
|||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
static NSUbiquitousKeyValueStore *_sharedUbiquitousKeyValueStore = nil;
|
||||
|
||||
|
@ -47,13 +47,17 @@ static NSUbiquitousKeyValueStore *_sharedUbiquitousKeyValueStore = nil;
|
|||
return nil;
|
||||
}
|
||||
|
||||
- (NSUbiquitousKeyValueStore *) defaultStore
|
||||
+ (NSUbiquitousKeyValueStore *) defaultStore
|
||||
{
|
||||
if(_sharedUbiquitousKeyValueStore == nil)
|
||||
{
|
||||
NSString *storeClassName = [[NSUserDefaults standardUserDefaults]
|
||||
stringForKey: @"GSUbiquitousKeyValueStoreClass"];
|
||||
Class klass = NSClassFromString(storeClassName);
|
||||
if(klass == NULL)
|
||||
{
|
||||
klass = NSClassFromString(@"GSSimpleUbiquitousKeyValueStore");
|
||||
}
|
||||
_sharedUbiquitousKeyValueStore = [[klass alloc] init];
|
||||
if(_sharedUbiquitousKeyValueStore == nil)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue