macOS Mojave使用Swift 4找不到/var/db/DetachedSignatures [英] macOS Mojave cannot find /var/db/DetachedSignatures with Swift 4
问题描述
High Sierra没有此类错误,现在有了Mojave,使用Swift 4完成的应用程序发出了此错误.当我尝试通过电话获取软件信息时,它将发生: /usr/sbin/system_profiler SPApplicationsDataType
I had no such error with High Sierra, now with Mojave my application done with Swift 4 is issuing this error. It will happen when I try to get software information by call: /usr/sbin/system_profiler SPApplicationsDataType
我的应用程序不会失败并且可以运行,但是我注意到它在运行时会暴露此错误:
My application wont fail and works but I notice that it will expose this error when running:
system_profiler [2052:52918] [logging-persist] os_unix.c:42249:(0)打开(/var/db/DetachedSignatures)-未定义错误:0
system_profiler[2052:52918] [logging-persist] os_unix.c:42249: (0) open(/var/db/DetachedSignatures) - Undefined error: 0
我想它与代码签名有关,但我不知道该如何处理,也许是一个错误,因为/var/db中没有任何名为DetachedSignatures的文件
I guess it is related to code signatures but I don't know how to handle that, maybe a bug as there isn't any file called DetachedSignatures inside /var/db
推荐答案
我遇到了同样的问题,我从其他人的MacBook复制了DetachedSignatures文件,并将其放在iMac上的/var/db路径下.它解决了问题.不知道为什么有些Mac只是没有这个DetachedSignatures文件.互联网上没有太多有用的解释.
I encountered the same problem, and I copied the DetachedSignatures file from some other guy's MacBook and put it under /var/db path on my iMac. It solved the problem. Don't know why some mac just don't have this DetachedSignatures file. Not very many useful explanations on the Internet.
这篇关于macOS Mojave使用Swift 4找不到/var/db/DetachedSignatures的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!