Skip to content

Commit

Permalink
Create v4.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
okadan committed Oct 14, 2023
1 parent 7a5daa6 commit ca249d5
Show file tree
Hide file tree
Showing 99 changed files with 11,881 additions and 4,220 deletions.
18 changes: 9 additions & 9 deletions .metadata
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
channel: stable
revision: "367f9ea16bfae1ca451b9cc27c1366870b187ae2"
channel: "stable"

project_type: plugin

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
- platform: android
create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
- platform: ios
create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2

# User provided section

Expand Down
185 changes: 1 addition & 184 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,184 +1 @@
# 3.2.0

* Fix build issues

# 3.1.1

* Upgrade kotlin version.

# 3.1.0

* Fix Null-Safety related issues. The following properties are now nullable.

* `IsoDep#hiLayerResponse`
* `IsoDep#historicalBytes`
* `Iso7816#historicalBytes`
* `Iso7816#applicationData`
* `MiFare#historicalBytes`

# 3.0.0+2

* Update doc.

# 3.0.0+1

* Flutter format.

# 3.0.0

* Upgrade to null safety.

# 2.0.3

* Fix type conversion errors in `FeliCa#readWithoutEncryption` and `FeliCa#requestServiceV2`.

# 2.0.2

* Fix a bug in calling `FeliCa.sendFeliCaCommand` method.

# 2.0.1+1

* Update README.

# 2.0.1

* Fix an error when initializing plugin for non-NFC Android devices.

# 2.0.0+2

* Update doc.
* Flutter format.

# 2.0.0+1

* Update doc.

# 2.0.0

**Has many breaking changes.**

* Remove `startNdefSession` and `NdefDiscoveredCallback`.
* Rename `startTagSession` to `startSession`.
* Rename `TagPollingOption` to `NfcPollingOption`.
* Rename `NfcSessionError` to `NfcError`.
* Rename `NfcSessionErrorType` to `NfcErrorType`.
* Rename `TagDiscoveredCallback` to `NfcTagCallback`.
* Rename `NfcSessionErrorCallback` to `NfcErrorCallback`.
* Rename `ISO15693` to `Iso15693`.
* Rename `ISO7816` to `Iso7816`.
* Rename `fromTag` to `from`. (e.g. `MiFare.fromTag(tag)` -> `MiFare.from(tag)`)
* Add `NdefTypeNameFormat` enum.
* Add `NdefFormatable`, `MifareClassic` and `MifareUltralight` classes.
* Add `Ndef#read` method.
* Add command-implementations for `FeliCa` and `Iso15693`.
* Upgrade flutter environment.

# 1.3.2+4

* Update README.

# 1.3.2+3

* Update README.

# 1.3.2+2

* Update README.

# 1.3.2+1

* Update README.

# 1.3.2

* Fix crash on Ndef write and writeLock error.

# 1.3.1

* Fix a bug where the error callback was not called.

# 1.3.0

* Add callback to handle error from session.

# 1.2.0

* Make discovered callback async.

# 1.1.0+1

* Update readme.

# 1.1.0

* Add constants.
* Fix misspelled name.
* Fix xcode build warning.
* Increase the Flutter SDK requirement to ^1.10.0.

# 1.0.1

* Fix error on invoking transceive method.

# 1.0.0

* Add platform-specifc-tag operations.
* Remove `NfcSessionType` enum.
* Migrate to pubspec platforms manifest.
* More consistent naming.

# 0.5.1

* Update flutter project files.
* Additional fix for migration to AndroidX.

# 0.5.0

* Migrate to AndroidX.

# 0.4.0+2

* Fix typo on README

# 0.4.0+1

* Update README

# 0.4.0

* Rename `NfcNdef#cachedNdef` to `NfcNdef#cachedMessage`.
* Add `NfcSessionType` enum.
* Add `NfcTagPollingOption` enum.

# 0.3.0

* Add `NdefRecord#createMimeRecord`.
* Add optional parameters `alertMessageIOS` and `errorMessageIOS` displayed in iOS system UI.
* Fix error on deserializing null message on dart side.

# 0.2.0

* Split `startSession` into `startNdefSession` and `startTagSession`.
* Improve doc.

# 0.1.1

* Fix crash on serializing nil message on ios side.
* Add example project.
* Improve doc.

# 0.1.0+2

* Improve doc.

# 0.1.0+1

* Improve doc.

# 0.1.0

* Add iOS 13 features.

# 0.0.1

