Oh wow, a reply!
I'm actually in the process of removing AppAttest from these apps because it has proved too unreliable, and I got no useful responses to my bug report or posts here. I've already removed it from one app and I've literally been doing that for the second today. Even a quite small rate of false-positives from App Attest is enough to get 1-star reviews from users and consequently a crash in sales.
Anyway, to answer your questions:
Are you ensuring that you are calling attestKey after generateKey has succeeded? Both of these methods are async, so you should not be attempting to synchronously call one after the other.
Yes. I was even extracting the key ID (see the FB).
As to the DCErrorInvalidKey, that indicates:
keyId is nil
keyId is invalid (i.e., from a previous App installation)
That does not explain what I was seeing. I asked above, could it indicate a cracked device? If not, how is a cracked device expected to behave? I.e. at what point would I get an error?
Anyway, thanks for your interest in my problems, even if it has come too late to be of any use.
P.S. my FB number, with more details, is above. That includes links to some other forum posts reporting related problems.