From 777dbb30d6edc16c328ac5491004a1dc23e5b2b3 Mon Sep 17 00:00:00 2001 From: bianxiang Date: Mon, 13 Jun 2016 19:03:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=BF=9E=E6=8E=A5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserInterfaceState.xcuserstate | Bin 0 -> 7897 bytes .../xcschemes/SEBLEPrinter.xcscheme | 91 ++++++++++++++++++ .../xcschemes/xcschememanagement.plist | 22 +++++ SEBLEPrinter/BLEPrinter/SEPrinterManager.m | 33 +++++-- 4 files changed, 137 insertions(+), 9 deletions(-) create mode 100644 SEBLEPrinter.xcodeproj/project.xcworkspace/xcuserdata/xiaoxiao.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 SEBLEPrinter.xcodeproj/xcuserdata/xiaoxiao.xcuserdatad/xcschemes/SEBLEPrinter.xcscheme create mode 100644 SEBLEPrinter.xcodeproj/xcuserdata/xiaoxiao.xcuserdatad/xcschemes/xcschememanagement.plist 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 0000000000000000000000000000000000000000..09b140db22a11d4f5adda78135871900d6bc6451 GIT binary patch literal 7897 zcmb_hd3;k<_CNO~X||W-WqEl)1PU!8LQ7jpX+eb21u9Um8>KCTG<}o|X;P9DsAah# z0*ZpDfFcNO5zxV1M5dysh{&e0sxyw_s6Tboao^G3d3jCSp!50p#}7VjUhX;XoO93e zJ?GxmHu`EF$2jD^YE9`-X;9+NLF7s@n52^ol1;8AV@Mt;B2!5@sU|g~mdquMWIkyo*OTSsMzVrzCijvp zWGlIkY$Mx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J4_pYxmnX*|*qVw!daSZ9i*2Z~xr>vqSAjaOfNc2j>tRqNA6ix1*1vpW{kL zhGUGQ+)?Y8=V)*Q9rGPw$707)2XicUtZ=M!>~K8qc;9hRND#DwUT_M%gx*45AyF70 zWC?jfp)gUHBuo*e3YEf4!7X?Muh1wo2@8d0VX44`<-!W#Hes`{O=uO`h26q~!XDva zVV`hFcu6=c91+e6ZwPM*Zwv1T7lcoQ{|H|SUkl$lsZ;CJJB?1>X>&T9PG_QXurtd! z+BwEK)|u}tbWU_$>#T7~&IQgj&ikDQoi8{KIS)IJI4?LqaenE%C?<+S#Z)m(%n&oh zB5{&9MVu;LCzgseq9oRfK5?GdAO^+7;!=@`%f)r#dht$igV-kS5O<2Z#l7M_alhCh z9ud!q=fyY0zl-09--$nnKZ(D%G%lUX;No0@Ypg5Z6>u$dZFRM|j<{ZTopGIWz2W-A W^&i)_(ZK>J?fkr;e8zsezW-lH4z7~` literal 0 HcmV?d00001 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