Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 70 additions & 3 deletions docs/ios/building-apps/build-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ Specifies which mobile device or simulator to target when using `dotnet run --de

The value can be anything the command-line tools `simctl` or `devicectl`
accept for the device name; this is typically either the UDID or the name of
the device. For example, for the device `My iOS Device` with UDID `0000-aaaabbbb`, use
either `-p:Device="My iOS Device"` or `-p:Device=0000-aaaabbbb`.
the device. For example, for the device `My iOS Device` with UDID `00001111-012301230123ABCD`, use
either `-p:Device="My iOS Device"` or `-p:Device=00001111-012301230123ABCD`.

For more information about device selection, see the
[.NET SDK device selection specification](https://github.com/dotnet/sdk/blob/2b9fc02a265c735f2132e4e3626e94962e48bdf5/documentation/specs/dotnet-run-for-maui.md).
Expand Down Expand Up @@ -559,6 +559,36 @@ See also:
* The [AlternateAppIcon](build-items.md#alternateappicon) item group.
* The [AppIcon](#appicon) property.

## InlineDlfcnMethods

Controls whether the build system replaces runtime calls to `ObjCRuntime.Dlfcn` methods with direct native symbol lookups at build time, eliminating the overhead of `dlsym` at runtime.

The valid options are:

* `compatibility`: Only inlines symbol usages backed by `[Field]` attributes. This is more conservative and avoids link errors for symbols that don't exist at build time.
* `strict`: Inlines dlfcn method calls and creates native references for all symbols. This is more aggressive and may cause link errors if referenced native symbols don't exist.
* (empty): Disables inlining of dlfcn method calls.

Default value:
* .NET 11+: `strict` when using NativeAOT (`PublishAot=true`), `compatibility` otherwise.
* .NET 10 and earlier: not set (disabled).

Example:

```xml
<PropertyGroup>
<InlineDlfcnMethods>compatibility</InlineDlfcnMethods>
</PropertyGroup>
```

Custom behavior for specific symbols can be set using the [ReferenceNativeSymbol](build-items.md#referencenativesymbol) item group:

```xml
<ItemGroup>
<ReferenceNativeSymbol SymbolMode="Ignore" SymbolType="Field" Include="InexistentSymbol" />
</ItemGroup>
```

## iOSMinimumVersion

Specifies the minimum iOS version the app can run on.
Expand Down Expand Up @@ -964,7 +994,7 @@ Default:
A boolean property that specifies whether native libraries in binding projects should be embedded
in the managed assembly, or put into a `.resources` directory next to the managed assembly.

The default value is `true` (which means native libraries will _not_ be embeddded in the managed assembly).
The default value is `true` (which means native libraries will _not_ be embedded in the managed assembly).

> [!NOTE]
> Xcframeworks won't work correctly if embedded inside the managed assembly (if this property is not `true`).
Expand Down Expand Up @@ -1234,6 +1264,43 @@ $ dotnet run -p:StandardInputPath=stdin.txt

Note: this can also be accomplished by passing `--stdin ...` using the [OpenArguments](#openarguments) property.

## SdkIsDesktop

This property is a read-only property (setting it will have no effect) that
specifies whether we're building for a desktop platform (macOS or Mac Catalyst).

This property is `true` when the target platform is macOS or Mac Catalyst,
and is not set for iOS or tvOS builds.

Like `SdkIsSimulator`, this property is only set after [imports and
properties](/visualstudio/msbuild/build-process-overview#evaluate-imports-and-properties)
have been evaluated.

## SdkIsDevice

This property is a read-only property (setting it will have no effect) that
specifies whether we're building for a device or not.

This property is only `true` when building for an iOS or tvOS device (i.e.,
when `SdkIsSimulator` is not `true` and the platform is iOS or tvOS). It is
not set for macOS or Mac Catalyst builds.

Like `SdkIsSimulator`, this property is only set after [imports and
properties](/visualstudio/msbuild/build-process-overview#evaluate-imports-and-properties)
have been evaluated.

## SdkIsMobile

This property is a read-only property (setting it will have no effect) that
specifies whether we're building for a mobile platform (iOS or tvOS).

This property is `true` when the target platform is iOS or tvOS, and is not
set for macOS or Mac Catalyst builds.

Like `SdkIsSimulator`, this property is only set after [imports and
properties](/visualstudio/msbuild/build-process-overview#evaluate-imports-and-properties)
have been evaluated.

## SdkIsSimulator

This property is a read-only property (setting it will have no effect) that
Expand Down
Loading