Import the YesidOCRFramework:
In your project's Swift file where you want to use the YesidOCRCamera library, add the following import statement:`
import YesidOCRFramework
Instantiate and present the OCRCameraUI view:
Configure the SDK by passing the license or any other configuration params
@main
struct iOSApp: App {
@State var cameraLensFacing: AVCaptureDevice.Position = .back
let configuration: OCRConfigurationBuilder = OCRConfigurationBuilder().setUserLicense(userLicense: "YOUR_LICENSE")
var body: some Scene {
WindowGroup {
OCRCameraUI(configurationBuilder: self.ocrConfigurationBuilder, cameraLensFacing: self.$cameraLensFacing, onResults: {
response in
print(response)
}
})
}
}
}