stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.57k stars 1.55k forks source link

Missing required module 'SQLiteObjc' #1079

Closed muzipiao closed 2 years ago

muzipiao commented 2 years ago

Error description:

  1. I integrated SQLite.swift in the static library through Swift Package Manager, uncheck when Choose package products and targets is operated;
  2. Click + in Target -> Build Phases -> Dependencies to add SQLite dependencies;
  3. When import SQLite in Swift file, report this error Missing required module'SQLiteObjc'.

Since I need to reference SQLite.swift in multiple static libraries, I cannot add it to Link Binary With Libraries, otherwise it will cause duplicate symbols error. I would like to ask how to use SQLite.swift in multiple static libraries, thank you very much!

ismetanin commented 2 years ago

I've just faced the same issue while installing SQLite.swift via SPM

image
jostster commented 2 years ago

Seems to still be an issue :( with carthage

jberkel commented 2 years ago

These sources should be removed, see #1104

maciekish commented 2 years ago

I submitted a PR to fix this. It's just a build-order issue. https://github.com/stephencelis/SQLite.swift/pull/1131

jberkel commented 2 years ago

Note that the integration happens via SPM, so I don't see why changes to project.pbxproj would fix the issue?

justinmeiners commented 2 years ago

@maciekish This fixed manual subproject inclusion for me.

jberkel commented 2 years ago

Could somebody using SPM try this change?