4

I installed Realm using Carthage onto my iOS app target (I made sure that I added it to Embedded Binaries section, set the framework search paths, and setup the copy-frameworks build phase). I also have an import RealmSwift statement at the top of each file where I use it.

Despite this, anywhere I reference Realm or Realm types I still get the error: "Use of unresolved identifier 'Realm'" or "Use of unresolved identifier '<a realm type>'".

The weird thing is that my app builds and runs without any issues; the errors disappear while the app is running and reappear when it isn't.

Things I have already tried: selecting Product > Clean, deleting the derived data, restarting Xcode, and restarting the computer—nothing works.

Thanks in advance.

4

1 回答 1

2

这是由于rdar://23551273影响了使用预编译框架进行的调试。Carthage issue #924也对此进行了详细讨论。

我建议你carthage update --no-use-binaries用来解决这个问题。

于 2016-06-21T21:24:38.780 回答