From beda88151e36947f11643fd2c1cf397652628811 Mon Sep 17 00:00:00 2001 From: Logan Cautrell Date: Wed, 23 Aug 2017 13:42:30 -0500 Subject: [PATCH] Add error handling. Remove xcuserdata (#3) --- .gitignore | 1 + .../UserInterfaceState.xcuserstate | Bin 36935 -> 0 bytes .../xcdebugger/Breakpoints_v2.xcbkptlist | 5 ----- Near/MainViewController.swift | 18 +++++++++++++----- 4 files changed, 14 insertions(+), 10 deletions(-) delete mode 100755 Near.xcodeproj/project.xcworkspace/xcuserdata/logancautrell.xcuserdatad/UserInterfaceState.xcuserstate delete mode 100755 Near.xcodeproj/xcuserdata/logancautrell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist diff --git a/.gitignore b/.gitignore index e43b0f9..59c8462 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +*xcuserdata* .DS_Store diff --git a/Near.xcodeproj/project.xcworkspace/xcuserdata/logancautrell.xcuserdatad/UserInterfaceState.xcuserstate b/Near.xcodeproj/project.xcworkspace/xcuserdata/logancautrell.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100755 index 8adf0fc9f797db8f618a54dec90775958fe2c426..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 36935 zcmeFa2Ygdi`#65jxw$K)ZQ9aB_n?a=P1BYRI@1B2jFvspG)>!dBqeEqBIrF1+*?s` z(Sou>#XUh#T)0@G;6M>^;Z{UZ|IfWQ>0qee_xJvO|M&a(yz((k?mhF_=Q+=FPE&WM z&DEpV@1qcfDVkDI48^Jo)P=L+7g?Pyo5MaU-qF-IeMjXo{nFDu5bI1yadW3N?;OrL>feN~82tI#o$kQPorpRZG=Tlc_1xRB9SkPc=}} zsTtHfYChFOwNo8bC)GvSsUB(>wVWc<#nejb7V1{&Hfj}hJ9P(jC$*WnpL&3LklI2$ zL_JJBLOn-qr*=@!Q!h|2Q?F33Q*Ti3QSVb9P)DdwsL!bHsUN6c5rq(9kbu<43;Ch| zG#Uk=U=)VJ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q$$P}Z%QP7u?`quC_*CPw zjn6ec-}qwVD~+!;zS;Oei2K7Kh~)%dM7sEE_GGEe~2AwLD>Y+VZUBdCMNle#-}z!jGLKezS*nUr`fN0baPyDLUVF+YI9n%p*gELr#Y|L)O>04=H}haC#;dy z0&9`A#99TH5YM(Qu$sZ^4terchjpQKv2}&@a_dU#J=XQsP1gIZTda>*AGbbbeZ{)V z`i6D4b)WTs^iy{CO~`_lHy+plcDrv3W%o7!(_zped__Pg45wtv#0?$C8Kbo6!f zcii9caK~dEPj+nW*xvC%$BP}WbsXyWpyP1I#~q(^eAh{J(w%Il&^fBpx6{8furt0h zp)UyJVch}yoU+tmxBD=+Y zx&40o+x8>&&+K2?zqbEi|Ji=h{+k0iG>!;Isw2%|aAY}h91|RcjuOWdN4;Z)W42?i zV}Zl$Xm+$Xu5>)?c-QfJcU*T>x2?OQyQh0m_eI^8bzj+iP4|u6E4y#&zP)>6_vY@W zy8pi#&ZQ*^FbcyIB-+Hp5JZtA;}Bgi1R=teNMRaU1HyoyOc|D|_|Ano=l!6K6+z23 zLAnZ~O+*j_5rGwiZIq&mC1GfZ#&jE$GQ>+*&*FXl!@GDMg`w~?JPX6&O&AX|VIeGr zWm-=gsGJg%q!d-tF4|3dsfKE)jt - - diff --git a/Near/MainViewController.swift b/Near/MainViewController.swift index 2eba20d..7f4674a 100755 --- a/Near/MainViewController.swift +++ b/Near/MainViewController.swift @@ -53,6 +53,17 @@ extension MainViewController: NFCProtocol { */ public func readerSession(_ session: NFCNDEFReaderSession, didInvalidateWithError error: Error) { print("\(error)") + + // 204 is a raised when a single read is completed. + guard let err = error as? NSError, err.code != 204 else { + return + } + DispatchQueue.main.async { + let alert = UIAlertController(title: "Error", message: error.localizedDescription, preferredStyle: .alert) + let action = UIAlertAction(title: "OK", style: .default, handler: nil) + alert.addAction(action) + self.present(alert, animated: true, completion: nil) + } } /*! @@ -79,8 +90,7 @@ extension MainViewController: NFCProtocol { * @discussion Gets called when the NFC reader session has become active. RF is enabled and reader is scanning for tags. * The @link readerSession:didDetectTags: @link/ will be called when a tag is detected. */ - public func readerSessionDidBecomeActive(_ session: NFCReaderSession) - { + public func readerSessionDidBecomeActive(_ session: NFCReaderSession) { print("readerSessionDidBecomeActive") } @@ -92,8 +102,7 @@ extension MainViewController: NFCProtocol { * * @discussion Gets called when the reader detects NFC tag(s) in the polling sequence. */ - public func readerSession(_ session: NFCReaderSession, didDetect tags: [NFCTag]) - { + public func readerSession(_ session: NFCReaderSession, didDetect tags: [NFCTag]) { print("didDetect tags: \(tags)") } } @@ -137,7 +146,6 @@ extension MainViewController : UITableViewDelegate { } } - extension Substring { func toString() -> String { return String(self)