-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Use-cases for Swift interop in .NET 10 #95636
Comments
Tagging subscribers to this area: @dotnet/area-meta Issue DetailsDescriptionThis issue tracks the top-level scenarios for end-users regarding .NET Swift interop. The goal is to demonstrate the practical application of .NET Swift interop within Maui scenarios. One possible approach is to select an existing Maui sample from https://github.com/dotnet/maui-samples and improve it by incorporating native libraries and widgets, such as UIKit or SwiftUI. There are some other ideas, which may be desirable but not required, and will be added later. Below is a list of tasks that needs to be implemented. Please note that the breakdown of the issues does not impose hard deadlines. If some of the functionality does not get upstreamed for a particular preview version, this issue will be updated accordingly. Tasks.NET9 Preview 1
.NET9 Preview 2
.NET9 Preview 3
.NET9 Preview 4TBD
|
I think live activity support would make sense for this (and lots of other use cases). Just commenting here as a suggestion I got from another issue. |
Thanks, there is a tracking issue: xamarin/xamarin-macios#17038 |
There are also some libraries available in Swift such as Apple's MLX. It would be great if one could easily interop into Swift from .net. |
Created a tracking issue: xamarin/xamarin-macios#21811 |
Overview
This issue presents use-cases we want to support. They are required to define and limit the scope of Swift interop effort in .NET 10. While it's difficult to clearly specify the exact Swift language features that will be supported in the next release, we can establish our definition of done, with focus on two key areas: functionality and performance.
Hiking app
We want to develop an experimental .NET iOS app which will serve as a base for implementing use-cases that showcase the capabilities of Swift interop. Selected functionalities from the app will be calling into Swift-only frameworks to demonstrate capabilities of the Swift interop. The app and corresponding bindings will not be officially supported.
Users of the app will be able to explore trails, authenticate using Apple ID, purchase a trail, and record a hike.
In-app purchase example
This example demonstrates in-app purchases and reviews using StoreKit2 framework. On the "Explore" page, items will be available for purchase via the products method. When the purchase button is clicked, it triggers the purchase method.
Target APIs:
Authentication example
This example demonstrates the authentication feature using the built-in SignInWithAppleButton on the “Login” page. Users can authenticate using their Apple ID, providing a seamless login experience.
Target APIs:
SwiftUI views example
This example demonstrates how .NET developers can integrate native SwiftUI controls into MAUI-based applications, leveraging native UI controls for a seamless user experience.
This example implements SwiftUI views and serves as a foundation for the next examples. The “Login” page includes a login button and text. The main menu contains "Explore" and "My Trails" pages. The "Explore" page displays a list of available trails for purchase. Each item includes an image, text, and a "Buy" button. “Trail details” page displays an image and description. If the trail is not purchased, there is a "Purchase" button and an image; if it is purchased, there is a "Start/Stop" button and a map with start and end pins.
Views and controls should be sourced from the SwiftUI framework.
Target APIs:
Note
The .NET iOS app with generated bindings will be experimental in .NET 10 and will not be officially supported.
The text was updated successfully, but these errors were encountered: