onfido-ios-sdk
onfido-ios-sdk copied to clipboard
Document Issuing Country always requested, even if already provided
What was the expected behaviour?
- Configure the Onfido SDK for a session
- Use a document which allows providing an issuing country (Identity card, Driver's license)
- If a document type and country is specified, Onfido should not ask the user for the issuing country again.
What happened instead?
- The Onfido SDK request issuing country right at the start of the flow
Version info:
- Cocoapods (if applicable): No Cocoapods. XCFramework used.
- Onfido SDK (Debug/Release): 25.1.0 (Release)
- iOS: 15.5
- Xcode: 13.4
- Device/Simulator: Simulator
- Device/Simulator language: English/USA
Integration configuration:
ONFlowConfigBuilder* configBuilder = [ONFlowConfig builder];
[configBuilder withSdkToken:@"valid token here" expireHandler:^(void (^ handler)(NSString * expireHandler))
{
// Token refresh code here
}];
Builder* faceVariantBuilder = [ONFaceStepVariantConfig builder];
[faceVariantBuilder withVideoCaptureWithConfig:NULL];
ONFaceStepVariantConfig* variantConfig = [faceVariantBuilder buildAndReturnError:&configError];
// variantConfig error handling here
[configBuilder withFaceStepOfVariant:variantConfig];
[configBuilder withCustomLocalizationWithTableName:@"Onfido"];
NSError* documentVariantError = nil;
ONDocumentTypeVariantConfig* documentVariantConfig = nil;
DocumentConfigBuilder* documentVariantBuilder = [ONDocumentTypeVariantConfig builder];
[documentVariantBuilder withNationalIdentityCardWithConfig:[[NationalIdentityConfiguration alloc] initWithDocumentFormat:DocumentFormatCard country:@"NLD"]];
documentVariantConfig = [documentVariantBuilder buildAndReturnError:&documentVariantError];
// documentVariantConfig error handling here
if(documentVariantConfig != nil)
{
[configBuilder withDocumentStepOfType:documentVariantConfig];
}
ONFlowConfig* config = [configBuilder buildAndReturnError:&configError];
if(configError == NULL)
{
ONFlow* onFlow = [[ONFlow alloc] initWithFlowConfiguration:config];
// Flow continues...
}
Steps to reproduce:
This happens with all document configurations where we can provide a country.