This directory contains useful resources for getting gRPC C# to work on platforms that are not yet fully supported.
gRPC C# now has experimental support for Xamarin. See HelloworldXamarin for an example how to use it.
Starting from gRPC C# 2.34.x: in addition to the regular Grpc.Core
dependency, you will also
need to add Grpc.Core.Xamarin
dependency to your project (which has the mobile-specific builds of c# native extension library).
The Grpc.Core
and Grpc.Core.Xamarin
package versions must always match exactly for things to work.
Also note that the Grpc.Core.Xamarin
needs to be added to your *.Android
and *.iOS
projects
in order for the native library bindings to be registered correctly (see grpc#16250).
What's currently supported:
Xamarin.Android
- supported API level: Kitkat 4.4+ (= API level 19)
- supported ABIs:
armeabi-v7a
(vast majority of Android devices out there),arm64-v8a
(some newer Android devices),x86
(for emulator)
Xamarin.iOS
- supported architectures: armv7, arm64 (iPhone 6+) and x86_64 (iPhone simulator)
gRPC C# now has experimental support for Unity. Please try using gRPC with Unity and provide feedback!
How to test gRPC in a Unity project
-
Create a Unity project that targets .NET 4.x Equivalent (Edit -> Project Settings -> Player -> Configuration -> Scripting Runtime Version). gRPC uses APIs that are only available in .NET4.5+ so this is a requirement.
-
Download the latest development build of
grpc_unity_package.VERSION.zip
from daily builds -
Extract the
.zip
file in theAssets
directory in your Unity project -
Unity IDE will pick up all the bundled files and add them to project automatically. You should be able to use gRPC and Protobuf in your scripts from now on.
What's currently bundled in the grpc_unity_package
- Grpc.Core and its dependencies
- Google.Protobuf
- Precompiled native libraries for Linux, MacOS, Windows, Android and iOS.