简体   繁体   中英

nfc_manager isAvailable returns false iOS

I followed this tutorial https://medium.com/flutter-community/nfc-with-flutter-f8c3515cb0e0 and still got false when calling NfcManager.instance.isAvailable , what am I doing wrong?

updated capability in xcode 在此处输入图像描述

updated profile in https://developer.apple.com/account在此处输入图像描述

set NFCReaderUsageDescription in info.plst 在此处输入图像描述

I also synced my provisining profile as described here Xcode 8.3 / Xcode 9.0 Refresh provisioning profile devices . Does anybody have an idea what I did wrong. I'm trying it on a iPhone 13 mini.

I managed to solve the issue… add this to your.entitlements file

<key>com.apple.developer.nfc.readersession.formats</key>
    <array>
        <string>TAG</string>
    </array>

and assign the right .entitlements file to your code signing entitlements file (runner -> Build Settings)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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