-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application referencing iOS Binding library with framework failing with 'is not a valid framework' #16001
Comments
Thank you for the feedback, @Bohdandn. The WebRTC lib seems to be a valid framework. We will continue to look into this. @rolfbjarne Chris and I took a look into the framework found here and it appears to be hitting the MT0140 exception inside MachO.cs. It appears as though MachO should not be complaining as the framework appears valid:
|
Since this is limited to Windows:
We might be doing something wrong when copying the file to the mac. @Bohdandn can you try adding this to your binding project to see if that fixes it: <PropertyGroup>
<CompressBindingResourcePackage>true</CompressBindingResourcePackage>
</PropertyGroup> This will zip the framework, and then we'll unzip on the Mac (and hopefully solve any problems copying individual files from Windows to the Mac). |
Hi @Bohdandn. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Its still fails but with new error:
After running code from https://github.com/xamarin/xamarin-macios/blob/main/tools/common/Execution.cs#L103 on macOS I see that it fails if FileName = "usr/bin/unzip" and UseShellExecute = false but it does work for combinations:
Other notes:
|
So if I understand correctly, a potential workaround would be to compile the binding project on the Mac, and then consume the resulting binding library directly on Windows (by referencing the .dll in your executable project). Is that accurate? |
You can compile binding library even from windows with remote Mac. What fails is compilation of maui app referencing iOS binding library from windows. |
OK, that's good to know. Since this means there's a fairly easy workaround, it might take a while for us to get around to looking at this at the moment, but I'll put it on the bug list :) |
Yeah, the only workaround is to work on Mac+Rider and not in Windows and VS that unfortunately not acceptable for me so I’ll stay in Xamarin Forms until you will fix it, thanks! |
I've had similar issue (tried to build and run a maui app with ios binding project on windows paired to mac), in my case the issue was that in |
Checked after .net7 update (ios workload - 16.0.1478/7.0.100) directly from VS - behavior still the same:
|
FYI, we are seeing the same thing with getsentry/sentry-dotnet#2037. In this case, the zip with the native framework is built on a mac and bundled with our nuget package. A Windows developer referencing our nuget package in their MAUI app, and using pair to mac to build for iOS simulator on Windows, gets an error similar to #16001 (comment) when building, as it tries to unzip the file remotely on the mac. |
I see a similar thing:
I think it's trying to unzip on Windows using the macOS |
Wanted to say that we're also experiencing the same problem when using VS paired to a Mac where the build appears to want to run
Having to do all dev directly on macOS devices is...painful. |
@Bohdandn I ran into a similar problem on my binding project. After some investigation, I realised that the problem was with the archived dll file. The binding project was generating a *.resources folder, which contained the framework, separately from the resulting DLL. In my case, setting the |
@Filastian Thank you, it might help somebody.
Unfortunately it didn't help me here, binding library compilation resulted in single dll with 299Kb size without embedded ios framework as I would expect for this option. Simple MAUI app referencing such library is failing during compilation with:
Also tried with another binding project - same result. It also outputs 80Kb nuget package. Few notes for context:
Do you have anything else configured there? |
We have a few issues with binding projects when building from Windows.
<PropertyGroup>
<NoBindingEmbedding>false</NoBindingEmbedding>
</PropertyGroup>
|
…nd add tests. Fixes #16571. (#18103) Rework Hot Restart builds to use as much as possible of the normal build logic, because this is the easiest way to make sure the Hot Restart build is as close as possible to normal builds (and we don't end up missing features). This is done by executing selected parts of a normal build, and at the end we have a new task that computes where each file goes in the various output directories Hot Restart uses (HotRestartAppBundlePath, HotRestartContentDir, HotRestartAppContentDir, etc.) This PR also: * Adds a test that runs on Windows and verifies that everything consumed in a build is placed in the correct location for a Hot Restart build (this is a variation of the BundleStructure test we already have). * Removes tasks that aren't used anymore. * Misc fixes to make sure existing code works on Windows. --- This PR is best reviewed commit-by-commit. Ref: #13924 * Fixes #16571 * Fixes #16001 * Fixes #10784 * Fixes #17579 * Contributes towards #13924.
I'm trying to port Xamarin Forms application to MAUI. In order to do it I need MAUI port of https://www.nuget.org/packages/Xam.WebRtc.iOS, that is iOS binding library with WebRTC framework. I've created port the same way as its done in Xamarin WebRTC libraries but compilation of the application referencing this library failing with:
Running that project on device directly from mac terminal works just fine.
I see several issues related to this one but no solution:
You can find some additional details about solution + example in my repo - https://github.com/Bohdandn/MAUI.WebRTC.Demo
Also there is another binding repo that has the same problem - https://github.com/melihercan/WebRTCme/tree/master/WebRTCme.Bindings/Maui/WebRTCme.Bindings.Maui.iOS
I see questions in the internet related to MAUI and WebRTC or iOS binding, would be really great to finally have it solved so somebody could make nuget package and close MAUI WebRTC question for good.
Steps to Reproduce
Expected Behavior
Actual Behavior
Environment
I left environment parameters that I consider important for you.
Build server:
Dev machine:
Build Logs
Example Project (If Possible)
https://github.com/Bohdandn/MAUI.WebRTC.Demo
The text was updated successfully, but these errors were encountered: