device_check 1.0.0 copy "device_check: ^1.0.0" to clipboard
device_check: ^1.0.0 copied to clipboard

PlatformiOS

Flutter plugin for using the Apple's DeviceCheck API on iOS.

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.

Import

import 'package:device_check/device_check.dart';

DeviceCheck

bool isSupported = await DeviceCheck.instance.isSupported();

Uint8List token = await DeviceCheck.instance.generateToken();

AppAttestService

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 for example usage.

6
likes
150
pub points
81%
popularity

Publisher

verified publisherokadan.net

Flutter plugin for using the Apple's DeviceCheck API on iOS.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on device_check