iOS 11模拟器dyld:未找到符号:_CKAccountChangedNotification

时间:2017-10-03 14:59:44

标签: xcode ios-simulator ios11

有谁知道我的iOS 11模拟器发生了什么?当我在iOS 11上启动时,该应用程序无法运行,并在控制台中说:

dyld: Symbol not found: _CKAccountChangedNotification

Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/CoreDuet.framework/CoreDuet

Expected in: /Users/steve/Library/Developer/Xcode/DerivedData/Cloud-bvzzwfgkjzfnzibxrwadbayiowcu/Build/Products/Debug-iphonesimulator/CloudKit.framework/CloudKit in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/CoreDuet.framework/CoreDuet"

但是在iOS 10模拟器或iOS 11设备上运行时一切正常。我该如何解决这个问题?提前谢谢!

1 个答案:

答案 0 :(得分:1)

CloudKit是一个系统框架,因此您的框架正在干扰尝试在真实CloudKit.framework

中找到符号的其他系统框架

这是因为模拟器当前没有使用dyld共享缓存(否则符号已经解析为系统提供的CloudKit.framework Xcode设置{{ 1}}指向构建的产品目录,这样它就可以找到你的框架,即使它们没有打包在最终的安装位置。

这两个组合会导致dyld在尝试解析DYLD_FRAMEWORK_PATH时看到您的CloudKit.framework版本。

解决方案是重命名框架。