Skip to main content

NFC Capture on iOS

Native iOS SDK has different ways to start NFC Capture, but on the native Android you can only start with some fields that can found on the MRZ of the ID.

Get the NFC module from the AmaniSDK class after you called the initAmani method with correct parameters. See usage

Note: You can only run NFC capture on iOS 13.0 or later. If you want to compile your app for devices that runs iOS version before 13.0 check out this section.

final _nfcModule = AmaniSDK().iOSNFC();

Starting with image of the back of the ID.

OutlinedButton(
onPressed: () {
_idCapture.start(IdSide.back).then((imageData) {
_nfcCapture
.startWithImageData(imageData)
.then((isDone) => setState(() {
_isCompleted = isDone;
}));
});
},
child: const Text("Image Data Start")
)

If you want to use the NFC data as NFC Document, use this module. If you want to Anything related to IDCapture, including the NFC data must be called from the id capture.

OutlinedButton(
onPressed: () {
// Does the same thing as above,
_nfcCapture.startWithMRZCapture().then((isCompleted) {
setState(() {
_isCompleted = isCompleted;
});
});
},
child: const Text("MRZ Capture Start")
)

You can also start this module with some data on the id itself.

OutlinedButton(
onPressed: () {
_nfcCapture.startWithMRZCapture().then((isCompleted) {
setState(() {
_isCompleted = isCompleted;
});
});
},
child: const Text("MRZ Capture Start")
)

Note type of image data is Uint8List.