0

After I upgrade my Xcode8 to Xcode9 some of my existing methods are showing error. I can't able to find the reason why. Can anyone help please. Here I have attached my response method and Error message. Thanks in Advance

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any])
    {
        guard let symbolsSet = info[ZBarReaderControllerResults] as? ZBarSymbolSet else { return }

        for symbol in symbolsSet
        {
            if let symbol = symbol as? ZBarSymbol, let data = symbol.data
            {
                let resultString = data
                if resultString.isNumeric { // Validating only numbers with extension # isNumeric
                    text = resultString
                } else {

                    print("Invalid Code")
                }
            }
        }
    }

Type 'ZBarSymbolSet' does not conform to protocol 'Sequence'

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Govindharaj Murugan
  • 414
  • 1
  • 5
  • 13
  • The ZBar SDK is pretty outdated. Consider using [AVFoundation's barcode reading capabilities](https://stackoverflow.com/a/46546821/3151675). – Tamás Sengel Oct 09 '17 at 09:46
  • Yeah You're right. But I have integrated in our existing app. now I just try to run the project in Xcode 9 after the issue came. – Govindharaj Murugan Oct 09 '17 at 09:49

0 Answers0