OpenAvikom / mr-grpc-unity

Use gRPC to send protocol buffer messages from and to Unity
16 stars 5 forks source link

Grpc on iOS #4

Open EricVoll opened 9 months ago

EricVoll commented 9 months ago

Hi all,

did anyone ever get grpc to compile for iOS?

I see that there are iOS runtime binaries, but I get tons of compilation errors in Unity. Happy to post more details, but I'd first like to know if it's supposed to be possible.

Cheers, Eric

aleneum commented 9 months ago

Hello @EricVoll,

we have never really tried to get GRPC running on iOS. The main target was HoloLens.

EricVoll commented 9 months ago

ok, thanks for letting me know.

Do you see any roadblocks ahead already, or is it worth a shot to debug it?

aleneum commented 9 months ago

Hello @EricVoll,

I cannot really give you a useful estimate here because I don't know what Unity does to port Apps to iOS. Compiling gPRC for Unity was not trivial though. For HL2 there is IL2CPP involved. It was crucial to check what can be transpiled from C# code and the linked DLLs to CPP. More recent versions of gRPC also require more recent .Net features that Unity does not provide (yet) as of my knowledge. Long story short: you might want to check whether someone provides a working version of gRPC for iOS and check whether this can be used with Unity somehow. There seems to be a Swift version [1] that might does the trick.

[1] https://github.com/grpc/grpc-swift