Open sasha-borodin opened 2 months ago
Hi @sasha-borodin ,
I originally created this binding project to help myself and others to migrate Xamarin.iOS projects to NET7.
The way I made it : (very high level steps)
Keep in mind each of this steps will create new set of issues for you to resolve, be ready if you choose to go this way.
The most proper way is just to build source code from xcode with required architecture and get required xcframeworks. However it is a very time consuming way and you will get all possible issues to have fun with, including fixing original source code as it might been built with older xcode versions.
I'm going to migrate the same app to NET8 within next 4-6 months and if I can't get rid of this package in my app, I will have to update nuget to support NET8. (can't promise anything)
I would try to get rid of 'XamarinComponents' from the app as it will make it harder and harder to maintain.
The original purpose of this library was to make migration to NET7 much easier and not to support life of this dead (but still working in production) library.
Regards, Igor
@sasha-borodin could you check your: "externals/MDFInternationalization.xcframework/ios-x86_64-simulator/MDFInternationalization.framework/MDFInternationalization" location should also have "externals/MDFInternationalization.xcframework/ios-arm64/MDFInternationalization.framework"
Just like on my screenshot:
Thanks for the quick response @inikityuk!
I checked the contents of MDFInternationalization.xcframework
folder under my project's bin/Debug/net8.0-ios/iossimulator-arm64/MaterialComponents.iOS.NET.resources
folder, and there is an ios-arm64
framework as well as an ios-x86_64-simulator
framework (just like in your screenshot), but not a "fat" ios-arm64_x86_64-simulator
framework (as expected).
I would also like to remove my project's dependency on the MaterialComponents library. But that is a big undertaking, and will have to wait until later. In the meantime, I will try to fork your repository, build or obtain new versions of the external xcframeworks (per your instructions above), and see how far I get :-)
Thanks again for your help.
Hey @sasha-borodin,
I just upgraded one of my projects from NET7 to NET8 and was able to use this package with no changes at all, for both devices and simulators.
if you download/install this package from nuget into existing NET8 project -> you should be just fine. https://www.nuget.org/packages/Xamarin.MaterialComponents.iOS.NET
The only difference I can see is: I'm building project on M2 Mac, you might be building on Intel Mac.
This section of release NET8 notes might help: https://github.com/xamarin/xamarin-macios/wiki/.NET-8-release-notes#default-runtimeidentifiers
Regards, Igor
@inikityuk - are you using the ForceSimulatorX64ArchitectureInIDE
project setting? What IDE are you using to perform the build? In theory, this project setting should force the build process to target iossimulator-x64
, even when building on an ARM Mac. This should remove the requirement for ARM simulator support.
However, I'm using the Rider IDE, and the setting seems to have no effect.
Just in case this helps anyone else using your library, Microsoft has offered a solution here: https://github.com/xamarin/xamarin-macios/issues/20712#issuecomment-2162384851
And I've filed a support request with JetBrains to troubleshoot support for this setting in Rider here: https://youtrack.jetbrains.com/issue/RIDER-113336/Support-for-ForceSimulatorX64ArchitectureInIDE-iOS-project-setting
First, thank you for your hard work on making this binding available!
The issue is the following compilation error when this NuGet package is referenced from a project whose
TargetFramework
isnet8.0-ios
:From
externals/MDFInternationalization.xcframework/Info.plist
:Note that
SupportedArchitectures
does not includearm64
. This is confirmed by runninglipo -i
onexternals/MDFInternationalization.xcframework/ios-x86_64-simulator/MDFInternationalization.framework/MDFInternationalization
.Is this anything that has been reported or considered? If not, I'm happy to fork and make an attempt at bindling xcframeworks with arm64 simulator support. However, any guidance you can offer (such as your approach to obtaining the current xcframeworks) would be much appreciated.
Thank you again.