revtel / react-native-nfc-manager

React Native NFC module for Android & iOS
MIT License
1.32k stars 312 forks source link

NDEF is missing in the entitlement #684

Closed koreymadden closed 7 months ago

koreymadden commented 7 months ago

I am trying to create a TestFlight build for iOS and I cannot figure out how to fix the issue. The error it keeps giving me is...

Invalid entitlement for core nfc framework. The sdk version '17.0' and min OS version '12.4' are not compatible for the entitlement 'com.apple.developer.nfc.readersession.formats' because 'NDEF is missing in the entitlement'. (ID: 91c246c9-77a9-488b-86ed-39033fdfcccb)

This is my entitlement file below. I have also tried adding <string>NDEF</string> above <string>TAG</string> in the same array but got the same error message.

I have the capability added for my project on the developer.apple.com site and in the Xcode project. Also, I am using React Native CLI.

<?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.networking.HotspotConfiguration</key>
    <true/>
    <key>com.apple.developer.networking.wifi-info</key>
    <true/>
    <key>com.apple.developer.nfc.readersession.formats</key>
    <array>
        <string>TAG</string>
    </array>
</dict>
</plist>

This is why I have in my Info.plist

<key>NFCReaderUsageDescription</key>
<string>Allow NFC to be used to read information on your Company device.</string>

Any ideas would be appreciated!

koreymadden commented 7 months ago

I realized I had two .entitlement files. One was ProjectName.entitlements and one was ProjectNameRelease.entitlements. I then added the <string>NDEF</string> element to both files and it worked.