Git Product home page Git Product logo

Comments (5)

cresilva avatar cresilva commented on August 18, 2024

Hi,

Copy iconize-fontawesome.ttf to resource folder, in iOS app work perfectly ;)

from xamarin.plugins.

Denny966 avatar Denny966 commented on August 18, 2024

Still doesn't work for me on UWP

from xamarin.plugins.

linck avatar linck commented on August 18, 2024

I have this problem when run on Relase mode. On Debug mode works, but Release not work

from xamarin.plugins.

TimBurris avatar TimBurris commented on August 18, 2024

linck I have the same issue, works with Debug, but not release. did you ever resolve? i'm about to dive into the code and try to figure it out.

Update:
while i have not been able to fix it, yet, it only fails when using"compile with .net native tool chain" which is on by default for release builds. if you uncheck it will work (and build 10 times faster) but you won't be able to publish to the store, so it's not a solution.

Update again
Finally got it working!
in your OnLaunched, replace your simple Xamarin.Forms.Forms.Init(e) with:

var assembliesToInclude = new List<Assembly>();

// Now, add in all the assemblies your app uses
assembliesToInclude.Add(typeof(FormsPlugin.Iconize.IconButton).Assembly);
assembliesToInclude.Add(typeof(FormsPlugin.Iconize.UWP.IconControls).Assembly);
assembliesToInclude.Add(typeof(Plugin.Iconize.IIconModule).Assembly);
assembliesToInclude.Add(typeof(Plugin.Iconize.UWP.IconizeExtensions).Assembly);
assembliesToInclude.Add(typeof(Plugin.Iconize.Fonts.FontAwesomeModule).Assembly);

//init xamarin with the UWP overload to include those assemblies
Xamarin.Forms.Forms.Init(e, assembliesToInclude);

The reason is kind of documented, but they use language like "might" and "maybe":
https://developer.xamarin.com/guides/xamarin-forms/platform-features/windows/installation/universal/#Troubleshooting

if your UWP app is referencing multiple assemblies (for example third party control libraries, or your app itself is split into multiple libraries), Xamarin.Forms may be unable to load objects from those assemblies (such as custom renderers).

This might occur when using the Compile with .NET Native tool chain which is an option for UWP apps in the Properties > Build > General window for the project.

You can fix this by using a UWP-specific overload of the Forms.Init call in App.xaml.cs as shown in the code below (you should replace ClassInOtherAssembly with an actual class your code references):

from xamarin.plugins.

DuncanMcIntyre avatar DuncanMcIntyre commented on August 18, 2024

The UWP specific overload to load the plugin assemblies worked for me.

from xamarin.plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.