appleAttestKey method
Creates an Apple App Attestation for a given key and challenge data.
This method generates an attestation statement for the specified keyId
using the provided data
as challenge material. The attestation proves
that the key was generated in the device's Secure Enclave and validates
the app's authenticity.
Parameters:
keyId
: The identifier of the attestation key (from appleGenerateAttestationKey)data
: Challenge data to include in the attestation (Base64-encoded)
Returns a Future that completes with an AppleAttestationResult containing the attestation statement and related metadata.
Platform Support: iOS 14+ with App Attestation capability
Throws UnimplementedError if not overridden by platform implementation.
Example:
final result = await CalljmpDevice.instance.appleAttestKey(
keyId,
base64Encode(utf8.encode('challenge-data')),
);
print('Attestation: ${result.attestation}');
print('Bundle ID: ${result.bundleId}');
Implementation
Future<AppleAttestationResult> appleAttestKey(String keyId, String data) {
throw UnimplementedError('appleAttestKey() has not been implemented.');
}