Autofac
Before we begin implementing the different native sides to this interface, let's first add in our IoC container to handle the abstraction. There are a few IoC containers that are free online; for this example we are going to use Autofac. Let's add the NuGet packages for the PCL, iOS, and Android projects:
Now that we have our IoC container, let's build the iOS implementation. For each platform, we want to create objects called Modules for registering abstracted interfaces. Let's add a new folder called IoC to the PCL project and add a new file called IoC.cs
:
public static class IoC { public static IContainer Container { get; private set; } private static ContainerBuilder builder; public static void CreateContainer() { builder = new ContainerBuilder(); } public static void StartContainer() { Container = builder.Build()...