Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/okadan/flutter-device-check
A Flutter plugin for using the Apple's DeviceCheck API on iOS
https://github.com/okadan/flutter-device-check
dart flutter flutter-plugin
Last synced: 2 months ago
JSON representation
A Flutter plugin for using the Apple's DeviceCheck API on iOS
- Host: GitHub
- URL: https://github.com/okadan/flutter-device-check
- Owner: okadan
- License: mit
- Created: 2019-05-07T11:11:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-07T00:14:54.000Z (about 3 years ago)
- Last Synced: 2024-11-01T15:51:48.031Z (2 months ago)
- Topics: dart, flutter, flutter-plugin
- Language: Dart
- Homepage: https://pub.dev/packages/device_check
- Size: 92.8 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# device_check
Flutter plugin for using the Apple's DeviceCheck API on iOS.
**NOTE**
DeviceCheck is supported on iOS 11.0 or newer, and AppAttestService is supported on iOS 14.0 or newer.
If plugin is invoked on unsupported platform, the error will be thrown.
## Usage
To use this plugin, add `device_check` as a [dependency in your pubspec.yaml file](https://flutter.dev/docs/development/packages-and-plugins/using-packages).
**Import**
```dart
import 'package:device_check/device_check.dart';
```**DeviceCheck**
```dart
bool isSupported = await DeviceCheck.instance.isSupported();Uint8List token = await DeviceCheck.instance.generateToken();
```**AppAttestService**
```dart
bool isSupported = await AppAttestService.instance.isSupported();String keyId = await AppAttestService.instance.generateKey();
Uint8List attestation = await AppAttestService.instance.attestKey(
keyId: [YOUR KEY_ID],
clientDataHash: [YOUR CLIENT_DATA_HASH],
);Uint8List assertion = await AppAttestService.instance.generateAssertion(
keyId: [YOUR KEY_ID],
clientDataHash: [YOUR CLIENT_DATA_HASH],
);
```## Example
This plugin is just a bridge to Apple's DeviceCheck API.
See the [official documentation](https://developer.apple.com/documentation/devicecheck) for example usage.