1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] iOS Flutter NFC: "The connection to service named com.apple.nfcd.service.corenfc was...

Discussão em 'Mobile' iniciado por Stack, Novembro 8, 2024 às 11:02.

  1. Stack

    Stack Membro Participativo

    I already created flutter NFC feature using nfc manager package and runs smoothly on Android, but when I try to run it on iOS device I keep getting the error below:


    [NFCHardwareManager areFeaturesSupported:eek:utError:]:358 XPC Error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.nfcd.service.corenfc was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.nfcd.service.corenfc was invalidated: failed at lookup with error 159 - Sandbox restriction.

    I already implemented the iOS setup & permission based on the NFC manager documentation but I still cannot trigger the NFC.

    1. AddNear Field Communication Tag Reader Session Formats Entitlements to my entitlements.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>com.apple.developer.nfc.readersession.formats</key>
    <array>
    <string>TAG</string>
    </array>
    </dict>
    </plist>

    1. Add NFCReaderUsageDescription, com.apple.developer.nfc.readersession.felica.systemcodes and com.apple.developer.nfc.readersession.iso7816.select-identifiers to my Info.plist.

    <key>NFCReaderUsageDescription</key>
    <string>Our app use nfc usage to scan the nfc card to record the driver attendance. These can be configured in Settings.</string>
    <key>com.apple.developer.nfc.readersession.felica.systemcodes</key>
    <key>com.apple.developer.nfc.readersession.ios7816.select-identifiers</key>


    Does anyone know how to set it up correctly?

    Continue reading...

Compartilhe esta Página