-
Notifications
You must be signed in to change notification settings - Fork 743
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
Missing required module 'SQLiteObjc' when using Carthage #1205
Comments
I've run into this repeatedly testing out new releases for Carthage - I genuinely can't figure out what the series of steps necessary to get Carthage to actually build that module for iOS. Here are things I've done that, in some combination but never a consistent one, will eventually get that module built:
These are the things I would recommend trying:
To be honest I'm planning to drop official Carthage support as soon as reasonably possible (and that may be as soon as Swift 5.3, if the couple of SE proposals they implemented for that wind up working as expected), so longer-term the last option may be your best. |
This is really bizarre, even if I get it to work its gonna be a nightmare to reproduce on a ci pipeline. Thanks for the heads up, Carthage really feels like a sinking ship atm. |
I think adding it to your Cartfile directly (as long as it's the same version we specify) would give you something that works on CI since it seems like the issue is with transient rather than direct dependencies, but I can't make guarantees. I've made my personal position on Carthage pretty clear for a while, but I appreciate that for some there isn't a realistic option until some of those changes to SPM land. |
I'm gonna close this out - @aivcec please feel free to reopen if you have more questions. Anyone else having similar problems, please open a new issue so we can troubleshoot your specific setup. Thanks! |
This was incorrect. You shouldn't link static libraries to static libraries. |
@soffes Cool, thanks for updating with the solution - probably worth throwing a note in somewhere about it, I'll figure out where 🙃 Update: Weird, when I tried to do this in a scratch project to update the docs, it added the libs to |
@designatednerd Did some investigation with the repro steps in the description of this issue.
If you inspect Let me know if this works for folks! |
The fact that this is the workaround is kind of bananas, but I hope it helps those of you stuck to carthage! |
Well, I think if it works, a PR on SQLite.swift is in order. Just seems like the project file checked into their repo is out of date. I can raise the PR on their repo |
Certainly possible - one thing I'd be worried about with SQLite.swift is breaking either their local build or their Swift Package Manager/CocoaPods setup - I can definitely confirm that maintaining for three package managers is a bit of a house of cards 😆 |
So I couldn't figure this out. The root problem is the Objective-C product of SQLite.swift doesn't seem to work if you get it from SPM with Xcode and try to use it with a static library. I ended up copying ApolloSQLite to my project and using it with SQLite.swift from Carthage instead of SPM. I'm pretty confident if ApolloSQLite didn't have any transitive Objective-C dependencies this would all work just fine. |
Another workaround is to add ApolloSQLite to an app target and not a static library target. |
This is hilariously ironic given that the transitive dependency is for Thanks for the clarification that you're using this with a static library - I think most of the testing I have set up is making sure things work with apps and dynamic libraries, so i may need to add some stuff around this. |
For anyone who's been having trouble with this, I recommend updating to the new version of Carthage, |
Definitely hope this works for folks and that Apollo can continue to support Carthage! Thanks for posting this |
I make 0️⃣ promises, particularly once Xcode 12 lands with Swift 5.3 and the fixes to SPM most people seem to be waiting on to switch, but if Carthage can use this as a jumping off point to get themselves to being only mildly painful to support instead of excruciatingly painful to support, I'd feel a lot less urgency in terms of dropping official support for it. |
Isn't |
Ah! good catch. Yes And sorry to hear that - I have not had issues with |
Something strange is happening when integrating
ApolloSQLite
framework using Carthage, starting from apollo-ios version 0.23.x upwards (0.22.x works fine.)Starting from 0.23.0,
Cartfile.private
was removed so I removed explicit reference toSQLite
as well asStarscream
from my application'sCartfile
. However, I can't get the application to build whenever I importApolloSQLite
framework, due to the compiler error.Also, on later versions (I checked only 0.27.1) the problem appears only when targeting a device.
Are there any migration steps I may have missed?
Versions:
macOS 10.15.4
Xcode 11.4 and 11.4.1
Carthage 0.34.0
apollo-ios 0.23.x or higher
Tested only on ios builds.
Reproduction:
github "apollographql/apollo-ios" ~> 0.23
carthage update --platform ios
ApolloSQLite
anywhereThe text was updated successfully, but these errors were encountered: