Skip to content

Xcode error "No such module 'CSQLite'" when embedding GRDB as a Swift package #642

@janine-knowink

Description

@janine-knowink

What did you do?

Added GRDB to my iOS app via the Swift package manager and added one "import GRDB" (nothing else). The project builds fine, but the tests fail to link with the error "Missing required module 'CSQLite'" on every file which includes "@testable import "

I made a demo project where I just added GRDB and imported it into ContentView.swift. This exhibited the problem. I then found and installed the CSQLite package and imported that also into ContentView.swift, but the problem remains.

What did you expect to happen?

If the main project builds ok, the tests should also.

What happened instead?

Described above.

Environment

GRDB flavor(s): (GRDB, SQLCipher, Custom SQLite build?)

Just GRDB

GRDB version:

4.5.0 "up to next major"

Installation method: (CocoaPods, SPM, manual?)

SPM

Xcode version:

11.1

Swift version:

5

Platform(s) running GRDB: (iOS, macOS, watchOS?)

iOS

macOS version running Xcode:

10.15.1

Demo Project

GRDBTest.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions