dotnet / dotnet/macios

[Feature Request] Add ability to include custom binaries (not app bundles) into code signing pipeline

Open
#23,848 1 comment 0 reactions 0 assignees View on GitHub
Mac Catalyst macOS
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

## Task/Context
I want to include `ffmpeg` executables (not dylib-s, but "exe") in my app bundle and run them via `Process.Start()`. The resulting app bundle should be able to pass apple notarization and review processes.
A typical solution is to add `ffmpeg` as a `Content` and sign it.
```

PreserveNewest

```

## Current NET SDK Implementation
By default, the .NET build pipeline won't sign `ffmpeg`, as it is just a file without an extension.

## Current Implementation Customization Options
We have the following options to customize the signing process:
* `` msbuild item group, which allows adding an _application bundle_ (but not a ordinal executable) to the "to be signed" list. This works well if my helper application _is_ an app bundle. Unfortunately, it does not work for `ffmpeg`, which is a single console executable.
* `` msbuild item group, which allows using pre-signed binaries (and not to break the signature during the build). This may be helpful for the binaries built by me, but not for the ready-to-use binary builds of the `ffmpeg` taken from the official ffmpeg site.
* Fully custom logic like ``. This works, but making it consistent with the project signing settings requires a lot of code and finally it is a little bit "code smell."

So, none of the existing options provides an easy-to-use and robust solution.

## Proposal
Extend or rework the `` functionality to allow signing not only app bundles but also single executable files.

Note: such a binaries (e.g. `ffmpeg`) are often distributed as a bundles containing multiple executables (e.g. `ffmpeg` and `ffprobe`) as well as their dependencies (`dylib`s, etc). Therefore, the wildcards support (to be able to include the whole folder with all its content and, ideally, somehow filter out non-binary/non-signable files) will be more important in this scenario than in case when including app bundles.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.