-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Xamarin Forms iOS System.PlatformNotSupportedException: Operation is not supported on this platform. #156
Comments
What is the exception message and stacktrace in both cases? |
The exception is {System.PlatformNotSupportedException: Operation is not supported on this platform. This is the stack trace produced
|
Thank you, |
Great, thanks :) |
The v4.1.0-preview-01 is out with |
I had the same issue and the latest preview version fixed it, along with |
@xleon , Thanks, good news. |
This isn't fixed. On iOS on version 4.2 of the package, RegisterMany will just not work, even with .WithUseInterpretation and .WithoutFastExpressionCompiler. |
Could provide a small reproduction sample? |
Because we have the same issue I made you a small test project. The program will run on the Android emulator but not on the iOS simulator with the above mentioned error. P.S. I forgot to add WithUseInterpretation() and WithoutFastExpressionCompiler() in code - but like mentioned before by nukefusion it doesn't change the issue. |
@MilKAOS Thanks for the sample. Will look. |
I don't have a Mac, so do we have any other workaround to debug the sample? |
@MilKAOS Nevermind seems like I have found the problem. The problem is Btw, it also means that the current workaround is avoiding |
@dadhi Unfortunately building for iOS needs the hardware. But I am glad that you (probably) found the issue! |
DryIoc v4.2.1 is released with the bug-fix |
Just to add to the fix as tip for all who might read the issue in the future: |
@MilKAOS So |
@dadhi Sorry, my bad. WithUseInterpretation works too and then you don't need the FastExpressionCompiler deactivation. |
That's cool to hear, |
@MilKAOS I also wanted to ask is there any feature toggle either in runtime or compile-time I need this to be able to answer the questions and probably to put it somewhere in docs. |
Xamarin.iOS should have In our apps we are using Device.RuntimePlatform from Xamarin.Forms. |
Thanks! |
@dadhi You could have Mac as virtual machine for test |
@OmidID Hi, thanks for the link. For the issue itself - is it something not working for you yet? |
Yes. Same problem. On my side work only without fast compiler. |
@OmidID What DryIoc version do you use? |
@dadhi The version I use is 4.5.1 |
Did it crash with or |
Yes with WithoutFastExpressionCompiler and not WithUseInterpretation
|
@OmidID Try to add the interpretation too, because otherwise you are using System Compile and it may not work on the platform. |
I imagine this is should be done for iOS only. Right? for Android do I need the same options? |
@OmidID I am very curious how is the FastExpressionCompiler relates to the problem, because WithUseInterperation don't assume the compilation. I need probably to disable the fallback bacause it does not help when interpretation is the only option, and throw the relevant exception to make the problem visible. |
I'm considering to introduce DryIoC on a big Xamarin project soon. Can I help with testing any iOS related stuff? |
@xleon I think that generally everything works, just keep in mind to set This issue is open to think and decide on should the interpretation have the compilation fallback or just fail. And this a thing only if you are using custom ExpressionFactory with the exotic expression not supported by the DryIoc interpreter. My current choice is probably let it fail, because this is likely the indication of the client setup problem. Hiding it will produce more pain than profit. |
@xleon FYI: we are using DryIoc in a big project. After migration, we have better performance and lower memory usage. Using Scope over (ViewController(iOS), Activity(Android), Page(XF)) |
After upgrading to 4 from 3 registrations fail on iOS with System.PlatformNotSupportedException: Operation is not supported on this platform.
I tried using .WithoutFastExpressionCompiler(); because JIT is not supported on iOS but the registration still threw the exception.
The text was updated successfully, but these errors were encountered: