Search code examples
iosswiftxcodenfccore-nfc

XCode is missing "Near Field Communication Tag Reading" capability


I am trying to use the NFC capabilities with swift, and the apple docs say to enable the aforementioned "Near Field Communication Tag Reading" capability, but when I look in the capabilities menu, it is not there. Does anybody know what the issue is here? I believe I have a fairly recent version of xcode. I saw someone else say that it was because I needed to purchase the apple developer license, and so I did. Do I need to do something to get xcode to recognize that I have the developer license other than restart xcode?

Thanks


Solution

  • You need to add the capability in Xcode first. And Same capability you need to enable for the app bundle id in the Apple Developer portal -> Certificates, Identifiers & Profiles -> Identifiers - > Select your app -> Enable NFC Tag Reading -> Save.

    NFC Capability in Xcode

    Next, edit your app profile in the "Profiles" section and download the updated provisioning profile and install it. This will set up your NFC in Xcode.

    Note: If you have recently added an account in Xcode make sure you have development certificates installed in your system.

    Add NFC Reading capability in app in developer portal