appleGenerateAttestationKey method
Generates a new Apple App Attestation key in the device's Secure Enclave.
This method creates a new cryptographic key pair specifically for App Attestation on iOS devices. The private key remains secured in the Secure Enclave and cannot be extracted, while the public key can be used for attestation verification.
Returns a Future that completes with a String representing the unique identifier for the generated attestation key. This key ID is used in subsequent appleAttestKey calls.
Platform Support: iOS 14+ with App Attestation capability
Throws UnimplementedError if not overridden by platform implementation.
Example:
try {
final keyId = await CalljmpDevice.instance.appleGenerateAttestationKey();
print('Generated key ID: $keyId');
// Store keyId for future attestation operations
} catch (e) {
print('Key generation failed: $e');
}
Implementation
Future<String> appleGenerateAttestationKey() {
throw UnimplementedError(
'appleGenerateAttestationKey() has not been implemented.',
);
}