-
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.
Milestone 1 – StoreKit2 purchase MVP
Implement basic purchase functionality without UI components. Below is an example of Swift pseudo code.
Objectives
struct Product : Swift.Identifiable {}
struct Transaction : Swift.Identifiable {}
Deliverables
Risks
Milestone 2 – Subscriptions and list purchased products
Implement advanced purchase experience with subscriptions and list of already purchased products. Below is an example of Swift pseudo code.
Objectives
struct Transaction : Swift.Identifiable {}
struct SubscriptionPeriod : Swift.Equatable, Swift.Hashable {}
struct SubscriptionOffer : Swift.Equatable, Swift.Hashable {}
struct RenewalState : Swift.RawRepresentable, Swift.Equatable, Swift.Hashable {}
struct RenewalInfo {}
struct ExpirationReason : Swift.RawRepresentable, Swift.Equatable, Swift.Hashable {}
struct SubscriptionInfo : Swift.Equatable, Swift.Hashable {}
enum StoreKitError : Swift.Error {}
enum PurchaseResult {}
enum VerificationResult<SignedType> {}
Deliverables
Risks
Milestone 3 – Pack StoreKit2 bindings in the experimental NuGet
Pack and distribute StoreKit2 bindings for supported scenarios.
Objectives
Deliverables
Risks
This is the first end-to-end milestone. All following milestones are informational/ tentative only, and will be updated according to the progress.
Milestone 4 – Basic SwiftUI controls
Integrate native SwiftUI controls into a MAUI-based app. Below is an example of Swift pseudo code.
Objectives
struct Text {}
struct Button<Label> where Label : View {}
struct Label<Title, Icon> where Title : View, Icon : View {}
struct Image {}
class UIHostingController<Content> where Content : View
Deliverables
Milestone 5 – Support StoreKit2 views using SwiftUI
Integrate advanced SwiftUI views into MAUI-based app.
Objectives
struct ProductView {}
struct StoreView {}
struct SubscriptionStoreView {}
Deliverables
Milestone 6 – Pack SwiftUI in the experimental NuGet
Pack and distribute SwiftUI bindings for supported scenarios.
Objectives
Deliverables
Milestone 7 – Test all the frameworks from the SDK
Objectives
Deliverables
Milestone 8 - Deploy the Hiking app
Deploy experimental .NET iOS app which demonstrate the capabilities of the nSwift interop.
Objectives
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: