-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RealmSwift] CocoaPods cannot find Realm.h when resolving RealmSwift's private modulemap #1918
Comments
same here. needed to downgrade back again. |
Have you tried forcing the reinstallation of Realm & Realm Swift?
|
I did try that, yes. No joy. |
Perhaps your Xcode project is set up differently than what we're using to test this on our end? We verify our that our installation methods (including CocoaPods) work every time we push code to the Can you try running If it does, I suspect your Xcode project's configuration is preventing Realm Swift from being installed properly. If it doesn't, I suspect there's something wrong with your local version of CocoaPods. |
That example project worked fine for me. I'll take another look at my project to see if I can spot anything suspicious. |
I am having same issue. Downgrading to 0.92.2 also didn't work for me. Have you found any solution? Why has this issue been removed from pending? |
So far, the only solution I found is to downgrade to 0.91. Still trying to find another one though. |
Cloning my project afresh and installing 0.92.3 worked for me. (Pods directory was in .gitignore, so wasn't synced) |
That didn't work for me, unfortunately. |
@e7hz3r0 can you please share a project with us that reproduces the issue you were seeing? |
I'm now also getting this problem with the newest version. |
I recommend that everyone who is having trouble installing Realm Swift via CocoaPods try our installation example as noted in my previous comment (#1918 (comment)). This should help you (and us) narrow down why it's not working on your machine or in your project. |
Thanks for posting those steps, @staticdreams. I can't necessarily confirm that they're appropriate, but then again I haven't been able to reproduce this issue myself, so it's worth a shot. I'll be closing this issue for the time being, but will reopen if we see more reports of |
I've recreated the issue in a new project (sorry, I would have done this sooner except is was a long weekend in the US): https://github.com/e7hz3r0/RealmSwift-Test-App |
Ok, we'll take a look, thanks! |
I believe I've identified the problem and have filed a PR against your sample project here: e7hz3r0/RealmSwift-Test-App#1. Let's continue the conversation there, as I don't believe this is an issue with Realm, but rather a CoocaPods limitation. |
Okay, interesting. After merging that PR, I played around a little and found that I could only use RealmSwift and Evernote (necessary for the project that I originally found the problem in) if I:
So using CocoaPods for RealmSwift and not for Evernote, resulted in the same issue as above. This is unfortunate because Realm updates more frequently than Evernote. |
You could also update Evernote's podspec to support building with |
I algo got this error, installed realm the first time, v.0.93.2, XCode 6.3.2, cocoapods 0.37.2 I have a multitarget project (OSX/iOS) and I'm using a bridging header for both (need it for other pods). User Header Search Paths has Pods/**, I need this to get my pods working. This is my podfile: def shared
use_frameworks!
pod 'Alamofire', '~> 1.2'
pod 'Valet', '~> 1.3'
pod 'RealmSwift'
end
target ‘myproj_osx' do
platform :osx, '10.10'
shared
end
target 'myproj_ios’ do
platform :ios, '8.0'
pod 'WYPopoverController', '~> 0.2.2'
shared
end
target 'myproj_tests' do
platform :osx, '10.10'
shared
pod 'Quick', '~> 0.3.0'
pod 'Nimble', '~> 0.4.0'
end Before adding realm everything was working... Besides of that it's maybe worth adding here that the manual installation dragging into embedded frameworks also doesn't seem to work for multitarget. Dragging to the iOS target works, but when I drag after it the OSX framework to the OSX target XCode shows unknown error. |
I found the issue - it was the Pods/** in the User Header Search Paths. I added this to fix an issue I had in the past with the multitarget setup, but it seems to be gone now. I removed it and everything works. I also cleaned up the pods installation directories as @segiddins suggested in the mailing list, which probably is the reason that it works now without Pods/**. |
@i-schuetz I faced the same issue just now. Pods/** just worked for me like a charm! Thanks! |
I have the same problem, i just switch between branches in my project, run pod install and this error appear the |
CocoaPods doesn't support mixing frameworks with non-frameworks in your Podfile. Please use only frameworks or none at all. |
I've got the same issue and can't fix it. Even with all hints and tips described here in the comments I can't fix it. Same when using the framework binary instead. |
@frgmt: Which version of the toolchain and CocoaPods do you use? |
I solved the problem by deleting the cocoapods gem
and deleting all the pods folders, then i run
and finally
|
@jplazcano87: Thanks for reporting that here. Note that you can always use |
I got it work with updating to beta version 1.0.0.beta.6 of CocoaPods. |
It worked for me. |
maybe this will help someone else, but I had to use Spent a whole day debugging this! :@ |
If that can help... contrary to other pods, Realm doesn't expose its public headers in the public section, but in the project one. |
@rdlopes, if you're seeing problems integrating Realm using CocoaPods, please file a new issue with information about which version of Realm you're attempting to use and with which version of CocoaPods you're seeing the problem with. To the best of our knowledge both Realm and RealmSwift work correctly with CocoaPods v0.39 and the 1.0.0 betas (from beta 4 onwards). If there are problems we'd like to hear about them and address them. |
FWIW I just had the same issue and after some head scratching, moved Note that the project was previously working perfectly fine, built with CP 0.39.0 and Realm 0.98.x. But then I decided it was time for The Great Migration™ (CP 1.0 and latest Realm) and boom... |
@bdash I don't have problems with Realm cause I stopped using it, felt too unstable. But you do have a problem, and I was providing you with the solution. Simple. PS: first time I get a "file a bug" reply when I'm providing help. |
@rdlopes we appreciate the time you've taken to share the issues you've faced and the workarounds that worked for you. The reality is that we get a large number of reports that omit crucial details like the versions of Realm and other relevant tools like CocoaPods and in these cases we encourage users to file more detailed bug reports so we can better help you. @fpillet I think you may have been bit by CocoaPods/CocoaPods#5313 which, despite our best efforts to support CocoaPods 1.0 in its RC phase, snuck in before the official release 😬 . @mrackwitz has already submitted a fix to CocoaPods (CocoaPods/CocoaPods#5352) which should be included in CocoaPods 1.0.1. Until then, we recommend OS X builders to use CocoaPods 0.39.0. I apologize for the inconvenience. |
@jpsim thanks for the additional info. Yes it looks like that's what happened! Not complaining though, I assumed that this was an issue with CP rather than with Realm itself. |
@jpsim sorry I'm stranger to bullshit especially when I get a "I don't know any problem with Realm" while we're discussing a problem with Realm... Again, I'm not sharing my "problems", I'm providing the users with the workaround, while you're still figuring out why you don't have your headers in the public section. The rest is white noise, cause that's not my problem if you're struggling with issues management. So stop the "thanks for sharing but bla bla bla and eventually f*ck off" line and don't assert you don't have any problems at all when we're discussing a problem. That would be a perfect start and would avoid flaming by posters when they get replied with handful of bullshit. |
I'm sorry for not being more clear, we appreciate you sharing your workaround, which is likely necessary due to CocoaPods/CocoaPods#5313, which has since been fixed in CocoaPods. I'm afraid this conversation is no longer civil and am forced to lock this conversation. We encourage any further problems with CocoaPods integration to be filed as a new issue. |
Firstly, awesome product, guys, it's really a joy to use!
Context:
Using Cocoapods 0.37.1
Targeting iOS 8.0
Language: Swift
I was using Realm cocoa until I upgraded to 0.92.2 two days ago. Everything was working great until the upgrade. Now I get the above error when building.
I read the new, updated instructions for RealmSwift, altered my Podfile to use that instead of Realm, and changed my imports from Realm to RealmSwift (and RLMRealm to Realm, etc).
The text was updated successfully, but these errors were encountered: