Skip to content

[feat] Add dylib support to tauri.bundle.macOS.frameworks #4615

@zengxs

Description

@zengxs

Describe the problem

When I set a dylib file path in tauri.conf.json: tauri.bundle.macOS.frameworks:

{
  "tauri": {
    "bundle": {
      "macOS": {
        "frameworks": [
          "../libs/libmsodbcsql.18.dylib"
        ]

An error occurs when packaging:

Error failed to bundle project: Failed to bundle frameworks: Failed to bundle frameworks: `Framework path should have .framework extension: ../libs/libmsodbcsql.18.dylib`

Describe the solution you'd like

As Apple's official documentation (ref this, see table 2-5) states:

The purpose of the Contents/Frameworks directory is

Contains any private shared libraries and frameworks used by the executable.

dylib files should also be a legal file type that can be copy to the Contents/Frameworks directory.

I think we can support both *.dylib file and *.framework bundle in tauri.bundle.macOS.frameworks.

Alternatives considered

Considering that developers usually need to customize the content in the app bundle.

Is it possible to use a post-script stage for users to use custom scripts to process the content in the app bundle, this stage should be after the tauri bundle is completed, and before the codesign.

Additional context

No response

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