ios - iOS 上的 Flutter NFC Manager 问题

标签 ios xcode flutter nfc

我使用 Flutter nfc_manager 只是为了在 android 中的 NFC 标签上编写 URL,它工作得很好。但在 IOS 上,它没有在标签上写任何东西,也没有显示任何错误。

在他们的 IOS 设置文档中,他们说要这样做

Add Near Field Communication Tag Reader Session Formats Entitlements to your entitlements.

Add NFCReaderUsageDescription to your Info.plist.

Add com.apple.developer.nfc.readersession.felica.systemcodes and com.apple.developer.nfc.readersession.iso7816.select-identifiers to your Info.plist as needed.

我只做了第一步和第二步。似乎第三步仅用于读取我不想在我的应用程序中使用的标签。我需要添加这第三步还有如何添加我正在使用协议(protocol)的 NFC 标签:ISO14443A

最佳答案

当我第一次实现这个时,我在开始时遇到了同样的问题,所以是的,你需要像这样在 info.plist 中添加这两件事

    <key>NFCReaderUsageDescription</key>
    <string>Allow access to Create Sticker</string>
    <key>com.apple.developer.nfc.readersession.felica.systemcodes</key>
     <array>
       <string>8005</string>
       <string>8008</string>
       <string>0003</string>
       <string>fe00</string>
       <string>90b7</string>
       <string>927a</string>
       <string>86a7</string>
     </array>
    <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
    <array>
        <string>A0000002471001</string>
        <string>A000000003101001</string>
        <string>A000000003101002</string>
        <string>A0000000041010</string>
        <string>A0000000042010</string>
        <string>A0000000044010</string>
        <string>44464D46412E44466172653234313031</string>
        <string>D2760000850100</string>
        <string>D2760000850101</string>
        <string>00000000000000</string>
    </array>

在这个协议(protocol)的 NFC 标签中:ISO14443A 也可以工作,因为我也有相同的标签并且工作正常。

编辑:保存后还运行 pod install。

关于ios - iOS 上的 Flutter NFC Manager 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68851357/

相关文章:

ios - 在 UITextView 中定位 UILabel

ios - 如何启用移动但禁用删除 UITableView 中的某些行

ios - 如何在 Swift 中使用 addAttribute

xcode - 在 Apple Watch 上测试您的应用程序时如何解决 Xcode 中的此错误

iphone - 有没有办法在 iOS 中为 float 添加逗号,或者至少将其显示为货币?

ios - Xcode 在暂停时不再在调试器导航器中按线程显示堆栈跟踪

dart - 包含固定 ListView 的 ListView

android-studio - 解释 Android Studio 控制台输出格式以及如何配置以在每一行中显示日期/时间?

ios - 无法在 iTunes Connect 上创建初始应用内购买,因为产品类型列表为空

flutter - Avast 和 AVG 在我的应用程序中报告了病毒 - Android : Evo-gen [Trj]