# Creating the iOS project

Add an iOS App (Xamarin) project called `MvvmCrossDemo.Forms.iOS` into the solution, like this:

![](https://847068821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPK_0Nj6gmm5SSTHfcs%2F-LPQMiknLQTGg5KNC-9v%2F-LPQMpc8_9rsrKGXoAGw%2Fimage.png?alt=media\&token=42ab757a-f00f-4956-8785-2aba46bb6dda)

Note that do not use iOS XAML App (Xamarin.Forms) template. Use the Blank App template and select it for iPhone:

![](https://847068821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPK_0Nj6gmm5SSTHfcs%2F-LPQMiknLQTGg5KNC-9v%2F-LPQMuJWY2ko4qQcyO9t%2Fimage.png?alt=media\&token=c8da90bc-8f97-46bc-bbce-d3d1b6145dd7)

Then install the `Xamarin.Forms` package to the project through the NuGet Package Manager:

![](https://847068821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPK_0Nj6gmm5SSTHfcs%2F-LPQMiknLQTGg5KNC-9v%2F-LPQN0kGy3S6FdxsOBZ6%2Fimage.png?alt=media\&token=f5b607aa-3d33-4a3e-8d18-aaf7fa4cc933)

Or install it by the command below in the NuGet Manager Console:

```bash
Install-Package Xamarin.Forms
```

Install the `MvvmCross.Forms` package in the NuGet Package Manager:

![](https://847068821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPK_0Nj6gmm5SSTHfcs%2F-LPQMiknLQTGg5KNC-9v%2F-LPQNBNbcRr1nhSCaNUH%2Fimage.png?alt=media\&token=80cded0a-dc31-4fac-9f70-1857ba571f6c)

Or you can install it by the command below in the NuGet Manager Console:

```bash
Install-Package MvvmCross.Forms
```

Because we use `Newtonsoft.Json` and `AutoMapper` in the `MvvmCrossDemo.Core` project, so do not forget to install them from the NuGet Package Manager or your NuGet Manager Console.

Like the Android project, add the reference to the `MvvmCrossDemo.Core` project and the `MvvmCrossDemo.Forms.UI` project. Update the default namespace of the `MvvmCrossDemo.Forms.iOS` project to `MvvmCrossDemo.Forms.iOS` instead of `Blank`, like this:

![](https://847068821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPK_0Nj6gmm5SSTHfcs%2F-LPQMiknLQTGg5KNC-9v%2F-LPQNRMLICfXrG6rBl5-%2Fimage.png?alt=media\&token=0f20737d-b3a8-490f-8455-722d0c90ff4d)

Open the `AppDelegate.cs` file and update the class to inherit from `MvxFormsApplicationDelegate<MvxFormsIosSetup<Core.App, UI.App>, Core.App, UI.App>` instead of `UIApplicationDelegate`. Then delete all the pre-populated methods in the `AppDelegate` class, as shown below:

```csharp
using Foundation;
using MvvmCross.Forms.Platforms.Ios.Core;

namespace MvvmCrossDemo.Forms.iOS
{
    // The UIApplicationDelegate for the application. This class is responsible for launching the
    // User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
    [Register("AppDelegate")]
    public class AppDelegate : MvxFormsApplicationDelegate<MvxFormsIosSetup<Core.App, UI.App>, Core.App, UI.App>
    {

    }
}
```

You can find the sample code of it here: <https://github.com/MvvmCross/MvvmCross/blob/develop/ContentFiles/Forms/iOSContent/AppDelegate.cs.pp>.

That is it! All the Views of the iOS project are handled by the `MvvmCrossDemo.Forms.UI` project so we can reuse a lot of codes between these projects.

![](https://847068821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LPK_0Nj6gmm5SSTHfcs%2F-LPY6tMIW7SGEK13SlZz%2F-LPY6vxJXR3cAk-s7_mV%2Fimage.png?alt=media\&token=73a2a4b0-cf66-47ea-a971-a2f968fd8339)
