# AddiOSSimulator

- Module: [Aspire.Hosting.Maui](/reference/api/go/aspire.hosting.maui.md)
- Version: `17.0.0-preview.1.26565.2`
- Kind: `method`
- Defined on: [`MauiProjectResource`](/reference/api/go/aspire.hosting.maui/mauiprojectresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

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
func (MauiProjectResource) 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()`.

## Applies to

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