简体   繁体   English

Flutter ios 上的 NFC 管理器问题

[英]Flutter NFC Manager issue on ios

I am using Flutter nfc_manager just for writing URLs on NFC Tags in android it's working perfectly.我正在使用 Flutter nfc_manager 只是为了在 android 中的 NFC 标签上编写 URL,它工作得很好。 But on IOS it's not written anything on a tag or not showing any error also.但是在 IOS 上,它没有在标签上写任何东西,也没有显示任何错误。

On their documentation for IOS setup, they are saying to do this在他们的 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.

I have done the first and second steps only.我只做了第一步和第二步。 Seems like the third step is only for reading tags which I don't want to use in my app.似乎第三步仅用于读取我不想在我的应用程序中使用的标签。 I need to add this third step Also how to add this I am using the NFC tag of Protocol: ISO14443A我需要添加这第三步还有如何添加我正在使用协议的 NFC 标签:ISO14443A

I have same issue in starting when i implement this first time so yes you need to add these 2 things in info.plist like this当我第一次实现这个时,我在开始时遇到了同样的问题,所以是的,你需要像这样在 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>

In this NFC tag of Protocol: ISO14443A will also work because i have also same tags and working fine.在这个协议的 NFC 标签中:ISO14443A 也可以工作,因为我也有相同的标签并且工作正常。

Edit: Also after save run pod install also.编辑:同样在保存运行 pod install 之后。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM