In the iOS bootstrapper, we will have configurations that are specific to the iOS app. To create an iOS app, we will go through the following steps:
- In the HotDogOrNot.iOS project, create a new class and name it Bootstrapper.
- Make the new class inherit from HotDogOrNot.Bootstrapper.
- Write the following code and resolve all the references:
using System;
using Autofac;
public class Bootstrapper : HotdogOrNot.Bootstrapper
{
public static void Init()
{
var instance = new Bootstrapper();
}
protected override void Initialize()
{
base.Initialize();
ContainerBuilder.RegisterType<CoreMLClassifier>
().As<IClassifier>();
}
}
- Go to AppDelegate.cs in the iOS project.
- Before the call to LoadApplication, in the FinishedLaunching method, call the Init method of the platform-specific bootstrapper, as shown in the following code block:
public override bool FinishedLaunching...