Iconize
Iconize copied to clipboard
FontAwesome in sample app on iOS not working
And the same goes for the icons in the title bar to the right (they show as a small rectangle with a question mark inside).
I figured it out. For iOS, for font awesome, You have to add fonts manually to resourced folder. then add the reference for those in info.plist . This is actually better since you can add the version of the font you want instead of Iconize adding it for you. As for the sample project, I think They forgot to update that portion of it
Thanks - I'll try that out!
@pakbaz Have you tried to use the tabbar at the bottom in Android (new in Forms 3.1)?
It does funny things with the icons in my app when I try that (colours etc.)
@pakbaz So in the test app I added these font files (with BuildAction -> BundleResource):
- fa-brands-400.ttf
- fa-regular-400.ttf
- fa-solid-900.ttf
But they still don't show up.
The references in info.plist are already there as per the instructions.
What did you do differently?
@john-dalsgaard
On IOS, try using .otf files from https://github.com/FortAwesome/Font-Awesome/tree/master/use-on-desktop
The .ttf files are the correct files but Iconize is expecting them to be named the following:
iconize-fontawesome-brands.ttf iconize-fontawesome-regular.ttf iconize-fontawesome-solid.ttf
From: ClausElmann [email protected] Sent: Wednesday, September 19, 2018 3:28 PM To: jsmarcus/Iconize [email protected] Cc: Subscribed [email protected] Subject: Re: [jsmarcus/Iconize] FontAwesome in sample app on iOS not working (#83)
On IOS, try using .otf files from https://github.com/FortAwesome/Font-Awesome/tree/master/use-on-desktophttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FFortAwesome%2FFont-Awesome%2Ftree%2Fmaster%2Fuse-on-desktop&data=02%7C01%7C%7C00235610e9d643096fc408d61e6606d0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636729820872965606&sdata=ZJI7ziBrEsw8t75AEOHZnirixtJjgIR8cqDk%2B3oz%2FgA%3D&reserved=0
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjsmarcus%2FIconize%2Fissues%2F83%23issuecomment-422928993&data=02%7C01%7C%7C00235610e9d643096fc408d61e6606d0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636729820872965606&sdata=8btjbcPvX4k5l%2BedgNTgaKSzPPjO8f9GYLEU5mjiBV4%3D&reserved=0, or mute the threadhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAB1LIDXpQcdbI4_T68xs-wwqPfgViKeFks5ucprCgaJpZM4WwWrj&data=02%7C01%7C%7C00235610e9d643096fc408d61e6606d0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636729820872965606&sdata=jyNQVbCfJk8XhQU9bI%2BFRu5BOUV8YqS8ZWGJiRvrc%2B8%3D&reserved=0.
@jsmarcus
Strange - my app on IOS did not work with .ttf (renamed as stated above), only when I found the .otf version it was fixed :-) Android seems to work with both types
It worked - but I had to use the .otf files as well as rename them as @jsmarcus mentioned.
After each change of files I cleaned the project and then ran it in debug mode on the simulator. Not sure if I should have done that differently?
Does anyone happen to have an actual working sample for iOS? I think I tried every combination posted here and nothing works. I would love to see a working version if someone would not mind posting it.
This is what I assumed to work:
In the info.plist file add:
<array>
<string>iconize-entypoplus.ttf</string>
<string>iconize-fontawesome-regular.otf</string>
<string>iconize-fontawesome-solid.otf</string>
<string>iconize-fontawesome-brands.otf</string>
<string>iconize-ionicons.ttf</string>
<string>iconize-material.ttf</string>
<string>iconize-meteocons.ttf</string>
<string>iconize-simplelineicons.ttf</string>
<string>iconize-typicons.ttf</string>
<string>iconize-weathericons.ttf</string>
</array>
Use the otf files downloaded from: HERE
Rename them accordingly:
iconize-fontawesome-brands.otf iconize-fontawesome-regular.otf iconize-fontawesome-solid.otf
also tried....
iconize-fontawesome-brands.ttf iconize-fontawesome-regular.ttf iconize-fontawesome-solid.ttf
Place them in iOS Application Resources directory set to BundledResource.
Test Form uses:
<iconize:IconLabel FontSize="Large" VerticalOptions="Center" Text="fab-apple"/>
Clean All, Build, Deploy.
Result is no icon show, just the raw text.
Same problem here Thanks!
I was finally able to get this to work on iOS by downloading the Fontawesome otf files. Renaming them to iconize-fontawesome-regular/solid/brands.otf and adding them as a bundle resource in the project. Is this by design? Will this be a manual update whenever Fontawesome releases an update?
Not working for me with IconImage in iOS on Android works fine but not in iOS. Can someone fix this ?
It's not working for me either in ios . I updated to latest lib .
You have to add the ttf files manually in the iOS project in Resources (BundleResource). You also have to change the info.plist to the following:
<key>UIAppFonts</key>
<array>
<string>iconize-fontawesome-brands.ttf</string>
<string>iconize-fontawesome-regular.ttf</string>
<string>iconize-fontawesome-solid.ttf</string>
</array>
.ttf ?? i added the .otf files ??? Why .ttf ?
I think it can also work with otf files. But ttf is the default.
Hi All,
I have hit the same issues as this thread, but its long and picking the solution was confusing, here is what worked for me on VS for MAC, thanks to all above who helped.
-
Download .OTF files from https://github.com/FortAwesome/Font-Awesome/tree/master/use-on-desktop
-
Rename them to TTF (yes change the extension!) as follows -
iconize-fontawesome-brands.ttf iconize-fontawesome-regular.ttf iconize-fontawesome-solid.ttf
I assume we could just get them from here too - https://github.com/jsmarcus/Iconize/tree/master/src/Fonts/Plugin.Iconize.FontAwesome
-
Add them to Resources folder and BundleResource build action.
-
Update plist -
<key>UIAppFonts</key>
<array>
<string>iconize-fontawesome-brands.ttf</string>
<string>iconize-fontawesome-regular.ttf</string>
<string>iconize-fontawesome-solid.ttf</string>
</array>
- Go!
And thanks for a great library.
Try this:
https://ianvink.wordpress.com/2019/01/24/fontawsome-pro-in-xamarin-forms-apps/
Thanks for an interesting article @ianvink.
However, and this may be due to my lack of knowledge, I would have liked to see an example of how you used the icons in your forms code using the helper class that you created. Specifically, I was looking for how to specify the icon name in the helper class?
Was anyone able to get this working? I'm struggling with the same issues and it seems that it is only font awesome that is not working.
Did anyone get this to work? I tried all of the above. It would be really nice if someone who got it to work could update the sample.
hi @awatertrevi
I did this: https://github.com/jsmarcus/Iconize/issues/124#issuecomment-461461135
I hope it helps you. It worked perfectly in my project.
Hi @Wallysantos,
I replicated the steps you mentioned, but unfortunately everything still appears as a question mark.
It also seems that the Jam Icons is broken too.
So it was working on iPhone XS Max simulator but not iPhone 6s.
I followed instructions and downloaded the tff files here: https://github.com/jsmarcus/Iconize/tree/master/src/Fonts
Then included it in the Resources folder in Xamarin.iOS and it is working now.
I had the same issue using ttf files and references, but it is now working for me after adding the otf files in iOS' Resources folder and changing the references in Info.plist to .otf as well.
Files in Resources folder: iconize-fontawesome-brands.otf iconize-fontawesome-regular.otf iconize-fontawesome-solid.otf
References in Info.plist:
One thing to remember when dealing with iOS, PLEASE make sure you get the latest versions of the fonts from Font Awesome's site. I've been bashing my head over and over and over after updating to the latest version of the plugin, and realized that I was still using Font Awesome v4 fonts. As soon as I downloaded the latest, renamed them as every comment explained (including the extension change to ttf), and added them in Info.plist, it all worked.
Another tip: If you rename the extension from .otf to .ttf from WITHIN Visual Studio, it automatically changes the Build Action to None. Be sure to go through and change each one back to BundleResource
In 3.4 it works. If i update to 3.5 nothing is showing
@Suplanus - Make sure your actual font files are updated from the Font Awesome repo. I just tried this on 3.5 last night and finally got it working (on iOS at least)