The Xamarin.Forms includes DependencyService to help shared code to resolve platform specific implementation. The important thing here is that DependencyService isn’t replace for Dependency Injection container. DependencyService is rather service locator than IoC container. I will show you how they can work together. Although I’m using Autofac as IoC, the proposed design and architecture should be applicable to any IoC Container.
Before I show you the cooperation between the Autofac and Microsoft Extensibility Framework (MEF) I want bring you in short my opinion why is there the place for both of them. If you are try to search around, you will find lot of posts which describes the differences between the MEF or Autofac, also, you will find lot of posts which advocates to use MEF as IoC Container, or, on other side, to use Autofac as replacement of the MEF.