Skip to content

Commit ec65ba0

Browse files
committed
wip: Adding overview page
1 parent 2c882a8 commit ec65ba0

File tree

2 files changed

+36
-9
lines changed

2 files changed

+36
-9
lines changed

docs/core/deploying/native-aot/ios-like-platforms/creating-and-consuming-custom-frameworks.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Building native libraries for iOS-like platforms
3-
description: How to build and consume native libraries with Native AOT for iOS-like platforms
2+
title: Create and consume custom frameworks for iOS-like platforms
3+
description: How to create and consume custom frameworks with Native AOT for iOS-like platforms
44
author: ivanpovazan
55
ms.author: ivanpovazan
66
ms.date: 11/21/2024
@@ -50,10 +50,6 @@ This section describes steps to create a simple .NET Class Library project with
5050

5151
5. Publish the class library and target the desired iOS-like platform by specifying the appropriate runtime identifier (referenced below as `<rid>`):
5252

53-
- For iOS physical devices use: `ios-arm64`
54-
- For iOS simulator devices use: `iossimulator-arm64` or `iossimulator-x64`
55-
- For MacCatalyst use: `maccatalyst-arm64` or `maccatalyst-x64`
56-
5753
```bash
5854
dotnet publish -r <rid> MyNativeAOTLibrary/MyNativeAOTLibrary.csproj
5955
```
@@ -65,7 +61,7 @@ Successful completion of the previous step produces a pair of files: a shared li
6561
> This means that you need to repeat step 5 with a different runtime identifier.
6662
> 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).
6763
68-
## Create and consume a custom framework (optional)
64+
## Create and consume a custom framework
6965
7066
Apple imposes a requirement that shared libraries (.dylibs) need to be packaged into frameworks in order to be consumed from applications.
7167

docs/core/deploying/native-aot/ios-like-platforms/index.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,37 @@ ms.date: 11/21/2024
88

99
# Native AOT support for iOS-like platforms
1010

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.
1212

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:
24+
25+
```xml
26+
<PublishAot>true</PublishAot>
27+
<PublishAotUsingRuntimePack>true</PublishAotUsingRuntimePack>
28+
```
29+
30+
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

Comments
 (0)