Xamarin.Plugins icon indicating copy to clipboard operation
Xamarin.Plugins copied to clipboard

Instructions to setup for Xamarin.Forms with UWP, iOS, and Android

Open nlraley opened this issue 8 years ago • 4 comments

Are there any instructions for setting this up in a Xamarin.Forms project targgeting UWP, iOS, and Android?

I have added the NuGet packages for Xam.FormsPlugin.Iconize, Xam.Plugin.Iconize, Xam.Plugin.Iconise.EntypoPlus, Xam.Plugin.Iconize.FontAwesome, and Xam.Plugin.Iconize.Material, targeting the newest betas of each in order to get some of the UWP features.

On the OnLaunched event in the App.xaml.cs in the UWP project, I have a call to: Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule()) .With(new Plugin.Iconize.Fonts.EntypoPlusModule()) .With(new Plugin.Iconize.Fonts.MaterialModule()) .With(new Plugin.Iconize.Fonts.EntypoPlusModule());

Then I referenced the following namespace in my main window in the shared project: xmlns:icons="clr-namespace:FormsPlugin.Iconize;assembly=FormsPlugin.Iconize"

However, once I add one of the controls to my main window's screen inside the shared project, I get an exception thrown on startup stating:

"Could not load file or assembly 'Plugin.Iconize.UWP, Version=1.5.0.13, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified."

Here is the command I am using to add the button/label/icon to the main window in the shared project: <icons:IconButton VerticalOptions="Start" HorizontalOptions="Start" HeightRequest="30" TextColor="Black" Text="md-apps" />

Any ideas?

Thanks, Nathan

nlraley avatar Aug 11 '17 18:08 nlraley

As you, I have difficult to setup this plugin on my application. The documentation is not completely detailed, you will need to use your critical sense to join one part to another.

If you do not notice, there is two repositories: https://github.com/jsmarcus/Xamarin.Plugins/tree/master/Iconize https://github.com/jsmarcus/Iconize

as it seems the second one is the more updated.

good luck!

candidodmv avatar Aug 30 '17 16:08 candidodmv

I found the main issue was the latest beta was bugged. Using an earlier beta it seemed to work well.

