Hi, I use this function to generate a QRCode Image
In another app works correctly but in the app that I develop I get this error.
Code Block func generateQRCode(string: String, height: CGFloat, width: CGFloat)->UIImage?{ let data = string.data(using: String.Encoding.ascii) if let filter = CIFilter(name: "CIQRCodeGenerator") { filter.setValue(data, forKey: "inputMessage") filter.setValue("Q", forKey: "inputCorrectionLevel") let transform = CGAffineTransform(scaleX: 3, y: 3) if let output = filter.outputImage?.transformed(by: transform) { let scaleX = width / output.extent.size.width let scaleY = height / output.extent.size.height let transformedImage = output.transformed(by: CGAffineTransform(scaleX: scaleX, y: scaleY)) return UIImage(ciImage: transformedImage) } } return UIImage() }
In another app works correctly but in the app that I develop I get this error.
How can I solve this?The filter 'CIPortraitEffectSpillCorrection' is not implemented in the bundle at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreImage/PortraitFilters.cifilter