当使用 Xcode 9 (9A235) 在 Sierra (10.12.6) 上构建 macOS 应用程序时,由于 ColorSync 框架,应用程序将无法正常启动 - dyld 无法找到它:
Termination Reason: DYLD, [0x1] Library missing
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
Library not loaded: /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync
Referenced from: /Volumes/*/ColorSyncTest.app/Contents/MacOS/ColorSyncTest
Reason: image not found
鉴于 10.13 SDK 中的 ColorSync.framework 直接驻留在/System/Library/Frameworks,而不是像以前那样是 ApplicationServices.framework 的子级,因此该错误是有道理的... 我们尝试过显式链接(强链接和弱链接)到 ColorSync 和 ApplicationServices,但没有成功。
问题是——人们如何在 Xcode 9 10.13 之前的版本上使用 ColorSync?
任何想法将不胜感激。
谢谢, D.
最佳答案
我们已成功通过将使用 ColorSync 的动态库的部署目标从 10.8 更改为 10.9 来解决该问题。我不知道为什么这会起作用,如果其他人这样做,请分享。
关于objective-c - 使用 Xcode 9 构建时,Sierra 上缺少 ColorSync 框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46329037/