0

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)
        print("KEY PAIR", key)
    } catch { print("EOSIO Vault Error.",
                    error,
                    error.eosioError.reason,
                    error.eosioError.description)
    }

However, it prints out the following:

EOSIO Vault Error. 

Error was encountered in key management. 

Optional(Swift.Unmanaged<__C.CFErrorRef>(_value: Error 
Domain=NSOSStatusErrorDomain Code=-34018 "Key generation failed, error -34018" 
UserInfo={NSDescription=Key generation failed, error -34018})) 

Error was encountered in key management

Is there a bug in the library? Or am I doing something wrong?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.