From: Vinicius Cândido [mailto:[email protected]] Sent: Wednesday, August 30, 2017 11:07 AM To: jsmarcus/Xamarin.Plugins [email protected] Cc: Nathan Raley [email protected]; Author [email protected] Subject: Re: [jsmarcus/Xamarin.Plugins] Instructions to setup for Xamarin.Forms with UWP, iOS, and Android (#83)

As you, I have difficult to setup this plugin on my application. The documentation is not completely detailed, you will need to use your critical sense to join one part to another.

If you do not notice, there is two repositories: https://github.com/jsmarcus/Xamarin.Plugins/tree/master/Iconizehttps://clicktime.symantec.com/a/1/kD7nhS0ZmUtv5boOWyz6oK1_7Y8P7yaJpN7MPAWjbyc=?d=CcIpoA9Q9ZLBSprN6iNeDy0Q9-YqMn8zpTdhFp0mSeqN-ROE0NizWBMbEFJgq9Rc6lAa3bByP0rh3PsALvzUtkxu191R3qHV-QftXKOZRplM8qoU_rCMQYzTUoSe3pxA_AYFfF5vEOp0shPh8IYNxXiRhr5ejJ-ZK4FKHjRg8dZYJ3EP3yeDUUO4PeJKGVhKJvrr1wPtG2S2nsqjQ6V39MiKWiJATEh2KwG5I9Fxj4Ehe3ogPbomGD9qULt1JiUcNd-Dry-a7GRHCrrxyfLmnTeKYcRNvRqrLsd3v-kiiEFD9GD1BGWB8fCUh6OqYhZcgdLuZNkh-Xg7Z69bMkciCS_YIwvpz7j-cEkbr-rm00E7yzeFPcFHT6a4QQSQ2-DDsBTOy5ilmY2mukklWKsm6-yXxVaLoeMiDF-8WkJDPycvRyKEZsfQK68T8SNKFnFbNKv-mTxgAICnSKzXOpMhupaKxXm3K7J7wQ%3D%3D&u=https%3A%2F%2Fgithub.com%2Fjsmarcus%2FXamarin.Plugins%2Ftree%2Fmaster%2FIconize https://github.com/jsmarcus/Iconizehttps://clicktime.symantec.com/a/1/UP80-02ARrLQVuzWideKH6KusK5j8AF3_k4eQiQh_9k=?d=CcIpoA9Q9ZLBSprN6iNeDy0Q9-YqMn8zpTdhFp0mSeqN-ROE0NizWBMbEFJgq9Rc6lAa3bByP0rh3PsALvzUtkxu191R3qHV-QftXKOZRplM8qoU_rCMQYzTUoSe3pxA_AYFfF5vEOp0shPh8IYNxXiRhr5ejJ-ZK4FKHjRg8dZYJ3EP3yeDUUO4PeJKGVhKJvrr1wPtG2S2nsqjQ6V39MiKWiJATEh2KwG5I9Fxj4Ehe3ogPbomGD9qULt1JiUcNd-Dry-a7GRHCrrxyfLmnTeKYcRNvRqrLsd3v-kiiEFD9GD1BGWB8fCUh6OqYhZcgdLuZNkh-Xg7Z69bMkciCS_YIwvpz7j-cEkbr-rm00E7yzeFPcFHT6a4QQSQ2-DDsBTOy5ilmY2mukklWKsm6-yXxVaLoeMiDF-8WkJDPycvRyKEZsfQK68T8SNKFnFbNKv-mTxgAICnSKzXOpMhupaKxXm3K7J7wQ%3D%3D&u=https%3A%2F%2Fgithub.com%2Fjsmarcus%2FIconize

as it seems the second one is the more updated.

good luck!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://clicktime.symantec.com/a/1/pw0x99aTMrUrVXoRSjHEJIARWkun8rGy3dxy7vRM6fE=?d=CcIpoA9Q9ZLBSprN6iNeDy0Q9-YqMn8zpTdhFp0mSeqN-ROE0NizWBMbEFJgq9Rc6lAa3bByP0rh3PsALvzUtkxu191R3qHV-QftXKOZRplM8qoU_rCMQYzTUoSe3pxA_AYFfF5vEOp0shPh8IYNxXiRhr5ejJ-ZK4FKHjRg8dZYJ3EP3yeDUUO4PeJKGVhKJvrr1wPtG2S2nsqjQ6V39MiKWiJATEh2KwG5I9Fxj4Ehe3ogPbomGD9qULt1JiUcNd-Dry-a7GRHCrrxyfLmnTeKYcRNvRqrLsd3v-kiiEFD9GD1BGWB8fCUh6OqYhZcgdLuZNkh-Xg7Z69bMkciCS_YIwvpz7j-cEkbr-rm00E7yzeFPcFHT6a4QQSQ2-DDsBTOy5ilmY2mukklWKsm6-yXxVaLoeMiDF-8WkJDPycvRyKEZsfQK68T8SNKFnFbNKv-mTxgAICnSKzXOpMhupaKxXm3K7J7wQ%3D%3D&u=https%3A%2F%2Fgithub.com%2Fjsmarcus%2FXamarin.Plugins%2Fissues%2F83%23issuecomment-326039446, or mute the threadhttps://clicktime.symantec.com/a/1/3Q10Z4GY7Y7YJtCJTOLVEPFG4me6mWjieWjzXXnEcSc=?d=CcIpoA9Q9ZLBSprN6iNeDy0Q9-YqMn8zpTdhFp0mSeqN-ROE0NizWBMbEFJgq9Rc6lAa3bByP0rh3PsALvzUtkxu191R3qHV-QftXKOZRplM8qoU_rCMQYzTUoSe3pxA_AYFfF5vEOp0shPh8IYNxXiRhr5ejJ-ZK4FKHjRg8dZYJ3EP3yeDUUO4PeJKGVhKJvrr1wPtG2S2nsqjQ6V39MiKWiJATEh2KwG5I9Fxj4Ehe3ogPbomGD9qULt1JiUcNd-Dry-a7GRHCrrxyfLmnTeKYcRNvRqrLsd3v-kiiEFD9GD1BGWB8fCUh6OqYhZcgdLuZNkh-Xg7Z69bMkciCS_YIwvpz7j-cEkbr-rm00E7yzeFPcFHT6a4QQSQ2-DDsBTOy5ilmY2mukklWKsm6-yXxVaLoeMiDF-8WkJDPycvRyKEZsfQK68T8SNKFnFbNKv-mTxgAICnSKzXOpMhupaKxXm3K7J7wQ%3D%3D&u=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASdTiaRTIpjCoJRkyuGuCna6X6B76Pkdks5sdYiRgaJpZM4O0__o.

nlraley avatar Aug 30 '17 16:08 nlraley

if the problem was solved, please close this issue! :)

candidodmv avatar Aug 30 '17 18:08 candidodmv

Here is my setup which successfully works for xamain forms project. Install the below libraries in PCL projects and client projects (Android, IOS).

  • Xam.Plugin.Iconize v1.0.10
  • Xam.FormsPlugin.Iconize v1.0.10

Install below libraries in client project

  • Xam.Plugin.Iconize.FontAwesome.

Now in your .xaml page add the reference.

xmlns:iconize="clr-namespace:FormsPlugin.Iconize;assembly=FormsPlugin.Iconize"

Add attribute now

<iconize:IconImage HeightRequest="20" 
     Icon="fa-user" IconColor="Blue" WidthRequest="20" />

Android -> MainActivity.cs

FormsPlugin.Iconize.Droid.IconControls.Init(Resource.Id.toolbar);

Android -> MainApplication.cs

public override void OnCreate()
{
          base.OnCreate();
          RegisterActivityLifecycleCallbacks(this);

	 //A great place to initialize Xamarin.Insights and Dependency Services!
	 Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule());
}

IOS -> AppDelegate.cs

Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule());
FormsPlugin.Iconize.iOS.IconControls.Init();

Let me know if this setup works for you. FYI: My pcl project profile is 111.

Cheers. Irfan

khanzzirfan avatar Oct 01 '17 05:10 khanzzirfan