收到错误:使用未解析的标识符"LinkingObjects" [英] Getting error: Use of unresolved identifier "LinkingObjects"
问题描述
在更新为Cocoapods 1.0.0后,我在Realm Swift(1.03.1)模式中遇到以下错误.
I am getting the following error in my Realm Swift (1.03.1) schema after updating to Cocoapods 1.0.0.
错误:
使用未解决的标识符"LinkingObjects"
Use of unresolved identifier "LinkingObjects"
在以下示例中:
import Foundation
import RealmSwift
class Metric: Object {
dynamic var UUID: String = ""
let linkingDimensions = LinkingObjects(fromType: Dimension.self, property: "metric")
dynamic var createdAt: NSDate = NSDate()
dynamic var createdBy: Int = CreatedBy.System.rawValue
override static func primaryKey() -> String? {
return "UUID"
}
}
我尝试过:
sudo gem uninstall cocoapods // on all cocoapods files
rm -rf Pods
rm -rf ~/Library/Caches/CocoaPods
然后我重新安装,但无济于事.我似乎在Realm Github问题页面上找不到对该问题的引用.
I then reinstalled, to no avail. I can't seem to find reference to this issue on the Realm Github issues page.
我应该在哪里查看为什么Xcode找不到Realm.当Cocoapods生成工作区文件和依赖项时,如何检查Realm是否已正确安装?
Where should I look to see why Xcode can't find Realm. How can I check if Realm has been properly installed when Cocoapods generates the workspace files and dependencies?
欢呼
推荐答案
通过清除Xcode的派生项目数据来解决此问题.
Resolved this by clearing Xcode's derived project data.
选择窗口->项目菜单,然后删除适当的项目.
Selecting Window -> Projects menu and deleting the appropriate projects.
这篇关于收到错误:使用未解析的标识符"LinkingObjects"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!