NFC
weswecan
NativePHP^3iOS13.0+Android24+
Read and write NFC tags on iOS and Android from NativePHP Mobile.
Features
- Read and write NFC tags on both platforms
- Supported data types: URLs, plain text, vCard contacts, JSON/MIME data, Android Application Records
- Tag hardware information access (capacity, writable status, technologies)
- Continuous scanning with session persistence
- WiFi configuration writing
- Tag erasure capability
- Platform-aware session options
- Typed events with comprehensive error handling
Installation
composer require weswecan/nfc
php artisan native:plugin:register weswecan/nfc
Compatibility
| Platform | Minimum Version |
|---|---|
| NativePHP | ^3 |
| iOS | 13.0+ |
| Android | API 24+ |
Events
NfcTagRead— tag read with hardware infoNfcUrlWritten— URL write completionNfcTextWritten— text write completionNfcTagErased— tag erasure confirmationNfcError— error occurrencesNfcCancelled— session cancellation (iOS only)