revtel / react-native-nfc-manager

React Native NFC module for Android & iOS
MIT License
1.38k stars 317 forks source link

Expo SDK 47 Asset validation failed Invalid entitlement for core nfc framework. #599

Closed dylanclements closed 1 year ago

dylanclements commented 1 year ago

Hi,

Im using an expo managed workflow and npx expo prebuild generates the following entitlements

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>aps-environment</key>
    <string>development</string>
    <key>com.apple.developer.nfc.readersession.formats</key>
    <array>
      <string>NDEF</string>
      <string>TAG</string>
    </array>
  </dict>
</plist>

which causes error on submit to app store

Error: Asset validation failed Invalid entitlement for core nfc framework. The sdk version '16.0' and min OS version '13.0' are not compatible for the entitlement 'com.apple.developer.nfc.readersession.formats' because 'NDEF is disallowed'. 

I fixed this by manually removing <string>NDEF</string> from entitlements, but Id like to be able to run prebuild in CI/CD so this is an inconvenience.

NFC works perfectly when ran in development client.

Setup

package.json

"expo": "~47.0.8",
"react-native-nfc-manager": "^3.14.1"

app.json

"plugins": ["react-native-nfc-manager"],

Thanks, any help would be much appreciated

Dev- commented 1 year ago

Why was this closed was it resolved or is no longer relevant for you because you removed NFC? I'm encountering the same issue.

dylanclements commented 1 year ago

Closed this issue because I opened a PR that included a workaround for this issue.