Search code examples
xamarinxamarin.formsxamarin-studio

Add ios project to xamarin forms solution with droid project


I've got a xamarin forms solution with a pcl and a .Droid project. Now I also want to add ios to the solution. How do I do this. From the add dialog I can select add new project, but it seems to add a lot more....So the solution was first created without the ios checkmark....

btw. I'm using xamarin studio

Best regards


Solution

    1. Add new Empty iOS project.
    2. Add Xamarin.Forms Nuget package.
    3. Substitute your AppDelegate class with this one:
    [Register ("AppDelegate")]
    public class AppDelegate : FormsApplicationDelegate
    {
        public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
        {
            Xamarin.Forms.Forms.Init();
    
            LoadApplication (new App ());
    
            return base.FinishedLaunching(application, launchOptions);
        }
    }