Food Recognition Delegate

Implement the delegate FoodRecognitionDelegate:

extension PassioQuickStartViewController: FoodRecognitionDelegate {
    func recognitionResults(candidates: FoodCandidates?, image: UIImage?) {
        if let detectedCandidates = candidates?.detectedCandidates {
            detectedCandidates.forEach {
                if let pidAtt = self.passioSDK.lookupPassioIDAttributesFor(passioID: $0.passioID) {
                    print("Food name =\(pidAtt.name)")
                }
            }
        }
    }
}

If at any point you need help from the Passio team, please reach out to us at support@passiolife.com

Last updated