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 Apr 21, 2023
1 parent 7a5daa6 commit 95fadb2
Show file tree
Hide file tree
Showing 103 changed files with 12,689 additions and 4,057 deletions.
14 changes: 7 additions & 7 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled.

version:
revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
revision: 7048ed95a5ad3e43d697e0c397464193991fc230
channel: stable

project_type: plugin
Expand All @@ -13,14 +13,14 @@ project_type: plugin
migration:
platforms:
- platform: root
create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230
base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230
- platform: android
create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230
base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230
- platform: ios
create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230
base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230

# User provided section

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 4.0.0-dev

**Has many breaking changes.**

# 3.2.0

* Fix build issues
Expand Down
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
74 changes: 1 addition & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,3 @@
# nfc_manager

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).

## Setup

**Android Setup**

* Add [android.permission.NFC](https://developer.android.com/reference/android/Manifest.permission.html#NFC) to your `AndroidManifest.xml`.

**iOS Setup**

* Add [Near Field Communication Tag Reader Session Formats Entitlements](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_nfc_readersession_formats) to your entitlements.

* 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.

## Usage

**Handling Session**

```dart
// Check availability
bool isAvailable = await NfcManager.instance.isAvailable();
// Start Session
NfcManager.instance.startSession(
onDiscovered: (NfcTag tag) async {
// Do something with an NfcTag instance.
},
);
// Stop Session
NfcManager.instance.stopSession();
```

**Handling Platform Tag**

The following platform-tag-classes are available:

* 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)

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

```dart
Ndef? ndef = Ndef.from(tag);
if (ndef == null) {
print('Tag is not compatible with NDEF');
return;
}
// 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.
(WIP) v4.0.0
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
group 'io.flutter.plugins.nfc_manager'
group 'dev.flutter.plugins.nfcmanager'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.flutter.plugins.nfcmanager">
package="dev.flutter.plugins.nfcmanager">
</manifest>
Loading

0 comments on commit 95fadb2

Please sign in to comment.