xamarin-macios icon indicating copy to clipboard operation
xamarin-macios copied to clipboard

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

Open chamons opened this issue 5 years ago • 12 comments

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.

chamons avatar Jun 10 '19 21:06 chamons

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.

wjk avatar Jun 10 '19 23:06 wjk

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

softlion avatar Oct 01 '20 12:10 softlion

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.

chamons avatar Jun 21 '22 20:06 chamons

Any progress on RealityKit ?

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

C# wrappers ?

Thanks

CastleSoft avatar Jul 23 '22 02:07 CastleSoft

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

chamons avatar Jul 25 '22 14:07 chamons

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

jimjams26 avatar Aug 22 '22 15:08 jimjams26

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 avatar Sep 01 '23 14:09 tipa

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?

tipa avatar Sep 01 '23 15:09 tipa

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.

rolfbjarne avatar Sep 01 '23 15:09 rolfbjarne

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

mlancione avatar Sep 01 '23 17:09 mlancione

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.

dalexsoto avatar Sep 01 '23 19:09 dalexsoto

@dalexsoto Thanks for the update. Much appreciated.

mlancione avatar Sep 01 '23 20:09 mlancione