运行此代码
SyncUser.authenticate(with: Credential.usernamePassword(username: username, password: password, actions: [.useExistingAccount]), server: Constants.syncAuthURL) { (user, error) in }
返回-34018错误代码
libc++abi.dylib: terminating with uncaught exception of type realm::keychain::KeychainAccessException: Keychain returned unexpected status code: -34018
中的断点
_dispatch_once(dispatch_once_t *predicate,
DISPATCH_NOESCAPE dispatch_block_t block){
if (DISPATCH_EXPECT(*predicate, ~0l) != ~0l) {
dispatch_once(predicate, block);
} else {
dispatch_compiler_barrier();
}
DISPATCH_COMPILER_CAN_ASSUME(*predicate == ~0l);}
THX
答案 0 :(得分:2)
-34018
表示errSecMissingEntitlement
。尝试指定权利文件,即使它不包含任何权利,也可以解决此问题。