-
Notifications
You must be signed in to change notification settings - Fork 316
Expo Go
Javier HM edited this page Mar 15, 2023
·
1 revision
This package cannot be used in the "Expo Go" app because it requires custom native code.
After installing this npm package, add the config plugin to the plugins
array of your app.json
or app.config.js
:
{
"expo": {
"plugins": ["react-native-nfc-manager"]
}
}
Next, rebuild your app as described in the "Adding custom native code" guide.
Notice: This Config Plugin will ensure the minimum Android SDK version is 31.
The plugin provides props for extra customization. Every time you change the props or plugins, you'll need to rebuild (and prebuild
) the native app. If no extra properties are added, defaults will be used.
-
nfcPermission
(string | false): Sets the iOSNFCReaderUsageDescription
permission message to theInfo.plist
. Settingfalse
will skip adding the permission. Defaults toAllow $(PRODUCT_NAME) to interact with nearby NFC devices
(Info.plist). -
selectIdentifiers
(string[]): Sets the iOScom.apple.developer.nfc.readersession.iso7816.select-identifiers
to a list of supported application IDs (Info.plist). -
systemCodes
(string[]): Sets the iOScom.apple.developer.nfc.readersession.felica.systemcodes
to a user provided list of FeliCa™ system codes that the app supports (Info.plist). Each system code must be a discrete value. The wild card value (0xFF
) isn't allowed. -
includeNdefEntitlement
(true | false): When explicitly set to false, removes the NDEF entitlement as a workaround to asset validation invalid entitlement bug.
{
"expo": {
"plugins": [
[
"react-native-nfc-manager",
{
"nfcPermission": "Custom permission message",
"selectIdentifiers": ["A0000002471001"],
"systemCodes": ["8008"],
"includeNdefEntitlement": false,
}
]
]
}
}