* Initial release.
## 4.0.0-dev
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Naoki Okada
Copyright (c) 2019 okadan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
83 changes: 50 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# nfc_manager

Flutter plugin for accessing the NFC features on Android and iOS.
A Flutter plugin for accessing the NFC features on Android and iOS.

Note: This plugin depends on `NFCTagReaderSession` (requires iOS 13.0 or later) and `NfcAdapter#enableReaderMode` (requires Android API level 19 or later).
## Requirements

Android SDK Version >= 19 or iOS >= 13.0.

## Setup

Expand All @@ -16,60 +18,75 @@ Note: This plugin depends on `NFCTagReaderSession` (requires iOS 13.0 or later)

* Add [NFCReaderUsageDescription](https://developer.apple.com/documentation/bundleresources/information_property_list/nfcreaderusagedescription) to your `Info.plist`.

* Add [com.apple.developer.nfc.readersession.felica.systemcodes](https://developer.apple.com/documentation/bundleresources/information_property_list/systemcodes) and [com.apple.developer.nfc.readersession.iso7816.select-identifiers](https://developer.apple.com/documentation/bundleresources/information_property_list/select-identifiers) to your `Info.plist` as needed.
* Add [com.apple.developer.nfc.readersession.iso7816.select-identifiers](https://developer.apple.com/documentation/bundleresources/information_property_list/select-identifiers) to your `Info.plist`. (Optional)

## Usage
* Add [com.apple.developer.nfc.readersession.felica.systemcodes](https://developer.apple.com/documentation/bundleresources/information_property_list/systemcodes) to your `Info.plist`. (Optional but required if you specify the `NfcPollingOptions.iso18092` to the `pollingOptions`)

**Handling Session**
## Minimum Usage

```dart
// Check availability
bool isAvailable = await NfcManager.instance.isAvailable();
// Start Session
if (!isAvailable) {
print("The NFC features may not be supported on this device.");
return;
}
NfcManager.instance.startSession(
pollingOptions: ...,
onDiscovered: (NfcTag tag) async {
// Do something with an NfcTag instance.
// Stop the session when the processing is completed.
NfcManager.instance.stopSession();
},
);
// Stop Session
NfcManager.instance.stopSession();
```

**Handling Platform Tag**
## Handling the NfcTag instance.

NfcTag is typically not used directly, but only to obtain an instance of a specific tag type. This plugin provides the following tag types:

The following platform-tag-classes are available:
**Android Only**

* Ndef
* FeliCa (iOS only)
* Iso7816 (iOS only)
* Iso15693 (iOS only)
* MiFare (iOS only)
* NfcA (Android only)
* NfcB (Android only)
* NfcF (Android only)
* NfcV (Android only)
* IsoDep (Android only)
* MifareClassic (Android only)
* MifareUtralight (Android only)
* NdefFormatable (Android only)
* `NdefAndroid`
* `NfcAAndroid`
* `NfcBAndroid`
* `NfcFAndroid`
* `NfcVAndroid`
* `IsoDepAndroid`
* `MifareClassicAndroid`
* `MifareUltralightAndroid`
* `NdefFormatableAndroid`
* `NfcBarcodeAndroid`

Obtain an instance by calling the factory constructor `from` on the class. For example:
**iOS Only**

* `NdefIOS`
* `MiFareIOS`
* `FeliCaIOS`
* `Iso15693IOS`
* `Iso7618IOS`

**Abstraction between Android and iOS (sub packages)**

* `Ndef` ([nfc_manager_ndef](https://github.com/okadan/flutter-nfc-manager-ndef))
* `FeliCa` ([nfc_manager_felica](https://github.com/okadan/flutter-nfc-manager-felica))
* Add more in the future...

Use `from(NfcTag)` static method to obtain an instance of a specific tag type. For example, to instantiate the `Ndef`:

```dart
import 'package:nfc_manager_ndef/nfc_manager_ndef.dart';
Ndef? ndef = Ndef.from(tag);
if (ndef == null) {
print('Tag is not compatible with NDEF');
print("The tag is not compatible with an NDEF.");
return;
}
// Do something with an Ndef instance
// Do something with an Ndef instance.
```

Please see the [API Doc](https://pub.dev/documentation/nfc_manager/latest/) for more details.

## Real-World-App

See [this repo](https://github.com/okadan/flutter-nfc-manager-app) which is a Real-World-App demonstrates how to use this plugin.
See the [example](#) directory or [Real World App](#) for more details.
Loading

0 comments on commit ca249d5

Please sign in to comment.