react-native-nfc-manager 3.14.1 → 3.14.2

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.
Files changed (2) hide show
  1. package/app.plugin.js +8 -4
  2. package/package.json +1 -1
package/app.plugin.js CHANGED
@@ -39,13 +39,17 @@ function addValuesToArray(obj, key, values) {
39
39
  return obj;
40
40
  }
41
41
 
42
- function withIosNfcEntitlement(c) {
42
+ function withIosNfcEntitlement(c, {includeNdefEntitlement}) {
43
43
  return withEntitlementsPlist(c, (config) => {
44
44
  // Add the required formats
45
+ let entitlements = ['NDEF', 'TAG']
46
+ if (includeNdefEntitlement === false) {
47
+ entitlements = ['TAG']
48
+ }
45
49
  config.modResults = addValuesToArray(
46
50
  config.modResults,
47
51
  'com.apple.developer.nfc.readersession.formats',
48
- ['NDEF', 'TAG'],
52
+ entitlements,
49
53
  );
50
54
 
51
55
  return config;
@@ -81,8 +85,8 @@ function withIosNfcSystemCodes(c, {systemCodes}) {
81
85
  }
82
86
 
83
87
  function withNfc(config, props = {}) {
84
- const {nfcPermission, selectIdentifiers, systemCodes} = props;
85
- config = withIosNfcEntitlement(config);
88
+ const {nfcPermission, selectIdentifiers, systemCodes, includeNdefEntitlement} = props;
89
+ config = withIosNfcEntitlement(config, {includeNdefEntitlement});
86
90
  config = withIosNfcSelectIdentifiers(config, {selectIdentifiers});
87
91
  config = withIosNfcSystemCodes(config, {systemCodes});
88
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nfc-manager",
3
- "version": "3.14.1",
3
+ "version": "3.14.2",
4
4
  "description": "A NFC module for react native.",
5
5
  "main": "src/index.js",
6
6
  "repository": {