Questions tagged [grpc-swift]

grpc-swift is the official Swift gRPC client library.

For more information, see the grpc-swift GitHub repo.

16 questions
4
votes
0 answers

gRPC-Swift sometimes has GRPCStatus - Cancel

I'm new with gRPC and use pod gRPC-Swift version 1.0.0-alpha.21. Sometimes I have an error in my response - error.localizedDescription is "The operation couldn’t be completed. (GRPC.GRPCStatus error 1.)", I've noticed that errorCode = 1 means "The…
Artfire
  • 156
  • 10
1
vote
1 answer

EventLoopFuture causing `Invalid state: unable to write message`

I'm using grpc-swift and the ClientInterceptor to add an auth token to requests. I have implemented the delegate method for send as follows override func send(_ part: GRPCClientRequestPart, promise: EventLoopPromise<()>?, context:…
sbarow
  • 2,759
  • 1
  • 22
  • 37
1
vote
1 answer

grpc-swift: How to set timeout for an RPC in Swift?

I am using https://github.com/grpc/grpc-swift for inter-process communication. I have a GRPC server written in Go that listens on a unix domain socket, and a macOS app written in Swift that communicates with it over the socket. Let's say the Go…
fsctl
  • 161
  • 8
1
vote
0 answers

How to generate Swift files from proto that contain imports?

Let's say I have a .proto file located in /home/me/project/first/a.proto. And another proto file located in /home/me/project/second/b.proto. I want to be able to generate swift files from these proto. b.proto uses an import as follows: import…
Dulat A
  • 21
  • 2
1
vote
1 answer

React Native Native Module looping call until crash on iOS

I'm trying to build a gRPC client in React Native on iOS. For context: React Native, which doesn't support gRPC directly, must call a custom Native Module from Swift, which makes the gRPC call and returns the value. The gRPC server is a…
Adonis Gaitatzis
  • 3,189
  • 26
  • 24
1
vote
1 answer

RxSwift refreshToken use retry(when:)

I wrote such code for network request token refresh. enum NetworkingClient { private static func _makeUnaryCall( call maker: @escaping () -> UnaryCall
ripple_k
  • 15
  • 3
1
vote
1 answer

Automate the process of including generated proto files into an Xcode project

Our iOS app currently is using Google protobuffer gRPC as our API layer to communicate between App and backend. And so we have these .proto files in our backend directory which will be converting to .grpc.swift and .pb.swift files by…
Joshua
  • 3,055
  • 3
  • 22
  • 37
1
vote
0 answers

Cannot reconnect to gRPC server after client crashed

I did a lot of research but could not find a solution for my problem with gRPC: Summary; After my swift gRPC client application crashes, no gRPC client can connect to my gRPC Server anymore (see errors below) My Setup: I have a Swift frontend…
Timmy
  • 11
  • 2
1
vote
2 answers

GRPC-Swift Send HTTPProtocolVersion from Client

I'm trying GRPC-Swift for Client-Server application. I'm using GRPC-Swift for both Client and Server Client is an iPhone application, which I tried with iPhone Simulator. I followed this link for Client-side streaming RPC. When I send message to…
Vignesh
  • 3,571
  • 6
  • 28
  • 44
0
votes
0 answers

How to debug Swift gRPC client

I'm using gRPCs to communicate between the server and the client. I have a nodeJS server and a Swift client. I used this article to build my Swift client but I'm unable to talk to my nodeJS server on localhost. I was wondering if someone had ways to…
0
votes
1 answer

Swift Protobuf Codable Extension

We're using Swift Protobuf in a project that generates the message struct code (i.e. DTOs). It doesn't implement Codable and I'm trying to add Codable through an extension so that I can serialize them to disk when used inside a non-protobuf that…
Gary Rudolph
  • 1,062
  • 9
  • 21
0
votes
0 answers

grpc-swift: How to set logger for an RPC in Swift?

I am using https://github.com/grpc/grpc-swift for inter-process communication. I have a GRPC server, and a iOS app written in Swift that communicates with it over the socket. Let's say the Go server process is not running and I make an RPC call from…
tp2376
  • 690
  • 1
  • 7
  • 23
0
votes
0 answers

What about my Swift-NIO-SSL handshake is failing?

I am trying to figure out what about my TLS handshake is failing. I am not exactly sure what this error code means. Can someone provide more context here? 2000-00-00T00:00:00-0000 error [[GRPC-LOGG]] :…
wizeOnes
  • 119
  • 16
0
votes
1 answer

How to build Swift gRPC with OpenSSL (or SSL provider other than BoringSSL)

Currently working on a project that uses Swift-gRPC; which uses BoringSSL. I would like to know if it is possible to use a custom SSL Provider, such as OpenSSL. I found this post that allows you to specify an SSL provider for the gRPC C++ library. I…
wizeOnes
  • 119
  • 16
0
votes
2 answers

How to add PATH to ClientConnection gRPC?

I am using grpc to communicate with the server. I create connection using let channel = ClientConnection .secure (group: MultiThreadedEventLoopGroup (numberOfThreads: 10)) .connect (host: "testHost.com", port:…
sergey_s
  • 113
  • 11
1
2