Reputation: 422
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.
Upvotes: 4
Views: 669
Reputation: 14409
This is due to rdar://23551273, which affects debugging with precompiled frameworks. It's also discussed at length in Carthage issue #924.
I suggest that you use carthage update --no-use-binaries
to work around this.
Upvotes: 2