EOSIO / eosio-swift-vault

Utility library for managing keys and signing with Apple's Keychain and Secure Enclave
https://eosio.github.io/eosio-swift-vault/
MIT License
12 stars 8 forks source link

"Error was encountered in key management" #65

Closed VadimSos closed 3 years ago

VadimSos commented 4 years ago

Following the tutorial in https://github.com/EOSIO/eosio-swift-vault for EosioSwiftVault I wrote the following function:

import EosioSwiftVault

func getKeyPair() let vault = EosioVault(accessGroup: Bundle.main.bundleIdentifier!) do{ let key = try vault.newVaultKey(secureEnclave: true) } catch { print(error) }

It prints out the following: Error was encountered in key management.

jke661s commented 3 years ago

I got this error as well. Have no clue how to fix it.

opi-smccoole commented 3 years ago

Are you trying to run it on a device or the simulator? Simulator does not have the secure enclave.

jke661s commented 3 years ago

Thank you. It works after I configured an App Group and run it on my device.