onfido-ios-sdk
onfido-ios-sdk copied to clipboard
Onfido 25.0.0 not working with simulator
What was the expected behaviour?
Should be able to go through Onfido flow on simulator.
What happened instead?
Stuck on document upload step.
Version info:
- Cocoapods (if applicable):
- Onfido SDK (Debug/Release): Debug
- iOS: 15.5
- Xcode: 13.4
- Device/Simulator: Simulator iPhone13
- Device/Simulator language: En
Integration configuration:
let config = try OnfidoConfig.builder() .withSDKToken(token) .withCustomLocalization() .withAppearance(appearance) .withWelcomeStep() .withDocumentStep(ofType: .drivingLicence(config: DrivingLicenceConfiguration(documentFormat: .card))) .withFaceStep(ofVariant: .video(withConfiguration: nil)) .build()
let onfidoFlow = OnfidoFlow(withConfiguration: config).with(responseHandler: { onfidoResponse in
switch onfidoResponse {
case .cancel:
seal.reject(OnfidoError.cancelled)
case .success(let results):
seal.fulfill(results)
case .error(let error):
seal.reject(error)
@unknown default:
seal.reject(OnfidoError.unknown)
}
})
let viewController = try onfidoFlow.run()
viewController.modalPresentationStyle = .fullScreen
navigationController.present(viewController, animated: true)
Steps to reproduce:
Just a simple Onfido integration that actually works on device and with previous version (18) it was working just fine on simulator. With this release we are not able to go through process flow on simulator. It stops on document upload step. As an error responseHandler returns an error (OnfidoFlowError) ▿ upload : OnfidoApiError { id = NULL, type = validation_error, message = There was a validation error on this request, fields = {"file":["has contents that are not what they are reported to be"]} } - id : nil - type : "validation_error" - message : "There was a validation error on this request" ▿ fields : Optional<String> - some : "{"file":["has contents that are not what they are reported to be"]}"