I am creating a Xamarin.iOS binding library for AdaptiveCards. It works correctly on iOS simulator. However, when running on a real iOS device I get the following error: Can't register the class AdaptiveCardsBinding.iOS.ACOHostConfig when the dynamic registrar has been linked away.
I have read this documentation about linker behaviour and tried the following solutions:
- Set linker behaviour to Don't Link in the referencing iOS app. This works but is not efficient/desired
- Preferred solution: Preserve code by adding the following attribute on the ACOHostConfig class:
[Preserve (AllMembers = true)]This does not fix the problem. - Add mtouch arguments:
--linkskip=AdaptiveCardsBinding.iOS. Doesn't work either.
Any ideas on how to fix this?