Reputation: 33
In Xamarin, I am confused on the exact difference between a PCL (portable class library) and a SL (shared library. I am working on a single, not worried about future other projects...so in developing a single code set and material UI based Xamarin project library which is best?
Added: my app is to be published on each platform, IOS, Andriod and Windows..
Upvotes: 3
Views: 217
Reputation: 78
If you wish to use platform-specific controls, you can do so with Shared Projects pretty easily. Like Wosi stated in the link Ian Smith left, you may use #if compiler statements to differentiate between devices. This is not the case with PCLs, though they are more modular and easily identifiable than code in a Shared project.
Upvotes: 3
Reputation: 45243
If you really don't care about different platforms then you neither need a shared library nor a PCL. Both project types are made for sharing code over several projects and platforms. In your case you can do everything you want inside a Xamarin.Android project. But be aware that it can be hard to separate platform specific code from platform independent code when you suddenly need to aim iOS or Windows. You are forced to separate both kinds of code when you use a PCL.
As Iain Smith has already mentioned: Take a look here Xamarin Shared Library and PCL
Upvotes: 2