• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[![Cocoapods](https://img.shields.io/cocoapods/v/gRPC.svg)](https://cocoapods.org/pods/gRPC)
2# gRPC Objective-C with CFStream
3
4gRPC Objective-C library now provides the option to use Apple's CFStream API (rather than TCP
5sockets) for networking. Using CFStream resolves a bunch of network connectivity transition issues
6(see the [doc](https://github.com/grpc/grpc/blob/master/src/objective-c/NetworkTransitionBehavior.md)
7for more information).
8
9CFStream integration is now in experimental state. You will need explicit opt-in to use it to get
10the benefits of resolving the issues above. We expect to make CFStream the default networking
11interface that gRPC uses when it is ready for production.
12
13## Usage
14If you use gRPC following the instructions in
15[README.md](https://github.com/grpc/grpc/blob/master/src/objective-c/README.md):
16- Replace the
17dependency on `gRPC-ProtoRPC` with `gRPC-ProtoRPC/CFStream`.
18- Enable CFStream with environment variable `grpc_cfstream=1`. This can be done either in Xcode
19  console or by your code with `setenv()` before gRPC is initialized.
20
21If your project directly depends on podspecs other than `gRPC-ProtoRPC` (e.g. `gRPC` or
22`gRPC-Core`):
23
24- Make your projects depend on subspecs corresponding to CFStream in each gRPC podspec.
25- Enable CFStream with environment variable `grpc_cfstream=1`. This can be done either in Xcode
26  console or by your code with `setenv()` before gRPC is initialized.
27
28## Notes
29
30- Currently we do not support platforms other than iOS, although it is likely that this integration
31  can run on MacOS targets with Apple's compiler.
32- Let us know if you meet any issue by filing issue and ping @muxi.
33