@pagopa/io-react-native-iso18013 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
 
18
18
  # Module dependencies
19
19
  s.dependency "IOWalletCBOR", "0.2.1"
20
- s.dependency "IOWalletProximity", "1.4.1"
20
+ s.dependency "IOWalletProximity", "1.4.2"
21
21
 
22
22
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
23
23
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
@@ -386,6 +386,11 @@ class IoReactNativeIso18013Module(reactContext: ReactApplicationContext) :
386
386
  }
387
387
  }
388
388
 
389
+ @ReactMethod
390
+ fun setHceModalMessage(message: String) {
391
+ // Android does not support alert messages for NFC reading
392
+ }
393
+
389
394
  /**
390
395
  * Sets the proximity handler along with the possible dispatched events and their callbacks.
391
396
  * The events are then sent to React Native via `RCTEventEmitter`.
@@ -34,6 +34,8 @@ RCT_EXTERN_METHOD(generateOID4VPDeviceResponse: (NSString *)clientId
34
34
  withResolver: (RCTPromiseResolveBlock)resolve
35
35
  withRejecter: (RCTPromiseRejectBlock)reject)
36
36
 
37
+ RCT_EXTERN_METHOD(setHceModalMessage: (NSString)message)
38
+
37
39
  + (BOOL)requiresMainQueueSetup
38
40
  {
39
41
  return YES;
@@ -493,6 +493,20 @@ class IoReactNativeIso18013: RCTEventEmitter, ISO18013Delegate {
493
493
  }
494
494
  }
495
495
 
496
+ /**
497
+ Sets a custom message to be displayed in the NFC HCE modal during NFC engagement.
498
+
499
+ - Parameters:
500
+ - message: The custom message to be displayed in the NFC HCE modal.
501
+ */
502
+ @objc func setHceModalMessage(
503
+ _ message: String
504
+ ) {
505
+ if #available(iOS 17.4, *) {
506
+ ISO18013.shared.setNfcHceMessage(message: message)
507
+ }
508
+ }
509
+
496
510
  /**
497
511
  Custom Error which is thrown when a parsing error occurs in our utility functions which converts data from the bridge to what
498
512
  our underlying functions expect.
@@ -249,14 +249,14 @@ ISO18013_5.addListener(
249
249
 
250
250
  Starts the proximity flow with the specified engagement and retrieval modes. By default enables both QR code and NFC engagement with both BLE and NFC retrieval. NFC engagement requires iOS 17.4+ on iOS and HCE support on Android.
251
251
 
252
- | Parameter | Platform | Default | Description |
253
- | ------------------- | ----------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------- |
254
- | `peripheralMode` | Android | `true` | Whether the device is in peripheral mode |
255
- | `centralClientMode` | Android | `false` | Whether the device is in central client mode |
256
- | `clearBleCache` | Android | `true` | Whether the BLE cache should be cleared |
257
- | `certificates` | Android/iOS | `[]` | Two-dimensional array of base64 strings representing DER encoded X.509 certificates used to authenticate the verifier app |
258
- | `engagementModes` | Android/iOS | `['qrcode', 'nfc']` | Array of engagement modes to activate (`'qrcode'` and/or `'nfc'`) |
259
- | `retrievalMethods` | Android/iOS | `['ble', 'nfc']` | Array of supported retrieval methods (`'ble'` and/or `'nfc'`) |
252
+ | Parameter | Platform | Default | Description |
253
+ | ------------------- | ----------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------- |
254
+ | `peripheralMode` | Android | `true` | Whether the device is in peripheral mode |
255
+ | `centralClientMode` | Android | `false` | Whether the device is in central client mode |
256
+ | `clearBleCache` | Android | `true` | Whether the BLE cache should be cleared |
257
+ | `certificates` | Android/iOS | `[]` | Two-dimensional array of base64 strings representing DER encoded X.509 certificates used to authenticate the verifier app |
258
+ | `engagementModes` | Android/iOS | `['qrcode', 'nfc']` | Array of engagement modes to activate (`'qrcode'` and/or `'nfc'`) |
259
+ | `retrievalMethods` | Android/iOS | `['ble', 'nfc']` | Array of supported retrieval methods (`'ble'` and/or `'nfc'`) |
260
260
 
261
261
  ```typescript
262
262
  import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
@@ -339,6 +339,16 @@ import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
339
339
  await ISO18013_5.close();
340
340
  ```
341
341
 
342
+ #### `setHceModalMessage` (iOS Only)
343
+
344
+ Sets the message to display in the HCE system modal
345
+
346
+ ```typescript
347
+ import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
348
+
349
+ await ISO18013_5.setHceModalMessage('My custom message');
350
+ ```
351
+
342
352
  ## Proximity Sequence Diagram
343
353
 
344
354
  This section describes a high level overview of the happy flow interactions between an app implementing the `io-react-native-iso18013` library and a verifier app.
@@ -2,5 +2,5 @@
2
2
 
3
3
  export { parseVerifierRequest } from "./request.js";
4
4
  export { OnErrorPayloadSchema, ModuleErrorSchema } from "./error.js";
5
- export { ErrorCode, addListener, startEngagement, close, generateResponse, sendErrorResponse, sendResponse } from "./proximity.js";
5
+ export { ErrorCode, addListener, startEngagement, close, generateResponse, sendErrorResponse, sendResponse, setHceModalMessage } from "./proximity.js";
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["parseVerifierRequest","OnErrorPayloadSchema","ModuleErrorSchema","ErrorCode","addListener","startEngagement","close","generateResponse","sendErrorResponse","sendResponse"],"sourceRoot":"../../../../src","sources":["iso18013/iso18013-5/index.ts"],"mappings":";;AAAA,SAA+BA,oBAAoB,QAAQ,cAAW;AAEtE,SAEEC,oBAAoB,EACpBC,iBAAiB,QAGZ,YAAS;AAEhB,SACEC,SAAS,EAKTC,WAAW,EACXC,eAAe,EACfC,KAAK,EACLC,gBAAgB,EAChBC,iBAAiB,EACjBC,YAAY,QACP,gBAAa","ignoreList":[]}
1
+ {"version":3,"names":["parseVerifierRequest","OnErrorPayloadSchema","ModuleErrorSchema","ErrorCode","addListener","startEngagement","close","generateResponse","sendErrorResponse","sendResponse","setHceModalMessage"],"sourceRoot":"../../../../src","sources":["iso18013/iso18013-5/index.ts"],"mappings":";;AAAA,SAA+BA,oBAAoB,QAAQ,cAAW;AAEtE,SAEEC,oBAAoB,EACpBC,iBAAiB,QAGZ,YAAS;AAEhB,SACEC,SAAS,EAKTC,WAAW,EACXC,eAAe,EACfC,KAAK,EACLC,gBAAgB,EAChBC,iBAAiB,EACjBC,YAAY,EACZC,kBAAkB,QACb,gBAAa","ignoreList":[]}
@@ -124,4 +124,14 @@ export function sendResponse(response) {
124
124
  export function addListener(event, callback) {
125
125
  return eventEmitter.addListener(event, callback);
126
126
  }
127
+
128
+ /**
129
+ * **iOS only**
130
+ *
131
+ * Sets a custom message to be displayed in the NFC HCE modal during NFC engagement.
132
+ * @param message - The custom message to be displayed in the NFC HCE modal.
133
+ */
134
+ export function setHceModalMessage(message) {
135
+ IoReactNativeIso18013.setHceModalMessage(message);
136
+ }
127
137
  //# sourceMappingURL=proximity.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NativeEventEmitter","Platform","IoReactNativeIso18013","eventEmitter","ErrorCode","startEngagement","config","peripheralMode","centralClientMode","clearBleCache","certificates","engagementModes","retrievalMethods","OS","close","sendErrorResponse","code","generateResponse","documents","acceptedFields","sendResponse","response","addListener","event","callback"],"sourceRoot":"../../../../src","sources":["iso18013/iso18013-5/proximity.ts"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAC3D,SAASC,qBAAqB,QAAQ,aAAI;AAG1C,MAAMC,YAAY,GAAG,IAAIH,kBAAkB,CAACE,qBAAqB,CAAC;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAYE,SAAS,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAMrB;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAC7BC,MAOC,GAAG,CAAC,CAAC,EACY;EAClB,MA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,CAAC;AAClD","ignoreList":[]}
