When trying to submit my Expo iOS app via EAS Submit, I get the following error:
Asset validation failed Invalid entitlement for core nfc framework. The sdk version '17.4' and min OS version '13.4' are not compatible for the entitlement 'com.apple.developer.nfc.readersession.formats' because 'NDEF is disallowed'.
The error never changes
I have tried adding the following to my app.json
individually and together to no avail:
{
"expo": {
"ios": {
"entitlements": {
"com.apple.developer.nfc.readersession.formats": ["TAG"]
},
"infoPlist": {
"MinimumOSVersion": "14.0"
}
}
}
}
I've also realised that the MinimumOSVersion doens't seem to change the error message.
You need includeNdefEntitlement: false
in the config plugin options. Here's the config plugin code that uses this option:
Here's the description of the possible options in the Wiki:
Props
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 tofalse
, removes theNDEF
entitlement as a workaround to asset validation invalid entitlement bug.
i.e. instead of this in app.json
:
{
"expo": {
"ios": {
"entitlements": {
"com.apple.developer.nfc.readersession.formats": ["TAG"]
},
}
}
}
do this:
{
"expo": {
"plugins": [
[
"react-native-nfc-manager",
{
"includeNdefEntitlement": false
}
]
]
}
}
Example from the Wiki:
{
"expo": {
"plugins": [
[
"react-native-nfc-manager",
{
"nfcPermission": "Custom permission message",
"selectIdentifiers": ["A0000002471001"],
"systemCodes": ["8008"],
"includeNdefEntitlement": false,
}
]
]
}
}