Configure iOS
Install
- Install WhiteLabel via NuGet or such as submodule.
Setup
Configure AppDelegate
Copy and replace AppDelegate:
[Register(nameof(AppDelegate))]
public class AppDelegate : AppDelegateBase
{
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
var result = base.FinishedLaunching(application, launchOptions);
// Override point for customization after application launch.
return result;
}
protected override IBootstrapper CreateBootstrapper()
{
return new CustomIosBootstrapper();
}
protected override void InitializeNavigation(IContainer container)
{
var navigationService = container.Resolve<IPageNavigationService>();
navigationService.Initialize(Window.RootViewController);
navigationService.For<StartPageViewModel>().Navigate();
}
}
Configure dependencies
Create custom Bootsrapper:
public class CustomBootstrapper : IosBootstrapperBase
{
protected override IList<Assembly> SelectAssemblies()
{
// for auto-registration ViewModels by ViewControllers
return base.SelectAssemblies()
.AddItem(GetType().Assembly);
}
protected override void ConfigureIoc(IContainerBuilder builder)
{
// you can register any dependencies here
}
}