xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.45k stars 511 forks source link

[xcode11-feature] Swift Libraries (CryptoKit and RealityKit) #6239

Open chamons opened 5 years ago

chamons commented 5 years ago

Both CryptoKit and RealityKit are Swift-only, with no Objective-C binding.

Infrastructure to work on swift is in work but not public currently.

If we wish to support these libraries, we need to figure out what shipping a Swift library binding truly entails.

As a friendly reminder, an issue card is not a guarantee that a certain feature will be done, or done under any particular time frame. Issues allow us to document what features we do and do not have, and give the community a place to provide feedback.

wjk commented 5 years ago

Just a comment, if binding to Swift natively is too difficult (although it should be easier now that the ABI has been fixed), we could always write a Swift library that exposes @objc entrypoints, and then call those from C# instead. Inelegant, but workable.

softlion commented 4 years ago

Any news on this ? Now that SceneKit is officially out, RealityKit is the way to go. And it's in swift only.

chamons commented 2 years ago

Hey folks, while not a full solution the prototype in https://github.com/xamarin/xamarin-macios/issues/15315 might help resolve part of the issue, depending on what APIs you need.

CastleSoft commented 2 years ago

Any progress on RealityKit ?

https://developer.apple.com/augmented-reality/realitykit/

C# wrappers ?

Thanks

chamons commented 2 years ago

There is no current progress on this issue. However, using this prototype you could potentially bind the subset of the API you need yourself.

jimjams26 commented 2 years ago

Has there been any update on this. I have tried to bind RealityKit and have been unsuccessful multiple times. I have been working on this for months due to needing to create a LiDar scanning application with Xamarin. Is there any more news on this? I just need something. Is there anyone out there that has been successful in binding the swift only framework ? I would love to know ! Or can anyone give any tips on how to implement a LiDar scanner in xamarin. Thanks, Jimbobs

tipa commented 1 year ago

CryptoKit is now the 3rd library (after StoreKit2 & WidgetKit) that I wanted to use, just to find out it is not supported. Really hope there will be some progress is making Swift-APIs available...

tipa commented 1 year ago

I just found out that in .NET8, the AesGcm class is using CryptoKit under the hood (https://github.com/dotnet/runtime/issues/29811), maybe the work that has been done there can be used to make CryptoKit available for direct use?

rolfbjarne commented 1 year ago

I just found out that in .NET8, the AesGcm class is using CryptoKit under the hood (dotnet/runtime#29811), maybe the work that has been done there can be used to make CryptoKit available for direct use?

Not really, in dotnet/runtime this was partially implemented in Swift, by creating C-style functions in Swift that were then consumed from C# using DllImports.

In other words this is all custom, manually written, code. Exposing entire frameworks like this is quite labor intensive, and not feasible with the manpower we have available.

mlancione commented 1 year ago

Do we know whether Microsoft intends to ever support Swift Libraries? This seems quite critical to supporting the iOS platform going forward.

Xamarin as a company seemed to make it their core mission to supporting all iOS and Android functionality (with same-day OS support as well).

dalexsoto commented 1 year ago

Yes this is on our radar and we intend to look into this in the future, I do not have a timeline for you just yet but it is something we will be actively looking into.

mlancione commented 1 year ago

@dalexsoto Thanks for the update. Much appreciated.