소스 검색

Fixed iOS crash due to force unwrap of nil

flutter-beta
Kamil Powałowski 6 년 전
committed by Dominik Spicher
부모
커밋
cb49651d73
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. +2
    -4
      ios/Classes/QRView.swift

+ 2
- 4
ios/Classes/QRView.swift 파일 보기

@@ -26,10 +26,8 @@ public class QRView:NSObject,FlutterPlatformView {
try scanner?.startScanning(resultBlock: { codes in
if let codes = codes {
for code in codes {
if (code != nil && code.stringValue != nil) {
let stringValue = code.stringValue!
self.channel.invokeMethod("onRecognizeQR", arguments: stringValue)
}
guard let stringValue = code.stringValue else { continue }
self.channel.invokeMethod("onRecognizeQR", arguments: stringValue)
}
}
})


불러오는 중...
취소
저장