-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Add building iOS-like native libraries with NativeAOT #43397
base: main
Are you sure you want to change the base?
Conversation
docs/core/deploying/native-aot/libraries/ios-like-native-libraries-with-nativeaot.md
Show resolved
Hide resolved
#43399 (comment) applies to this change as well. |
Co-authored-by: Jan Kotas <[email protected]>
docs/core/deploying/native-aot/libraries/ios-like-native-libraries-with-nativeaot.md
Outdated
Show resolved
Hide resolved
docs/core/deploying/native-aot/libraries/ios-like-native-libraries-with-nativeaot.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Michal Strehovský <[email protected]>
@@ -8,9 +8,12 @@ ms.date: 11/11/2024 | |||
|
|||
# Building native libraries for iOS-like platforms | |||
|
|||
Starting from .NET 9, Native AOT officially supports publishing .NET class libraries for iOS-like platforms. | |||
Starting from .NET 9, Native AOT officially supports publishing .NET class libraries that don't depend on iOS workloads for iOS-like platforms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting from .NET 9, Native AOT officially supports publishing .NET class libraries that don't depend on iOS workloads for iOS-like platforms. | |
Starting from .NET 9, Native AOT supports publishing .NET class libraries that don't depend on Objective-C interoperability. |
We have separate workloads for iOS and Mac Catalyst. Should we just say built-in Objective-C interoperability to cover all flavors?
Also, it is redundant to say "officially supported" in the official docs. When we say "supported" in the official docs, it implies official support.
Do you have thoughts about moving this doc to where the rest iOS-like specific native AOT docs live? I understand that those are MAUI specific docs. However, a lot of content in there is more generally applicable than MAUI. We seem to be making simplifying assumption that everything mobile specific falls under MAUI. |
I can see advantages and disadvantages with that approach:
|
I would not be optimizing the docs layout around the fact that we do not have support for Objective-C interop in NAOT published libraries. It is not a fundamental limitation, it is just something that we have not found time for.
Right, and this doc problem exists for Mono too. We do not seem to mention existence of the tvos workload anywhere in the docs.
Right, and it is also applicable to building raw iOS apps without mobile SDK. It is not specific to building libraries without mobile SDK. After thinking about this some more, I would like to avoid the mainline docs to be cluttered with platform or app-model specific content. It makes them look complicated. At the same time, we should make the platform specific content more discoverable. For example, https://review.learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/?branch=pr-en-us-43397&tabs=windows%2Cnet9plus mentions iOS as supported, but it does not point you to a place where you can find anything more about it. How about we move the platform-specific to its own hives at the end, like:
|
Thats sounds like a good idea, I will look into it. |
I do not think we have placeholder pages like that anywhere in the official docs. |
extern int aotsample_add(int a, int b); | ||
int main(int argc, char * argv[]) { | ||
... | ||
NSLog(@"2 + 5 = %d", aotsample_add(2, 5)); | ||
... | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is unnecessarily indented.
Summary
This PR adds documentation describing how to build and consume native libraries with NativeAOT targeting iOS-like platforms.
Fixes dotnet/runtime#96742
Contributes to: dotnet/runtime#96664
Internal previews