Mobbeel for developers

Mobbeel for developers

  • MobbScan
  • MobbID
  • MobbSign
  • Clients
  • FAQ

›Getting Started

MobbScan iOS

  • Welcome to the MobbScan SDK
  • SDK size

Configure SDK

  • Configure the iOS SDK

Migration Guides

  • Migration to 2.26.0
  • Migration to 2.19.0
  • Migration to 2.18.0
  • Migration to 2.17.0
  • Migration to 2.16.0

Getting Started

  • Initalize API
  • Scanning a document with MobbScan
  • Performing Face Matching
  • Adding a video step
  • Record a video while user scans the document
  • Getting the verification result
  • Scanning documents with NFC
  • Detect and scan MRZ
  • Detect and scan a PDF417
  • Add fields to validations in agent portal
  • Error Handling

Additional Configuration

  • MobbScan Configuration

Customization

  • Customize Detection Views
  • Customize Feedback Messages
  • Customize Unattended Process

Reference

  • Changelog

Scanning documents with NFC

Overview

We allow you to get all the information contained on a Spanish ID card v3 or Passport by scanning a NFC chip in case of being available. NFC is a 100% reliable data source and only a few configuration steps are required to get it done.

Compatibility

An iPhone 7 or newer is required for NFC reading.

Setup configuration

Before starting the development you will need to follow these steps:

  1. Add MobbScan_NFC_Plugin.xcframework to your project:

This is a dynamic framework and must be added as an Embeded framework

  1. You must add NFC capability ti your project. For doing this, you must go to Signing and Capabilities tag section, click on +Capability and select Near Field Communication Tag Reading. It should look like this:

  2. Finally you have to add two keys to your Info.plist file. The first one is NFCReaderUsageDescription. Under this key you must provide a description of why you are using NFC capability.

    The other key is com.apple.developer.nfc.readersession.iso7816.select-identifiers. Under this key you must provide an array of which Aplication Identifier (AID) you are using in your app. For instance, European Passports use A0000002471001 and the Spanish ID card v3 uses D4100000030001. An example of these keys would be this:

<key>NFCReaderUsageDescription</key>
    <string>NFC capability is used to read NDEF messages from id cards into the application</string>

<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
    <array>
        <string>A0000002471001</string>
        <string>D4100000030001</string>
    </array>

NFC scanning process

To start the NFC scanning process you should previously launch the startScan method in order to get the scanId.

Swift
ObjectiveC
self.mobbScanAPI.startScan(for: ._ESPIDCard, for: .SCAN_BOTH_SIDES, withResult: { result, scanId, error in
// Your block code here
})
[self.mobbscanAPI startScanForDocumentType:MobbScanDocumentType_ESPIDCard
forMode:MobbScanOperationMode_SCAN_BOTH_SIDES
withResult:^(MobbScanStartScanResult result, NSString* scanId, NSError* error) {
// Your block code here
}];

To continue, you must configure and initialize the NFC reader:

Swift
ObjectiveC
var nfcDocumentReader = NfcDocumentReader.getInstance()
let extractsFace = true

nfcDocumentReader.configureNFCExtractFace(extractsFace, scanId: "THE_SCANID_OF_THE_PROCESS", onNfcDocumentReaderFinish: { (data,error) in
// Your block code here
} ,onNfcEvent:{ (event) in
// Your block code here
})
NfcDocumentReader *nfcDocumentReader = [NfcDocumentReader getInstance];
BOOL extractsFace = YES;
[nfcDocumentReader configureNFCExtractFace:extractsFace
scanId:"THE_SCANID_OF_THE_PROCESS"
onNfcDocumentReaderFinish:^(MobbScanScanResultData *resultData, NSError *error) {
// Your block code here
} onNfcEvent:^(NFCEvent event) {
// Your block code here
}];

The method named configureService receives four parameters:

  • A flag that indicates if you want to extract the image face of the document. If you don't, the process gets faster.
  • The scanId that identies the process.
  • A result block.
  • An NFCEvent block.

The blocks ares used to notify the user of the progress of the scan process. The are described on blocks section.

After that, you have to indicate to the reader that it should start. To do this, you have to call the method readDocumentNFC.

This method receives three parameters, the document number, the date of birth and the date of expiry. This method starts the nfc reader to read both documents, the Spanish ID card v3 and the Passport.

Swift
ObjectiveC
nfcDocumentReader.readDocumentNFC(withDocumentNumber: documentNumber, dateOfBirth: dateOfBirth, dateOfExpiry: dateOfExpiry)
[nfcDocumentReader readDocumentNFCWithDocumentNumber:documentNumber dateOfBirth:dateOfBirth dateOfExpiry:dateOfExpiry];

Blocks

Due to the scanning process could be long and confusing to the final user, the onNfcEvent block is used to notify the developer about the state of scanning. You can receive either of this values:

typedef NS_ENUM(NSInteger, NFCEvent)
{
    CONFIGURING_SERVICE = 0,
    AUTHENTICATING = 1,
    READING_DATA = 2 ,
    READING_IMAGE = 3
};

Once we have finished to read the NFC content, we can manage the process with onNfcDocumentReaderFinish block (both for success and failure results). You will receive NFC data on this block in a resultData object as with every MobbScan scanning process.

Tip: You can see a clearer example in the app code provided with the SDK.

← Getting the verification resultDetect and scan MRZ →
  • Overview
  • Compatibility
  • Setup configuration
  • NFC scanning process
    • Blocks
Mobbeel for developers
Product Documentation
MobbIDMobbScanMobbSign
Connect
LinkedInFacebookX
More
FAQContact Us
Mobbeel Solutions SL
Copyright © 2025 Mobbeel Solutions SL