Skip to content

FilterStaticFrameworks task doesn't support custom Framework binary names #23039

Open
@TomEdwardsEnscape

Description

@TomEdwardsEnscape

Apple platform

iOS

Framework version

net9.0-*

Affected platform version

.NET 9

Description

We need to compile a .Net application with a native reference to libavcodec, which is a part of ffmpeg. On iOS this must be a framework, and in this particular case the binary is within the framework at libavcodec.framework/libavcodec.dylib.

Everything works fine for native projects. However for .Net, the FilterStaticFrameworks task within the dotnet-ios toolchain doesn't like the binary path. It assumes that the binary has no extension, doesn't inspect the framework's Info.plist to detect the non-default path, and so emits this error:

error MT158: The file '/[Nuget dependencies package]/runtimes/ios-arm64/native/libavcodec.framework/libavcodec' does not exist.

The path mentioned does not exist, but libavcodec.framework/libavcodec.dylib does, and the framework is correctly configured to use this path. FilterStaticFrameworks should detect this.

Steps to Reproduce

  1. Acquire or create a native framework in which the executable is not located at "foo.Framework/foo", but which uses CFBundleExecutable in its plist to define a different location
  2. Compile a .Net iOS project with a reference to this framework

Did you find any workaround?

Looking at the source code of the task, there is no workaround, except altering the framework so that the binary is at the assumed location.

Build logs

No response

Metadata

Metadata

Assignees

Labels

binding-projectsIssue or PR that affects binding projects

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions