Monday, January 15, 2024
HomeiOS Developmentios - Enum class isn't listed in image desk of binary file?...

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


Once I attempting to import third celebration library shifting from cocoapods to SPM, Image not discovered Error happens.
I test 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 Package deal.swift of SQLite)
Third celebration Library(version-0.13.3):
https://github.com/stephencelis/SQLite.swift

The hyperlink of library appears no downside(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 Package deal.swift of SQLite is right here:

// swift-tools-version:5.3
import PackageDescription

let bundle = Package deal(
    title: "SQLite.swift",
    platforms: [
        .iOS(.v9),
        .macOS(.v10_10),
        .watchOS(.v3),
        .tvOS(.v9)
    ],
    merchandise: [
        .library(
            name: "SQLite",
            type: .dynamic,
            targets: ["SQLite"]
        )
    ],
    targets: [
        .target(
            name: "SQLite",
            dependencies: ["SQLiteObjc"],
            exclude: [
                "Info.plist"
            ]
        ),
        .goal(
            title: "SQLiteObjc",
            dependencies: [],
            exclude: [
                "fts3_tokenizer.h"
            ]
        ),
        .testTarget(
            title: "SQLiteTests",
            dependencies: [
                "SQLite"
            ],
            path: "Assessments/SQLiteTests",
            exclude: [
                "Info.plist"
            ],
            sources: [
                .copy("fixtures/encrypted-3.x.sqlite"),
                .copy("fixtures/encrypted-4.x.sqlite")
            ]
        )
    ]
)

#if os(Linux)
bundle.dependencies = [.package(url: "https://github.com/stephencelis/CSQLite.git", from: "0.0.3")]
bundle.targets = [
    .target(
        name: "SQLite",
        dependencies: [.product(name: "CSQLite", package: "CSQLite")],
        exclude: ["Extensions/FTS4.swift", "Extensions/FTS5.swift"]
    ),
    .testTarget(title: "SQLiteTests", dependencies: ["SQLite"], path: "Assessments/SQLiteTests", exclude: [
        "FTSIntegrationTests.swift",
        "FTS4Tests.swift",
        "FTS5Tests.swift"
    ])
]
#endif

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/MPTDKSampleApp.app/Frameworks/Framework-A.framework/Framework-A
Anticipated in: /non-public/var/containers/Bundle/Software/E6C1C0C2-AC80-4562-AA80-05373206ED9E/MPTDKSampleApp.app/Frameworks/SQLite.framework/SQLite

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



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments