Govindharaj Murugan
Govindharaj Murugan

Reputation: 412

Zbar Integration Issue in iOS after Xcode 9 swift 4.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'

Upvotes: 0

Views: 409

Answers (0)

Related Questions