Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve undefined symbols error of dynamic xcframework #116

Open
yshrkt opened this issue Apr 26, 2024 · 0 comments
Open

Resolve undefined symbols error of dynamic xcframework #116

yshrkt opened this issue Apr 26, 2024 · 0 comments

Comments

@yshrkt
Copy link

yshrkt commented Apr 26, 2024

I've been trying to build dynamic xcframework from library which has some dependencies like this:

let runner = Runner(
    mode: .prepareDependencies,
    options: .init(
        baseBuildOptions: .init(
            buildConfiguration: .release,
            isSimulatorSupported: true,
            isDebugSymbolsEmbedded: true,
            frameworkType: .dynamic,
            extraBuildParameters: [
                "FRAMEWORK_SEARCH_PATHS[__platform_filter=ios]": "$(inherited) \(scipioDirectory.appending(path: ".build/scipio/DerivedData/Products/Release-iphoneos").path())",
                "FRAMEWORK_SEARCH_PATHS[__platform_filter=ios-simulator]": "$(inherited) \(scipioDirectory.appending(path: ".build/scipio/DerivedData/Products/Release-iphonesimulator").path())"
            ],
            enableLibraryEvolution: false
        ),
        buildOptionsMatrix: [
            "NIOConcurrencyHelpers": .init(
                extraFlags: .init(linkerFlags: [
                    "-framework CNIOAtomics"
                ])
            ),
            "Atomics": .init(
                extraFlags: .init(linkerFlags: [
                    "-framework _AtomicsShims"
                ])
            ),
            ...
        ],
        shouldOnlyUseVersionsFromResolvedFile: true,
        cacheMode: .project,
        overwrite: true,
        verbose: false
    )
)

It seems to work fine, but is this the right solution for undefined symbol errors?
Also, I think it's hard to configure all the dependencies manually.
So it would be nice if Scipio could automatically configure these settings according to the target dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant