I've been attempting to make grpc work (ssl http2) on Xamarin Forms and after some pain I managed to get it to work on Android using Grpc.Core. However I couldn't get iOS to compile. Working through this problem I was trying to get anything grpc related to work on iOS, and eventually found the grpc experimental xamarin demo, HelloworldXamarin. Found here:
https://github.com/grpc/grpc/tree/master/examples/csharp/HelloworldXamarin
I downloaded the solution, but when I try to compile it I get the following errors:
Error Text:
Native linking failed, undefined symbol: operator delete(void*). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Native linking failed. Please review the build log and the user flags provided to gcc: -LC:/g/examples/csharp/HelloworldXamarin/packages/Grpc.Core.2.23.0/build/Xamarin.iOS10/../../native/ios/universal -lgrpc_csharp_ext -force_load C:/g/examples/csharp/HelloworldXamarin/packages/Grpc.Core.2.23.0/build/Xamarin.iOS10/../../native/ios/universal/libgrpc_csharp_ext.a -LC:/g/examples/csharp/HelloworldXamarin/packages/Grpc.Core.2.23.0/build/Xamarin.iOS10/../../native/ios/universal -lgrpc -force_load C:/g/examples/csharp/HelloworldXamarin/packages/Grpc.Core.2.23.0/build/Xamarin.iOS10/../../native/ios/universal/libgrpc.a
linker command failed with exit code 1 (use -v to see invocation)
For the warning regarding not being able to find libgrpc_csharp_ext.a
, I verified that the file was there.
There appears to be some issue with native linking, which I am very unfamiliar with. I'm using nearly the latest Visual Studio (well, 16.5.3), a mac build host with latest OS and XCode updated to latest. Didn't make any changes to the files pulled from git. I only just started working with Xamarin iOS this week, so everything should be in a fairly "default" state.
What could be wrong with my setup/system that makes this not work? I understand that this is an experimental feature still, but I can't tell if I've done something stupid or if there's been some change in something (like XCode? or it needing VS 2017?) that makes this no longer work? Is anyone else able to get this example to compile?
I've also tried newer versions of the grpc nuget packages and that only resulted in more errors.
Ultimately I'm trying to get latest Grpc.Core to work in iOS on Xamarin.Forms, though I have very little experience working with iOS. If there are issues with the latest versions of XCode/Visual Studio/Grpc.Core that are causing this, I'm willing to try to work through them, if someone can point me in the right direction.