You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -65,7 +61,7 @@ Successful completion of the previous step produces a pair of files: a shared li
65
61
> This means that you need to repeat step 5 with a different runtime identifier.
66
62
> For example, you'd publish the class library with both `maccatalyst-arm64` and `maccatalyst-x64` runtime identifiers as a prerequisite for [Packaging the shared library into a custom MacCatalyst universal framework](#package-the-shared-library-into-a-custom-maccatalyst-universal-framework).
67
63
68
-
## Create and consume a custom framework (optional)
64
+
## Create and consume a custom framework
69
65
70
66
Apple imposes a requirement that shared libraries (.dylibs) need to be packaged into frameworks in order to be consumed from applications.
Copy file name to clipboardExpand all lines: docs/core/deploying/native-aot/ios-like-platforms/index.md
+33-2Lines changed: 33 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,37 @@ ms.date: 11/21/2024
8
8
9
9
# Native AOT support for iOS-like platforms
10
10
11
-
TBD
11
+
Starting from .NET 8, Native AOT supports targeting iOS-like platforms. The term **iOS-like platforms** refers to Apple platforms that use similar APIs such as: iOS, MacCatalyst and tvOS.
12
12
13
-
For specifics of building and consuming native libraries, see [How to build and consume native libraries with Native AOT for iOS-like platforms](./creating-and-consuming-custom-frameworks.md).
13
+
In the first release, the support was experimental, while in .NET 9 these platforms received full support with Native AOT.
14
+
15
+
Based on the use case, the support can be divided into:
16
+
17
+
- support for assemblies referencing OS-specific APIs through .NET mobile workloads (like: .NET MAUI apps)
18
+
- support for assemblies without OS-specific API dependencies
19
+
20
+
The former is a more common scenario and is described in detail in [How MAUI supports Native AOT](/dotnet/maui/deployment/nativeaot).
21
+
For the latter use case Native AOT deployment can be achieved by:
22
+
23
+
1. Enable Native AOT deployment by including the following properties in the project file:
2. Publish the project for the desired iOS-like target platform by specifying adequate runtime identifier (later referred to as `<rid>`):
31
+
32
+
- `ios-arm64`, for iOS physical devices
33
+
- `iossimulator-arm64` or `iossimulator-x64`, for iOS simulators
34
+
- `maccatalyst-arm64` or `maccatalyst-x64`, for Mac Catalyst
35
+
- `tvos-arm64`, for tvOS physical devices
36
+
- `tvossimulator-arm64` or `tvossimulator-x64`, for tvOS simulators
37
+
38
+
and execute the following command:
39
+
40
+
```
41
+
dotnet publish -r <rid>
42
+
```
43
+
44
+
For specifics of building and consuming native libraries on iOS-like platforms, see [How to create and consume custom frameworks with Native AOT for iOS-like platforms](./creating-and-consuming-custom-frameworks.md).
0 commit comments