There is a known issue introduced with the Mono 5.10.x update where Mono defaults to removing the dynamic registrar at runtime. The dynamic registrar is required to dynamically register native libraries. Removing it causes a runtime exception similar to the following:
ERROR [FM] 2018/05/09-17:15:45 Error initializing local media.
ObjCRuntime.RuntimeException: Can't register the class FM.LiveSwitch.Opus.Encoder when the dynamic registrar has been linked away.
A work around is to add a build optimization flag telling Mono not to remove the registrar:
--optimize=-remove-dynamic-registrar
Documentation discussing its use is available here. With our latest release, and going forward, our Xamarin iOS examples will use this flag to work around the issue. The flag is new in Mono 5.10.x and attempting to build with it in earlier versions of Mono will give an error regarding an unrecognized compiler option. If you wish to build the Xamarin iOS examples in Mono 5.8 or earlier you simply have to remove the new flag.
Comments
0 comments
Article is closed for comments.