iOS Development

ios – Enum class isn’t listed in image desk of binary file? through SPM

Spread the love

Once I attempting to import third celebration library shifting from cocoapods to SPM, Image not discovered Error happens.
I examine the binary file and located the enum class in third celebration library(SQLite.swift) isn’t listed in symbol-list.
Within the case of cocoapods it not occurs.

Xcode: 15.0
Library construction:
The Framework-A import SQLite and use the API of it.
App imports each of Framework-A and SQLite as dynamic libraries through SPM.(I add .dynamic in Bundle.swift of SQLite)
Third celebration Library(version-0.13.3):

The hyperlink of library appears no drawback(in any other case it’s going to give [library no loaded error]) however the some image is lacking.
In my case, the case in enum class:Connection/location/inMemory isn’t listed in image desk.
Does anybody know the explanation? Is that this the bug of SPM?

The Bundle.swift of SQLite is right here:

// swift-tools-version:5.3
import PackageDescription

let package deal = Bundle(
    title: "SQLite.swift",
    platforms: [
    merchandise: [
            name: "SQLite",
            type: .dynamic,
            targets: ["SQLite"]
    targets: [
            name: "SQLite",
            dependencies: ["SQLiteObjc"],
            exclude: [
            title: "SQLiteObjc",
            dependencies: [],
            exclude: [
            title: "SQLiteTests",
            dependencies: [
            path: "Exams/SQLiteTests",
            exclude: [
            sources: [

#if os(Linux)
package deal.dependencies = [.package(url: "", from: "0.0.3")]
package deal.targets = [
        name: "SQLite",
        dependencies: [.product(name: "CSQLite", package: "CSQLite")],
        exclude: ["Extensions/FTS4.swift", "Extensions/FTS5.swift"]
    .testTarget(title: "SQLiteTests", dependencies: ["SQLite"], path: "Exams/SQLiteTests", exclude: [

The runtime error is right here:
dyld[2003]: Image not discovered: _$s6SQLite10ConnectionC8LocationO8inMemoryyA2EmFWC
Referenced from: <4B8F1B6D-C959-38BE-84E4-B93DF2BF0DDC> /non-public/var/containers/Bundle/Software/E6C1C0C2-AC80-4562-AA80-05373206ED9E/
Anticipated in: /non-public/var/containers/Bundle/Software/E6C1C0C2-AC80-4562-AA80-05373206ED9E/

The enum class in SQLite is right here:
enter picture description right here

Leave a Reply

Your email address will not be published. Required fields are marked *