0910-201505 Xamarin Forms iOS change

A change in Xamarin.Forms 1.2.x requires that assemblies containing custom renderers must be loaded before Forms.Init() is called. This seems to affect only iOS projects.

As XamSvg for Xamarin Forms contains a custom renderer in its own assembly, it is affected by this change. The result is an iOS demo which does not display anything.

A workaround is to force the loading of the assembly by using it before Forms.Init() like this:

SvgImageRenderer.InitializeForms();
The SvgImageRenderer class was private, so you'll have to update the XamSvg Forms nuget to the prerelease version to use this workaround. The full AppDelegate will look like this: using Foundation; using UIKit; using XamSvg.XamForms.iOS; namespace XamSvg.Demo.iOS {     [Register("AppDelegate")]     public class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate     {         public override bool FinishedLaunching(UIApplication app, NSDictionary options)         {             //Required since Xamarin.Forms 1.2.x              //To be registered, the lib containing the custom renderer must be loaded before Forms.Init()             SvgImageRenderer.InitializeForms();             global::Xamarin.Forms.Forms.Init();             LoadApplication(new App());             return base.FinishedLaunching(app, options);         }     } }

Feedback and Knowledge Base