realm-swift: Realm/RLMArray.h file not found and Could not build Objective-C module 'Realm'
Goals
Install Realm using Cocoapods 1.0
Expected Results
I expect it to install and work as per the instructions on https://realm.io/docs/swift/latest/
Actual Results
Error on line 21 of Realm.h Realm/RLMArray.h file not found and Could not build Objective-C module 'Realm'
Steps to Reproduce
Add RealmSwift to podfile and run pod install
Version of Realm and Tooling
Realm version: 0.102.0
Xcode version: 7.3.1
iOS/OSX version: 8.0
Cocoapods version: 1.0
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 5
- Comments: 29 (5 by maintainers)
So, I am a little ashamed that I didn’t try this earlier, but it appears that if I run
Clean Build Folder...(Hold downoptionwhile clickingProductin the Xcode menu shows theClean Build Folder...option) it fixes the issue for me.Some additional info:
I have been using Realm with Cocoapods 0.39 for a couple months with no problem. With the release of Cocoapods 1.0 I am now seeing this error.
I have tried:
I have removed RealmSwift from my cocoapod, run
pod installadded RealmSwift back into the podfile and runpod installagain. Nothing seems to make any kind of difference for me. I still get theRealm/RLMArray.h file not foundmessage.I have verfied that that file does exist and is included in the Headers group in the project. Not sure what the problem is.
Let me know if there is any additional information that I can get you that would be helpful.
Only clean build folder is not working for me. I have to clear CocoaPods cache first, then
Clean Build Folder...and do thepod install.Looks like there may have been some changes in the last few CocoaPods 1.0 RC’s that actually broke Realm support in some cases, I’m hunting down exactly what those are for now, or if I’m doing something wrong, because I think I was able to reproduce this. I’ll keep you posted.