Skip to content

3rd party lib code asset is bundled by Flutter build Hook with dot characters removed from file path #3268

@tjoengCRC

Description

@tjoengCRC

I am integrating bare libs from 3rd party Holepunch into my Flutter app.
Those bare libs have file paths including dot characters. In my build script I add those libs as code assets.
For instance, on macOS and iOS:

CodeAsset(
        package: input.packageName, 
        name: 'bare-dns.2.1.4', 
        linkMode: DynamicLoadingBundled(),
        file: input.packageRoot.resolve('src/bare/libs/darwin/arm64/bare-dns.2.1.4.framework/Versions/A/bare-dns.2.1.4'),
      )  

At runtime the app aborts, because the 3rd party logic cannot dlopen 'bare-dns.2.1.4.framework/bare-dns.2.1.4'.
In the app's Content I find that the lib is bundled as:

Frameworks/bare-dns214.framework/bare-dns214

In other words Hook bundling has removed the dot characters from the original lib file name.

Why is this and how can I configure the build process such that original filename is preserved during bundling?

P.s. I can fix the problem by manually adding the dot characters to the app's Frameworks bundle.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions