MEF support on Xamarin.iOS
Asked Answered
P

1

11

I am wanting to port a C# Mobile App for Windows 8 tablets using Xamarin. One of the issues we foresee is the use of MEF. Does Xamarin.iOS support MEF?

People answered 30/10, 2013 at 15:17 Comment(3)
I imagine it would be problematic. Since Xamarin.iOS uses AoT compiling, loading assemblies dynamically as MEF supports probably isn't possible. Some parts of it may still works, but the dynamic assembly loading won't.Gilliette
Do you have a better suggestion? I really don't want to scrap MEF, but it may be my only option.People
Related: bugzilla.xamarin.com/show_bug.cgi?id=11883Sarah
T
11

It depends on what you mean by MEF support. Using MEF assemblies is possible using Xamarin.iOS. What's not possible (iOS restriction) is dynamically loading code in your application (e.g. plugins).

You might be able to use MEF while ensuring there's not dynamic code being loaded, i.e. that everything is statically referenced and built inside a single binary executable (e.g. by ensuring every plugin is built-in).

Depending on your application that could prove useful (no, or less, need to modify your existing application) or not (if your app can't load/be built with all plugins). In the later case your problem is with iOS itself (not Xamarin).

Tresatrescha answered 30/10, 2013 at 16:9 Comment(1)
Do you know anything about reactiveui.net and would that be a good alternative solution?People

© 2022 - 2024 — McMap. All rights reserved.