BETA NFC Scan - Integration & Usage Guide
[BETA] NFC Scan - Integration & Usage Guide
Prerequisites
- IncdOnboarding variant including "-nfc", eg. version "5.33.0-s-nfc".
Integration
-
Turn on Near Field Communication Tag Reading under the Capabilities tab for the project’s target. This step:
- Adds the NFC tag-reading feature to the App ID.
- Adds the Near Field Communication Tag Reader Session Formats Entitlement to the entitlements file.
-
Add the
NFCReaderUsageDescription
key as a string item to theInfo.plist
file. For the value, enter a string that describes the reason the app needs access to the device’s NFC reader. If the app attempts to read a tag without providing this key and string, the app will crash. -
Add interface for interacting with an ISO 7816 tag to App's
Info.plist
:
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
<string>A0000002472001</string>
<string>00000000000000</string>
</array>
- If integrating through Cocoapods then no further actions are required.
- If manually integrating:
Add
OpenSSL.xcframework
to your project (should be Embedded & signed). In build settings for keyLD_RUNPATH_SEARCH_PATHS
add path@executable_path/Frameworks
.
Usage
To add NFC Scan module to the flow, simply:
- Add it to a
IncdOnboardingFlowConfiguration
:
flowConfig.addNfcScan(showNFCSymbolConfirmationScreen: true/false, processNFCData: true/false)
- Add callback to your
IncdOnboardingDelegate
:
func onNFCScanCompleted(_ result: NFCScanResult) {
// process result
}
Parameters for addNfcScan()
:
addNfcScan()
:showNFCSymbolConfirmationScreen
: Show Is NFC Available screen. Default istrue
.showInitialDataConfirmationScreen
: Show edit OCR screen at beginning of module. Default istrue
.processNFCData
: A Boolean value that indicates whether to proces NFC data on backend or not. Default istrue
.
Returning result of the module is a 'NFCScanResult' struct which contains:
facePhoto
: A face photo extracted from NFC chip.dg1
: DG1 data extracted from NFC chip.error
: An NFC Scan error.nil
means there were no errors.
Possible values for NFCScanError
:
NFCScanError
:error(_ error: IncdError)
: The associated value contains the specificIncdError
case.notAvailable
: NFC scan is not available.userDocumentHasNoChip
: User selected NO for NFC chip availability.noScanAttemptsRemaining
: User has used all NFC scan attempts without success.
License
Copyright 2025 Incode Technologies. All rights reserved.
Updated 18 days ago