diff --git a/SEBLEPrinter.xcodeproj/project.xcworkspace/xcuserdata/xiaoxiao.xcuserdatad/UserInterfaceState.xcuserstate b/SEBLEPrinter.xcodeproj/project.xcworkspace/xcuserdata/xiaoxiao.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..09b140d
Binary files /dev/null and b/SEBLEPrinter.xcodeproj/project.xcworkspace/xcuserdata/xiaoxiao.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/SEBLEPrinter.xcodeproj/xcuserdata/xiaoxiao.xcuserdatad/xcschemes/SEBLEPrinter.xcscheme b/SEBLEPrinter.xcodeproj/xcuserdata/xiaoxiao.xcuserdatad/xcschemes/SEBLEPrinter.xcscheme
new file mode 100644
index 0000000..5ef3937
--- /dev/null
+++ b/SEBLEPrinter.xcodeproj/xcuserdata/xiaoxiao.xcuserdatad/xcschemes/SEBLEPrinter.xcscheme
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SEBLEPrinter.xcodeproj/xcuserdata/xiaoxiao.xcuserdatad/xcschemes/xcschememanagement.plist b/SEBLEPrinter.xcodeproj/xcuserdata/xiaoxiao.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..bb2e093
--- /dev/null
+++ b/SEBLEPrinter.xcodeproj/xcuserdata/xiaoxiao.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ SchemeUserState
+
+ SEBLEPrinter.xcscheme
+
+ orderHint
+ 0
+
+
+ SuppressBuildableAutocreation
+
+ B9499D371CDB1FFF00542039
+
+ primary
+
+
+
+
+
diff --git a/SEBLEPrinter/BLEPrinter/SEPrinterManager.m b/SEBLEPrinter/BLEPrinter/SEPrinterManager.m
index 6455ab1..4470f67 100644
--- a/SEBLEPrinter/BLEPrinter/SEPrinterManager.m
+++ b/SEBLEPrinter/BLEPrinter/SEPrinterManager.m
@@ -42,7 +42,15 @@ @implementation SEPrinterManager
+ (instancetype)sharedInstance
{
- return [[self alloc] init];
+// return [[self alloc] init];
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ instance = [[SEPrinterManager alloc] init];
+
+ [instance resetBLEModel];
+ });
+
+ return instance;
}
+ (NSString *)UUIDStringForLastPeripheral
@@ -54,14 +62,21 @@ + (NSString *)UUIDStringForLastPeripheral
- (instancetype)init
{
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- instance = [super init];
- instance.perpherals = [[NSMutableArray alloc] init];
- instance.writeChatacters = [[NSMutableArray alloc] init];
- instance.timeout = 30;
- });
- return instance;
+// static dispatch_once_t onceToken;
+// dispatch_once(&onceToken, ^{
+// instance = [super init];
+// instance.perpherals = [[NSMutableArray alloc] init];
+// instance.writeChatacters = [[NSMutableArray alloc] init];
+// instance.timeout = 30;
+// });
+// return instance;
+ self = [super init];
+ if (self) {
+ _perpherals = [[NSMutableArray alloc] init];
+ _writeChatacters = [[NSMutableArray alloc] init];
+ _timeout = 30;
+ }
+ return self;
}
+ (instancetype)allocWithZone:(struct _NSZone *)zone