//
//  UDManager.m
//  AIIM
//
//  Created by gan on 2025/3/28.
//

#import <Foundation/Foundation.h>
#import "UDManager.h"


@implementation UDManager

+ (UDManager *_Nonnull)shareInstance{
    static id gShareInstance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
      gShareInstance = [[self alloc] init];
    });
    return gShareInstance;
}

- (instancetype)init {
    if (self = [super init]) {
    }
    return self;
}


-(void)setSDManager:(NSString *_Nonnull)obj key:(NSString *_Nonnull)key{
    [[NSUserDefaults standardUserDefaults] setObject:obj forKey:key];
}
-(NSString *_Nonnull)getSDManager:(NSString *_Nonnull)key{
    NSString *obj = [[NSUserDefaults standardUserDefaults] objectForKey:key];
    return obj;
}
-(void)setDDManager:(NSDictionary *_Nonnull)obj key:(NSString *_Nonnull)key{
    [[NSUserDefaults standardUserDefaults] setObject:obj forKey:key];
}
-(NSDictionary *_Nonnull)getDDManager:(NSString *_Nonnull)key{
    NSDictionary *obj = [[NSUserDefaults standardUserDefaults] objectForKey:key];
    return obj;
}
-(void)removeUDManager:(NSString *_Nonnull)key{
    [[NSUserDefaults standardUserDefaults] removeObjectForKey:key];
}
@end
