# MauiProjectResource.AddiOSSimulator

- Module: [Aspire.Hosting.Maui](/reference/api/go/aspire.hosting.maui.md)
- Defined on: [MauiProjectResource](/reference/api/go/aspire.hosting.maui/mauiprojectresource.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`

Adds an iOS simulator resource to run the MAUI application on an iOS simulator with a specific name and simulator UDID.

## Remarks

This method creates a new iOS simulator platform resource that will run the MAUI application
targeting the iOS platform using `dotnet run`. The resource does not auto-start
and must be explicitly started from the dashboard by clicking the start button.
Multiple iOS simulator resources can be added to the same MAUI project if needed, each with
a unique name.
To target a specific simulator, provide the simulator UDID. You can find simulator UDIDs in Xcode
under Window > Devices and Simulators > Simulators tab, right-click on a simulator and select
"Copy Identifier", or use the command: /Applications/Xcode.app/Contents/Developer/usr/bin/simctl list

## Definition

```go
type MauiProjectResource interface {
    // ... omitted for brevity
    AddiOSSimulator(
        name string,
        options ...*AddiOSSimulatorOptions,
    ) MauiiOSSimulatorResource
}
```

## Signature

```go
AddiOSSimulator(
    name string,
    options ...*AddiOSSimulatorOptions,
) MauiiOSSimulatorResource
```

## Parameters

- `name` (`string`) -- The name of the iOS simulator resource.
- `options` (`...*AddiOSSimulatorOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddiOSSimulatorOptions` argument.

- `SimulatorId` (`*string`) -- Optional simulator UDID to target a specific iOS simulator. If not specified, uses the default simulator.

## Returns

[`MauiiOSSimulatorResource`](/reference/api/go/aspire.hosting.maui/mauiiossimulatorresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [MauiProjectResource](/reference/api/go/aspire.hosting.maui/mauiprojectresource.md) -- `handle`
