nfcim / flutter_nfc_kit

Flutter plugin to provide NFC functionality on Android and iOS, including reading metadata, read & write NDEF records, and transceive layer 3 & 4 data with NFC tags / cards
https://pub.dev/packages/flutter_nfc_kit
MIT License
200 stars 120 forks source link

Desktop Support #134

Closed marwenbk closed 4 months ago

marwenbk commented 10 months ago

Can you add support for windows ?

Harry-Chen commented 10 months ago

Thanks for your feature request. Windows has PC/SC APIs to read smartcards, and pcsc-lite provides similar APIs on many more UNIX-like systems. So it is possible to add support on desktop platforms, but we have no guarantee on it since all maintainers are quite busy.

marwenbk commented 10 months ago

@Harry-Chen thank you for your response. I will try to test it on as many platforms as i can. i would love to contribute to the creation but I need some guidance on how to get started hence I don't have background experience in low-level coding.

Harry-Chen commented 10 months ago

I have done some very initial work on the desktop branch. The core idea is that all platforms forward the call from MethodChannel (from Flutter) to a unified interface implemented by the pcsc-interface module, which then uses either pcsc-lite on Linux / macOS or native PCSC APIs on Windows.

Ideally the code in pcsc-interface should compile on all platforms, except for some compiler guards to handle some subtle differences.

dangfan commented 9 months ago

Hi @marwenbk , I just found a library here: https://github.com/jjanku/dart_pcsc . That may help.

dangfan commented 4 months ago

Hi @marwenbk, if you're looking for an implementation of CCID protocol on both mobile platforms and desktop platforms, try https://github.com/nfcim/ccid For now, we don't see a proper way to support desktop platforms as a smart card reading library.