Portable Class Library projects

0 votes
asked Mar 20, 2015 by Rebex KB (8,330 points)

I have a Portable Class Library to share code between Xamarin.IOS, Xamarin.Android and Windows RT. Is your WinRT Beta (i.e. Rebex Components for Windows Store 8 and Windows Phone 8.1) suitable to be used in this project?

1 Answer

0 votes
answered Mar 20, 2015 by Tomas Knopp (58,890 points)
edited Jul 20, 2015 by Tomas Knopp

PCL projects limit the set of API's that you can use in such project.

Currently it is not possible to create the PCL project for Xamarin.iOS, Xamarin.Android and Windows Phone because several essential namespaces are not available in the PCL projects. This is because these APIs are missing in Windows Store Apps API:

  • System.IO
  • System.Security.Cryptography
  • System.Net.Sockets

On the other hand, the replacement APIs for Windows Store Apps (i.e. Windows.Storage, Windows.Security.Cryptography, Windows.Networking.Sockets) are not available on Xamain.iOS and Xamarin.Android.

Most Rebex components heavily access the file system, use certificates and cryptographic algorithms and communicate over the network, which means that we can't currently offer a single set of assemblies for all modern platforms.

So to sum it up, you will not be able to use Rebex components under Xamarin.Forms Portable project type. Instead, please use Xamarin.Forms Shared project and then reference appropriate Rebex assemblies targetting the individual platforms (Xamarin.iOS, Xamarin.Android, Windows Phone 8.1). Please note that we have a free beta version of Rebex components for WP8.1 at our labs.rebex.net page.

...