【问题标题】:How to find "NFC Tag Identifier" in iOS如何在 iOS 中找到“NFC 标签标识符”
【发布时间】:2019-07-03 12:24:10
【问题描述】:

我正在使用“CoreNFC”框架来检测 NFC 标签 在这里,我面临与识别“NFC Tag Identifier”相关的问题

在安卓系统中, 可以通过以下方式访问它:

/**
     * Optional extra containing a byte array containing the ID of the discovered tag for
     * the {@link #ACTION_NDEF_DISCOVERED}, {@link #ACTION_TECH_DISCOVERED}, and
     * {@link #ACTION_TAG_DISCOVERED} intents.
     */
    public static final String EXTRA_ID = "android.nfc.extra.ID";

我们在 iOS 中有没有类似的方式?

【问题讨论】:

标签: ios swift nfc core-nfc


【解决方案1】:

这取决于什么类型的标签。对于 iOS 上的原生标签读取(ISO15693、NFCMiFareTag、NFCISO7816Tag 等),您可以将检测到的标签转换为可以获取标识符的适当模型对象。

这些资源有助于: https://swifting.io/blog/2019/07/11/53-first-steps-with-nfc-on-ios-13/ https://developer.apple.com/documentation/corenfc/nfciso15693tag?language=objc

【讨论】:

  • 如何获取这个检测到的标签? NDEF 委托仅提供 NDEF 消息。
  • 您可以使用 NFCTagReaderSession。我提供的第一个链接将对您有所帮助。
  • 我在 Xamarin 平台上使用INFCTagReaderSessionDelegateand 接口女巫没有DidDetectTags 回调。但后来我注意到还有具体的类实现NFCTagReaderSessionDelegate。现在一切都很好。 Tnx!
  • 链接已失效
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-03-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多