apollo-ios: Missing required module 'SQLiteObjc' when using Carthage
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 to SQLite
as well as Starscream
from my application’s Cartfile
. However, I can’t get the application to build whenever I import ApolloSQLite
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:
- Create an empty Xcode project
- Add Cartfile with apollo-ios 0.23.0 or higher:
github "apollographql/apollo-ios" ~> 0.23
- Run
carthage update --platform ios
- Add Apollo and ApolloSQLite frameworks to project
- Import
ApolloSQLite
anywhere - Build app for a device
- Swift Compiler Error - “Missing required module ‘SQLiteObjc’”
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (14 by maintainers)
For anyone who’s been having trouble with this, I recommend updating to the new version of Carthage, ~0.36~ 0.35. In preparing for the
0.29.0
release it built the iOS SQLite library correctly on the first try, something it has literally never done before. Might have been a fluke, but worth a shot.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 😆
@designatednerd Did some investigation with the repro steps in the description of this issue.
swift package generate-xcodeproj
, which generatedSQLite.swift.xcodeproj
SQLite.xcodeproj
carthage build --platform ios
If you inspect
SQLite.xcodeproj
vsSQLite.swift.xcodeproj
, you will notice that inSQLite.xcodeproj
, the scheme does not indicate to build SQLiteObjc, where as the newly generatedSQLite.swift.xcodeproj
does.Let me know if this works for folks!
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. Swift 5.3 can’t come soon enough.
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:
carthage update
, then stop after checkout and before build, and runcarthage build
insteadcarthage update
carthage update
to completion, delete and regenerate the framework withcarthage build
These are the things I would recommend trying:
SQlite.swift
back into your ownCartfile
- there may be something happening where things are being built correctly for direct dependencies but not transient dependenciesTo 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.