How to do it...

  1. Open Finder.
  2. Click Applications in the left-hand pane.
  3. Now, double-click on the Visual Studio icon.
  1. Now, click on Open, locate the Chapter8.Xamarin solution, and open it.
  2. The Solution Explorer should look like this:
  1. Now, control (^) + click on the Chapter8.Xamarin label and select Add | New Project.
  2. In the New Project dialog box, scroll down the left-hand pane till you see the Multi Platform section.
  1. Click on Library and select .NET Standard Library under General in the right-hand pane. Also make sure C# is selected:
  1. Click Next.
  2. Select Target Framework: as .NET Standard 2.0 and click Next:
  1. In the Project Name: textbox, type Chapter8.Xamarin.iOSLib as the name and leave the rest:
  1. Click Create.
  1. Now, the Solution Explorer should look like this:
  1. Select the Class1.cs label and press command + R to rename.
  2. Rename it HelloLib.cs.
  3. Make sure you change the class name as well from Class1 to HelloLib.
  4. Now, inside the HelloLib class, add the following code:
      public string SayHello(string yourName)
{
return $"Hello {yourName}, Greetings from iOS";
}
  1. Click Build | Build All to check that all syntax is correct.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.252.201