Richard Belleville 9964ae875b Bump master version to 1.38 (#25838) 4 rokov pred
..
GRPCClient 9964ae875b Bump master version to 1.38 (#25838) 4 rokov pred
ProtoRPC bac876eb1e Fix a typo s/training/trailing/ in ProtoRPC.h 5 rokov pred
RxLibrary 415d41f9e8 Rerun clang-formatter-7 5 rokov pred
examples 86050be0cf Clean up DEPLOYMENT_TARGET 5 rokov pred
manual_tests 86050be0cf Clean up DEPLOYMENT_TARGET 5 rokov pred
tests 9964ae875b Bump master version to 1.38 (#25838) 4 rokov pred
!ProtoCompiler-gRPCCppPlugin.podspec 9964ae875b Bump master version to 1.38 (#25838) 4 rokov pred
!ProtoCompiler-gRPCPlugin.podspec 9964ae875b Bump master version to 1.38 (#25838) 4 rokov pred
!ProtoCompiler.podspec 2fd9f5ead9 Update third_party/protobuf to v3.15.2 (#25565) 4 rokov pred
BUILD bef69db1a6 A bit of cleanup 5 rokov pred
BoringSSL-GRPC.podspec 26f85ca2d9 Update boringssl (#25564) 4 rokov pred
CronetFramework.podspec ccf3cbc6b7 Bump iOS and OSX version 5 rokov pred
NetworkTransitionBehavior.md 7a5288d2a0 Replace disrespectful words 4 rokov pred
README-CFSTREAM.md 9640aa3db8 Add FB number in the comment 5 rokov pred
README.md ccf3cbc6b7 Bump iOS and OSX version 5 rokov pred
change-comments.py e52081f903 More pythons to be formatted 5 rokov pred
format-all-comments.sh 7897ae9308 auto-fix most of licenses 8 rokov pred
grpc_objc_internal_library.bzl 06ecc87290 [bazel] Add fixes for --incompatible_load_proto_rules_from_bzl 5 rokov pred

README-CFSTREAM.md

Cocoapods

gRPC Objective-C with CFStream

gRPC now provides the option to use Apple's CFStream API (rather than TCP sockets) for networking. Using CFStream resolves a bunch of network connectivity transition issues (see the doc for more information).

CFStream integration is now in experimental state. You will need explicit opt-in to use it to get the benefits of resolving the issues above. We expect to make CFStream the default networking interface that gRPC uses when it is ready for production.

As of v1.21.0, CFStream integration is now the default networking stack being used by gRPC Objective-C on iOS layer. You get to use it automatically without special configuration needed. See below on how to disable CFStream in case of problem.

As of v1.23.0, CFStream is enabled by default on iOS for all wrapped languages. See below on how to disable CFStream in case of a problem.

Usage

If you use gRPC on iOS, CFStream is on automatically. If you use it on other platforms, you can turn it on with macro GRPC_CFSTREAM=1 for the pod 'gRPC-Core' and 'gRPC'. In case of problem and you want to disable CFStream on iOS, you can set environment variable "grpc_cfstream=0".

Caveats

It is known to us that the CFStream API has some bug (FB6162039) which will cause gRPC's CFStream networking layer to stall occasionally. The issue mostly occur on MacOS systems (including iOS simulators on MacOS); iOS may be affected too but we have not seen issue there. gRPC provides a workaround to this problem with an alternative poller based on CFRunLoop. The poller can be enabled by setting environment variable GRPC_CFSTREAM_RUN_LOOP=1. Note that the poller is a client side only poller that does not support running a server on it. That means if an app opts in to the CFRunLoop-based poller, the app cannot host a gRPC server (gRPC Objective-C does not support running a server but other languages running on iOS do support it).

Notes

  • Currently we do not support platforms other than iOS, although it is likely that this integration can run on MacOS targets with Apple's compiler.
  • Let us know if you meet any issue by filing issue and ping @stanleycheung.