#import <Foundation/Foundation.h>
@interface BMUserInfo : NSObject
+ (instancetype)shareInstance ;
@end
#import "BMUserInfo.h"
#import <SMS_SDK/SMSSDK.h>
static id _instance;
@implementation BMUserInfo
+ (instancetype)allocWithZone:(struct _NSZone *)zone {
@synchronized (self) {
if (_instance == nil) {
_instance = [super allocWithZone:zone];
}
}
return _instance;
}
+ (instancetype)shareInstance {
@synchronized (self) {
if (_instance == nil) {
_instance = [[self alloc] init];
}
}
return _instance;
}
- (id)copyWithZone:(NSZone *)zone {
return _instance;
}
@end