I am able to create a private key, but I always get a status of `-50` when I try adding the key to the keychain using `SecItemAdd`. Here is the code I am running in an iOS playground:
```
let randomOptions: [String: Any] = [kSecAttrKeyType as String: kSecAttrKeyTypeEC,
kSecAttrKeySizeInBits as String: 256,
]
let randomPrivateKey = SecKeyCreateRandomKey(randomOptions as CFDictionary, &error)
let addquery: [String: Any] = [kSecClass as String: kSecClassKey,
kSecAttrApplicationTag as String: tag,
kSecValueRef as String: randomPrivateKey!,
]
let status = SecItemAdd(addquery as CFDictionary, nil)
```
The debug description in the playground for `randomPrivateKey` is `<SecKeyRef curve type: kSecECCurveSecp256r1, algorithm id: 3, key type: ECPrivateKey, version: 4, block size: 256 bits, addr: 0x7fbaac5057a0>`, which makes it look like the private key is being created successfully. But no matter what I try as a private key, `SecItemAdd` always returns `-50`.
The instructions here seem to imply that this approach _should_ work. What am I doing wrong?