From 52637fe6008c2578cea55d4961fbc1c451c6f43a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 29 May 2026 13:05:33 +0200 Subject: [PATCH] Update macios docs for our Xcode 26.5 release. (#119) --- docs/ios/building-apps/build-properties.md | 73 +++++++++++++++++++++- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/docs/ios/building-apps/build-properties.md b/docs/ios/building-apps/build-properties.md index 93bf58b..8cb94b3 100644 --- a/docs/ios/building-apps/build-properties.md +++ b/docs/ios/building-apps/build-properties.md @@ -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). @@ -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 + + compatibility + +``` + +Custom behavior for specific symbols can be set using the [ReferenceNativeSymbol](build-items.md#referencenativesymbol) item group: + +```xml + + + +``` + ## iOSMinimumVersion Specifies the minimum iOS version the app can run on. @@ -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`). @@ -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