mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +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
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
@interface NSUbiquitousKeyValueStore : NSObject
|
||||
|
||||
// Getting the Shared Instance
|
||||
- (NSUbiquitousKeyValueStore *) defaultStore;
|
||||
+ (NSUbiquitousKeyValueStore *) defaultStore;
|
||||
|
||||
// Getting Values
|
||||
// Returns the array associated with the specified key.
|
||||
|
|
|
@ -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…
Reference in a new issue