Iconize icon indicating copy to clipboard operation
Iconize copied to clipboard

UWP: Ionicons not work in Release mode or appxbundle

Open linck opened this issue 7 years ago • 3 comments

Running application in Visual Studio Debug mode work fine, the icons are displayed. But when install by blundled app (appxbundle) or run on Release mode, the icons not displayed, only appear names (ex: ion-calendar, ion-book ...).

Run on Debug:

iconize_debug

Run on Release:

iconize_release

linck avatar Sep 07 '17 00:09 linck

I have the same issue with FontAwesome.

shorlick avatar Sep 27 '17 06:09 shorlick

Okay so following this Xamarin guidance fixed it for me. Essentially I have added the following to my UWP App.xaml.cs (perhaps all the registrations aren't needed, I haven't tested which ones are definitely required to fix it, but it works anyway):

List<Assembly> assembliesToInclude = new List<Assembly> { typeof(Iconize).GetTypeInfo().Assembly, typeof(Plugin.Iconize.Fonts.FontAwesomeModule).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.IconLabel).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.IconButton).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.IconTabbedPage).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.IconImage).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.IconNavigationPage).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.IconCarouselPage).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.IconToolbarItem).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.ToolbarItemExtensions).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.UWP.IconButtonRenderer).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.UWP.IconLabelRenderer).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.UWP.ColorExtensions).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.UWP.IconImageRenderer).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.UWP.IconNavigationRenderer).GetTypeInfo().Assembly, typeof(FormsPlugin.Iconize.UWP.IconControls).GetTypeInfo().Assembly, typeof(Plugin.Iconize.IconModule).GetTypeInfo().Assembly, typeof(Plugin.Iconize.Extensions).GetTypeInfo().Assembly, typeof(Plugin.Iconize.Iconize.IconizeInitializer).GetTypeInfo().Assembly, typeof(Plugin.Iconize.Icon).GetTypeInfo().Assembly }; Xamarin.Forms.Forms.Init(e, assembliesToInclude);

shorlick avatar Sep 28 '17 09:09 shorlick

I only needed the following for the Material and material design fonts I used...

 var assembliesToInclude = new List<Assembly>
                {
                    typeof(Plugin.Iconize.Iconize).GetTypeInfo().Assembly,
                    typeof(Plugin.Iconize.Fonts.MaterialModule).GetTypeInfo().Assembly,
                    typeof(Plugin.Iconize.Fonts.MaterialDesignIconsModule).GetTypeInfo().Assembly
                };

  Xamarin.Forms.Forms.Init(e, assembliesToInclude);

jdinnen avatar May 17 '19 21:05 jdinnen