realm-swift: error: could not build Objective-C module 'Realm'
I try to build a Mac command line tool to fill a realm database I’d like to use in a iOS app. I followed the instructions to add the Realm framework to the Mac app.
When I build directly after I have deleted the build folder everything works. When I then change something in a file which imports the Realm module I get the following error:
error: could not build Objective-C module 'Realm'
import Realm
^
I’m using Swift.
Deleting the build folder works but it’s far from perfect. Am I missing something?
This does not happen in my iOS project (as far as I can tell).
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 20 (6 by maintainers)
I was getting this same error. I tried clearing derived data, cleaning, and running pod install again but no luck. I then tried updating Cocoapods itself and repeating those steps, but got the same error. I also tried pod update but it didn’t help.
Finally, I tried deleting my whole ‘Pods’ folder, ran pod install, cleared derived data, cleaned, and then the error went away.
Hi, Error adding Realm to a Swift project - “Umbrella header ‘Realm.h’ not found” from here
I have a multitarget project (OSX/iOS) and I’m using a bridging header for both.
This is my podfile:
Before adding realm everything was working…
The same issue in my project,when I change swift2.2 convert to swift2.3.
I’m having the same issue, this is my Podfile:
Edit: Issue is related to CocoaPods 1.0.0-beta.