-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Module 'Realm' not found in v2.2.1 #735
Comments
Find Realm mentioned in https://github.com/danielgindi/ios-charts#troubleshooting. |
Hmm... Seems like although Realm is optional, it appears in the header. |
You don't need a separate repo. You just need to create a workspace and add a second project. Create an "iOS-charts-realm" that depends on "iOS-charts". |
Does linking it weakly do anything? |
It prevents the binaries from containing symbols from the realm framework. Guys I'll separate the Realm stuff to another framework so it will allow |
@petester42 After I separate the Realm stuff to |
As long as you keep the same folder structure podspec will work fine. If you add a workspace with a second project Carthage will also just work. |
Out of curiosity, how do you manage 3rd party dependencies then? |
In Objc the optional frameworks do just fine; But in swift it's problematic. The only problem now is that seems like Xcode refuses to get to know the new framework. It's embedded - but its classes are hidden. I'll push when I'm done struggling with Xcode... |
If you need any help just ask. I know my way around xcode projects pretty well. |
@petester42 I'm attaching two patch files:
In the "separate project" patch, Carthage does not find the In both cases - the If (when) you manage to solve it - I'd like to include updated instructions in README, to avoid all those issues of "dragged ChartsRealm.xcodeproj to my project, but it says undeclared identifier" Thanks! |
Sounds good. I'll check this out in the morning. |
The patch files do not work since they give errors but I just did it myself. For the carthage issues there will need to be a workspace to hold both projects since carthage cannot build multiple projects that aren't in a workplace. In addition, the realm project will need to have a different product name because if they are both called I know you don't like workspaces but they will be needed for separate projects otherwise we have to go with separate targets. So if you're ok with workspaces ill create a branch with the changes. |
Oh I did change the product name, that's not the issie. The end result that I want is that people will be able to easily compile. I'll apply my patches and push to branches so you can see |
@petester42 Please see The first one is the one I prefer - and it contains a workspace just for Carthage compilation, which is the only one containing shared schemes - but it compiles the FBSnapshotTestCase stuff instead. The second one works fine with Carthage, as it's just different targets inside the same project. Both still don't compile the ChartsDemo project - it can't see the ChartsRealm symbols... |
Alright cool. I'll look into it tonight. |
Hey, I am having a similar problem.
I don't use Realm. |
Right now if you are using Carthage you will have to also link realm even if you don't use it. If you really don't want to have to link it I suggest using cocoapods for now. As you can tell we are working on separating out realm from the main project. |
I just got to look at this and I fixed it. There were 3 problems:
All this should be fixed in the |
Oh dammit. I knew it was something stupid. Now you see why you need a fresh pair of eyes from time to time :-) Thanks! |
Oh right now the schemes are shared in both the ChartsDemo project, and the Carthage.workspace. I guess the workspace is redundant? |
Ya I think it can be removed. With the latest carthage it works just fine without one. I thought you needed an entry point that contained all the projects but the latest version of carthage doesn't seem to need that anymore. |
Oh they say "Carthage will now build all frameworks from all the projects in the repository" |
Many thanks ! :) |
I will mark this as resolved - a release is coming soon! |
@petester42 One thing that bothers me is that Carthage is trying to build FBSnaphostTestCase... Do you know of any way to avoid that? Carthage docs does not offer a solution. It's a new feature that finds all schemes, but that's one too many. |
It finds one too many because there is not cartfile in the root directory. I believe that if cartfile.private is moved to the root then that won't happen since it will know that is not a public thing. Right now it just seem a folder with a project so it builds it. I was gonna move it but ou wanted to be able to copy the folder which would not work anymore if I did that. |
@petester42 Could you take a look at |
Probably relam has set their minimum target to 9.1 for whatever reason. I'll look at it tonight if this still isn't fixed. |
Nope. It sometimes compiles and sometimes not. When using Xcode to bulid it builds fine. When Using xcodebuild - it builds fine the second time. This is really weird. |
I just got this error and I don't really know. Might have to do with how the project is structured. Carthage does not seem to really like the project that depends on another project. I really don't know. |
Updated ios-charts to 2.2.1 using Carthage.
Can't build the project any more.
It complains about
@import Realm;
in Charts-Swift.h file.The text was updated successfully, but these errors were encountered: