Description
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
- 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 - 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