smileham
smileham

Reputation: 1460

Realm.io build errors when using cocoapods `use_frameworks!`

Goal: Be able to use swift pods in an ObjC project

Steps Taken:

Result (Errors):

Problem-Solving Steps Taken:

Questions:

I'm frankly really confused and not sure what to do at this point.

So how do I fix these build errors? Why is this happening? Or what other problem-solving steps should I try? (Answers to any of these questions would be appreciated)

Upvotes: 3

Views: 480

Answers (3)

Vladimir
Vladimir

Reputation: 1053

Please check all places, where you import Realm classes. In my case I imported #import <RLMArray.h>. Should be #import <Realm/RLMArray.h>

Upvotes: 0

smileham
smileham

Reputation: 1460

Evidently one of my files had a #import <RLMRealm.h> in it (not sure how that got in there). I changed that to @import Realm; and it all works now. I missed that when searching before and only found it while combing my code. Interesting that it works with the library but not with the framework. Well, figured it out and it's all good now.

Upvotes: 2

Priyansh
Priyansh

Reputation: 1248

Realm pod for swift is "RealmSwift". I think you are using objective-c pod.

Have a look at this link Realm for Swift. You can also drag and drop realm framework, this will save from errors you have been facing.

Upvotes: 1

Related Questions