【问题标题】:iOS - What does the following LAContext error logs on iOS mean?iOS - iOS 上的以下 LAContext 错误日志是什么意思?
【发布时间】:2021-07-06 15:35:19
【问题描述】:

我在控制台中不断收到以下日志。

[Client,LAContext] LAContext[5174:1692] will keep returning Error Domain=com.apple.LocalAuthentication Code=-10 "Invalidated due to exceeded number of allocated contexts." UserInfo={NSLocalizedDescription=Invalidated due to exceeded number of allocated contexts.} from now on.

有人可以帮忙吗?这是什么产生的?

【问题讨论】:

    标签: ios swift objective-c lacontext


    【解决方案1】:

    听起来您正在创建多个 LAContext 对象,根据我自己在 12 Pro Sim 上的测试,此错误发生在您有 65 个尚未失效的 LAContext 之后。

    LAContext 在发布时应该会自动失效。也许您在 ViewController 中实例化它并且您的 ViewController 有一个保留周期,阻止 LAContext 被释放?

    您可以通过在实例上调用invalidate() 手动使LAContext 无效。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-09
      • 1970-01-01
      • 2011-03-05
      • 1970-01-01
      • 2022-01-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多