1
+ {"version":3,"names":["NativeEventEmitter","Platform","IoReactNativeIso18013","eventEmitter","ErrorCode","startEngagement","config","peripheralMode","centralClientMode","clearBleCache","certificates","engagementModes","retrievalMethods","OS","close","sendErrorResponse","code","generateResponse","documents","acceptedFields","sendResponse","response","addListener","event","callback","setHceModalMessage","message"],"sourceRoot":"../../../../src","sources":["iso18013/iso18013-5/proximity.ts"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAC3D,SAASC,qBAAqB,QAAQ,aAAI;AAG1C,MAAMC,YAAY,GAAG,IAAIH,kBAAkB,CAACE,qBAAqB,CAAC;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAYE,SAAS,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAMrB;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAC7BC,MAOC,GAAG,CAAC,CAAC,EACY;EAClB,MAAM;IACJC,cAAc,GAAG,IAAI;IACrBC,iBAAiB,GAAG,KAAK;IACzBC,aAAa,GAAG,IAAI;IACpBC,YAAY,GAAG,EAAE;IACjBC,eAAe,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC;IACnCC,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK;EAClC,CAAC,GAAGN,MAAM;EAEV,IAAIL,QAAQ,CAACY,EAAE,KAAK,KAAK,EAAE;IACzB,OAAOX,qBAAqB,CAACG,eAAe,CAC1CK,YAAY,EACZC,eAAe,EACfC,gBACF,CAAC;EACH,CAAC,MAAM;IACL,OAAOV,qBAAqB,CAACG,eAAe,CAC1CE,cAAc,EACdC,iBAAiB,EACjBC,aAAa,EACbC,YAAY,EACZC,eAAe,EACfC,gBACF,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,KAAKA,CAAA,EAAqB;EACxC,OAAOZ,qBAAqB,CAACY,KAAK,CAAC,CAAC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAACC,IAAe,EAAoB;EACnE,OAAOd,qBAAqB,CAACa,iBAAiB,CAACC,IAAI,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC9BC,SAAmC,EACnCC,cAA8B,EACb;EACjB,OAAOjB,qBAAqB,CAACe,gBAAgB,CAACC,SAAS,EAAEC,cAAc,CAAC;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAACC,QAAgB,EAAoB;EAC/D,OAAOnB,qBAAqB,CAACkB,YAAY,CAACC,QAAQ,CAAC;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CACzBC,KAAQ,EACRC,QAA0C,EAC1C;EACA,OAAOrB,YAAY,CAACmB,WAAW,CAACC,KAAK,EAAEC,QAAQ,CAAC;AAClD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACC,OAAe,EAAQ;EACxDxB,qBAAqB,CAACuB,kBAAkB,CAACC,OAAO,CAAC;AACnD","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  export { type VerifierRequest, parseVerifierRequest } from './request';
2
2
  export { type OnErrorPayload, OnErrorPayloadSchema, ModuleErrorSchema, type ModuleErrorCodes, type ModuleError, } from './error';
3
- export { ErrorCode, type Events, type EventsPayload, type EngagementMode, type RetrievalMethod, addListener, startEngagement, close, generateResponse, sendErrorResponse, sendResponse, } from './proximity';
3
+ export { ErrorCode, type Events, type EventsPayload, type EngagementMode, type RetrievalMethod, addListener, startEngagement, close, generateResponse, sendErrorResponse, sendResponse, setHceModalMessage, } from './proximity';
4
4
  export { type RequestedDocument, type AcceptedFields } from '../types';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-5/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEvE,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,SAAS,EACT,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,WAAW,EACX,eAAe,EACf,KAAK,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-5/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEvE,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,SAAS,EACT,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,WAAW,EACX,eAAe,EACf,KAAK,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC"}
@@ -111,4 +111,11 @@ export declare function sendResponse(response: string): Promise<boolean>;
111
111
  * @param callback - The callback to be called when the event is emitted. The callback will receive the event payload as an argument.
112
112
  */
113
113
  export declare function addListener<E extends Events>(event: E, callback: (data: EventsPayload[E]) => void): import("react-native").EmitterSubscription;
114
+ /**
115
+ * **iOS only**
116
+ *
117
+ * Sets a custom message to be displayed in the NFC HCE modal during NFC engagement.
118
+ * @param message - The custom message to be displayed in the NFC HCE modal.
119
+ */
120
+ export declare function setHceModalMessage(message: string): void;
114
121
  //# sourceMappingURL=proximity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"proximity.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-5/proximity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIlE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,cAAc,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,YAAY,EAAE,SAAS,CAAC;IACxB,YAAY,EAAE,SAAS,CAAC;IACxB,kBAAkB,EAAE,SAAS,CAAC;IAC9B,iBAAiB,EAAE,SAAS,CAAC;IAG7B,yBAAyB,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,eAAe,CAAA;KAAE,CAAC;IAC9E,oBAAoB,EAAE,SAAS,CAAC;IAChC,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC;AAEzC;;;;GAIG;AACH,oBAAY,SAAS;IACnB,kBAAkB,KAAK;IACvB,aAAa,KAAK;IAClB,kBAAkB,KAAK;CACxB;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GA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AExC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAEnE;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,EACnC,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC1C,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,8CAG3C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAExD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-react-native-iso18013",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "React Native bridge for iso18013 methods",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",
@@ -249,14 +249,14 @@ ISO18013_5.addListener(
249
249
 
250
250
  Starts the proximity flow with the specified engagement and retrieval modes. By default enables both QR code and NFC engagement with both BLE and NFC retrieval. NFC engagement requires iOS 17.4+ on iOS and HCE support on Android.
251
251
 
252
- | Parameter | Platform | Default | Description |
253
- | ------------------- | ----------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------- |
254
- | `peripheralMode` | Android | `true` | Whether the device is in peripheral mode |
255
- | `centralClientMode` | Android | `false` | Whether the device is in central client mode |
256
- | `clearBleCache` | Android | `true` | Whether the BLE cache should be cleared |
257
- | `certificates` | Android/iOS | `[]` | Two-dimensional array of base64 strings representing DER encoded X.509 certificates used to authenticate the verifier app |
258
- | `engagementModes` | Android/iOS | `['qrcode', 'nfc']` | Array of engagement modes to activate (`'qrcode'` and/or `'nfc'`) |
259
- | `retrievalMethods` | Android/iOS | `['ble', 'nfc']` | Array of supported retrieval methods (`'ble'` and/or `'nfc'`) |
252
+ | Parameter | Platform | Default | Description |
253
+ | ------------------- | ----------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------- |
254
+ | `peripheralMode` | Android | `true` | Whether the device is in peripheral mode |
255
+ | `centralClientMode` | Android | `false` | Whether the device is in central client mode |
256
+ | `clearBleCache` | Android | `true` | Whether the BLE cache should be cleared |
257
+ | `certificates` | Android/iOS | `[]` | Two-dimensional array of base64 strings representing DER encoded X.509 certificates used to authenticate the verifier app |
258
+ | `engagementModes` | Android/iOS | `['qrcode', 'nfc']` | Array of engagement modes to activate (`'qrcode'` and/or `'nfc'`) |
259
+ | `retrievalMethods` | Android/iOS | `['ble', 'nfc']` | Array of supported retrieval methods (`'ble'` and/or `'nfc'`) |
260
260
 
261
261
  ```typescript
262
262
  import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
@@ -339,6 +339,16 @@ import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
339
339
  await ISO18013_5.close();
340
340
  ```
341
341
 
342
+ #### `setHceModalMessage` (iOS Only)
343
+
344
+ Sets the message to display in the HCE system modal
345
+
346
+ ```typescript
347
+ import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
348
+
349
+ await ISO18013_5.setHceModalMessage('My custom message');
350
+ ```
351
+
342
352
  ## Proximity Sequence Diagram
343
353
 
344
354
  This section describes a high level overview of the happy flow interactions between an app implementing the `io-react-native-iso18013` library and a verifier app.
@@ -20,6 +20,7 @@ export {
20
20
  generateResponse,
21
21
  sendErrorResponse,
22
22
  sendResponse,
23
+ setHceModalMessage,
23
24
  } from './proximity';
24
25
 
25
26
  export { type RequestedDocument, type AcceptedFields } from '../types';
@@ -165,3 +165,13 @@ export function addListener<E extends Events>(
165
165
  ) {
166
166
  return eventEmitter.addListener(event, callback);
167
167
  }
168
+
169
+ /**
170
+ * **iOS only**
171
+ *
172
+ * Sets a custom message to be displayed in the NFC HCE modal during NFC engagement.
173
+ * @param message - The custom message to be displayed in the NFC HCE modal.
174
+ */
175
+ export function setHceModalMessage(message: string): void {
176
+ IoReactNativeIso18013.setHceModalMessage(message);
177
+ }