C package dependencies that are then used in an app


I am trying to create a Swift package that contains a library written purely in Swift and a dependency for that library that is written in C/C++. The dependency contains a modulemap and a bridge header for a library and uses custom linker settings for its dependencies. The package also has an executable target that works without a problem.

The problem arises when I try to use this package in an app, where I include the library that is the product of the package. This produces an error with the message No such module 'demo_dependency'.

Here is my package manifest:

// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "demo",
    platforms: [
    products: [
            name: "demo",
            targets: ["demo"])
    dependencies: [],
    targets: [
            name: "demo_dependency",
            dependencies: [],
            linkerSettings: [
            name: "demo",
            dependencies: ["demo_dependency"]),
            name: "demo_exec",
            dependencies: ["demo"]
    cxxLanguageStandard: .cxx17

How can I use this package in an iOS app?