Geir Sagberg
Geir Sagberg

Reputation: 9821

Are there any pros to using PCL profile 158 over 78 for Xamarin and MvvmCross?

I am working on a cross-platform Xamarin app targeting iOS and Android, using Stuart Lodge's excellent MvvmCross framework.

Microsoft recently released new versions of their Portable Class Library BCL packages, and Stuart describes how to setup a project with these in http://slodge.blogspot.com.au/2013/11/quick-run-through-using-pcls-in.html.

When using PCL profile 158, one has to add the BCL async package and do some tweaking in order to make the iOS project work.

When using PCL profile 78, this seems to work automatically, with no need for the BCL packages.

Why would one use profile 158 over profile 78?

Upvotes: 19

Views: 2738

Answers (2)

Kobynet
Kobynet

Reputation: 1058

In addition to Daniel Plaisted's comment, profile 78 is missing few more types

  1. System.Threading.ThreadPool
  2. System.Threading.Timer

Both can be workaround by creating a plugin with specific implementation for each platform or referencing an older framework who does have these and wrap these types, see timer-in-portable-library

In addition to that, microsoft released a powerfull set :Immutable-Collection,
which supports PCL but isnt supported in silverlight and therefor isnt supported in profile 158 but is supported in profile 78.

Upvotes: 6

Daniel Plaisted
Daniel Plaisted

Reputation: 16744

Profile158 supports more platforms. Specifically it can run on Silverlight 5, where as Profile78 can't. Also, Profile158 uses the "older" reflection APIs, so if you have existing code which uses reflection it's likely to be easier to port to Profile158.

All else being equal though, I'd recommend using Profile78 unless you have a reason not to. It should work on Xamarin, if not then report it as a bug. :)

Upvotes: 15

Related Questions