Xcode Testflight Validate ERROR ITMS-90778 NDEF is disallowed
Asked Answered
G

4

22

I am trying to upload my app to TestFlight, which using CoreNFC (NDEF).

Unfortunately, I got the error message on Testflight Validate part in (SDK version 13 and 13.1).

I already tried this: Xcode 11 beta can't upload app to TestFlight

but it will Lose NDEF function this: https://mcmap.net/q/586936/-xcode-11-beta-can-39-t-upload-app-to-testflight

Error messages: Invalid entitlement for core nfc framework The sdk version 13.0 and min OS version 13.0 are not compatible for the entitlement 'com. Apple developer nfc. Readersession formats because NDEF is disallowed
enter image description here

Girardi answered 27/9, 2019 at 9:6 Comment(0)
R
42

The following worked for me.

  1. Go to your application entitlement file (Which will be mostly .entitlement if you don´t have any environmental setup or changes done to entitlement file name)
  2. Remove all entitlement for NFC other than "NFC tag-specific data protocol" enter image description here

  3. Finally your entitlement file should have something like this

	<key>com.apple.developer.nfc.readersession.formats</key>
	<array>
		<string>TAG</string>
	</array>
enter image description here
  1. Clean your project and then try uploading to app store again.

Hope it helps :)

Rework answered 17/4, 2020 at 7:10 Comment(3)
Does this affect the ability to read NDEF messages on NFC Tags? I ask because doing so actually allowed me to successfully upload to the App Store, but now I'm scared the app won't behave as I have tested during development (specifically, I use the readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) NFCNDEFReaderSessionDelegate method, which is pretty explicit in mentioning NDEF...)Lavella
I have tested application on my end, It is working fine both in development & in production/ app store build. Suggestion: Please test your build in TestFlight to check if every case is working as expected & then publish to app store.Rework
This worked for me, thanks.Epos
K
17

I have solved the for iOS 13 TAG entitlment and NDEF is disallowed by:

  1. Remove remove "NFC Data Exchange Format" row from the Entitlement. Entitles
  2. Add to the info.plist "ISO7816 application identifiers for NFC Tag Reader Session" and the value for item 0 is should be "com.apple.developer.nfc.readersession.iso7816.select-identifiers"

Attached are a few pictures.

info.plist

Kingsbury answered 28/9, 2019 at 12:17 Comment(4)
I tried once to remove the NDEF before the function will affect the nfc. #57531104 But the magic is when I try the second time, NFC function is work, I don't know why it doesn't affect the nfc function...Girardi
Check the Entitlement and make sure.Kingsbury
Where is this mentioned anywhere in Apple's CoreNFC documentation? Solution is good I'm just annoyed that Apple would casually not mention any of this in their sample code.Inshore
I can confirm my solution works, even after 3 year I don't remember. Thank you past me. How I come to the solution I have no idea. Some deep forum or documentation from the past. Thank you Apple.Kingsbury
M
11

Ok after lots of fooling around, this worked for me (my use case is that i'm scanning NDEF tags):

And yes this is counterintuitive, but the sad fact is: If you want to scan NDEF tags, you MUST remove the 'NDEF' from the entitlements (this may be an apple bug that is resolved later, this is accurate as of Xcode 12.5)

  • Remove NDEF from the .entitlements file, so it only contains the following:

      <?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>com.apple.developer.nfc.readersession.formats</key>
          <array>
              <string>TAG</string>
          </array>
      </dict>
      </plist>
    
  • Add the following to the info.plist:

      <key>NFCReaderUsageDescription</key>
      <string>This app would like to use NFC for some reason.</string>
    
  • No need to add "ISO7816 application identifiers for NFC Tag Reader Session" to the info.plist

  • Read the NDEF tag using code like this:

      session = NFCNDEFReaderSession(delegate: self, queue: .main, invalidateAfterFirstRead: true)
      session?.alertMessage = "Please hold your tag up against the the rear side of your iPhone, next to the camera."
      session?.begin()
    
Muse answered 20/5, 2021 at 0:28 Comment(0)
A
2

my two cents about.

1) workaround of Josean works

2) my app fails the first time, I can confirm this weird behaviour as CH Wing wrote

3) some hints in "https://forums.developer.apple.com/thread/117329"

4) I added these keys to plist and seems working, not to entitlements. (but at apple dev forum seems it's the way... in PLIST..)

Apo answered 26/12, 2019 at 7:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.