Manual setup

Add SkeleKit to a plain or existing .NET for iOS project.

The project template only puts the following pieces together for you. If you already have a .NET for iOS project, or simply prefer to set it up yourself, SkeleKit can also be installed manually.

Requirements

Before installing SkeleKit, you need:

  • A Mac with Xcode installed
  • The .NET 10 SDK
  • The .NET workload for iOS
  • An iOS 18+ simulator or device

Install the iOS workload if it is not already available:

dotnet workload install ios

The .NET workload supports specific Xcode versions. If builds fail immediately after an Xcode update, check that the installed .NET SDK and iOS workload support that version of Xcode before debugging the application itself.

Create the iOS project

Start with the regular .NET for iOS template, or skip this step when adding SkeleKit to an existing project:

dotnet new ios -n MyApp
cd MyApp

Make sure the project targets .NET 10 and iOS 18 or later:

MyApp.csproj
<PropertyGroup>
    <TargetFramework>net10.0-ios</TargetFramework>
    <SupportedOSPlatformVersion>18.0</SupportedOSPlatformVersion>
</PropertyGroup>

Add SkeleKit

Install the framework package in the project directory:

dotnet add package SkeleKit.iOS

SkeleKit.iOS includes the framework itself and the source generator.

Configure the scene delegate

SkeleKit creates the application window and root view controller through SkeleWindowSceneDelegate. Replace the old SceneDelegate in the Info.plist file as follows:

Info.plist
...
<key>UIApplicationSceneManifest</key>
<dict>
    <key>UIApplicationSupportsMultipleScenes</key>
    <false/>
    <key>UISceneConfigurations</key>
    <dict>
        <key>UIWindowSceneSessionRoleApplication</key>
        <array>
            <dict>
                <key>UISceneConfigurationName</key>
                <string>Default Configuration</string>
                <key>UISceneDelegateClassName</key>
                <string>SkeleWindowSceneDelegate</string>
            </dict>
        </array>
    </dict>
</dict>
...

Delete the generated AppDelegate.cs and SceneDelegate.cs afterward. SkeleKit supplies the application and scene delegates instead.

Create the first page

MainView.cs
using SkeleKit;

namespace MyApp;

[Page]
public class MainView : ContentView
{
    public MainView()
    {
        Content = new Label
        {
            Text = "Hello, iOS"
        };
    }
}

Configure the application host

Replace the old Main.cs with the SkeleKit host:

Main.cs
using MyApp;
using SkeleKit;

SkeleApplication.CreateBuilder()
    .SinglePage<MainView>()
    .Build()
    .Run(args);

SinglePage<MainView>() makes MainView the root of the application. Navigation stacks and tab-based applications is covered here.

Verify the setup

Build the finished project for the iOS simulator with:

dotnet build -r iossimulator-arm64      # iossimulator-x64 for Intel Mac

If the build succeeds, the manually configured project is ready to run.