What is the earliest version of iOS supporting hardware storage of private keys? I am working on an app that manages authentication keys, and I need to store them in hardware, because maximum security is absolutely essential. I did some research and only newer versions of Android actually integrate the KeyStore with hardware, but I can't find any source that clearly specifies the earliest version of iOS in which the KeyChain API or the like can be used to cache keys in the Secure Enclave.
If you want to have the private key actually stored in the Secure Enclave you need to be running at least iOS 9 and you must generate the keypair using the SecKeyGeneratePair() function.

This means that the private key is stored in the Secure Enclave, while your app gets the public key.

Note that this also means that:

A) You cannot use a private key you have generated yourself in your own code, or retrieved from somewhere else (like one of your servers)

B) You cannot retrieve the private key, so you must use the Secure Enclave functions for actually encrypting with the private key.

If your app requires you to do either of those, you can generate a keypair using the aforementioned function and use it to encrypt your own data (i.e. your self-generated private keys) with the public key from the Secure Enclave. Then you can ask the Secure Enclave to decrypt your keys when you need them. This is roughly similar to storing keys in Keychain.