-
Notifications
You must be signed in to change notification settings - Fork 667
CocoaPods specs out of date #2393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm afraid we dropped Cocoapods support in 2.40.0. |
rebello95
added a commit
to connectrpc/connect-swift
that referenced
this issue
Mar 28, 2023
## Summary This PR introduces support for the vanilla gRPC protocol by providing a new `ConnectNIO` library which utilizes `SwiftNIO` (which provides support for trailers) to expose a new `.grpc` extension on `NetworkProtocol`. Note that this new library is not available through CocoaPods because [SwiftNIO no longer supports CocoaPods](apple/swift-nio#2393). ## Details - In order to avoid requiring consumers who are using the Connect or gRPC-Web protocols to depend on `SwiftNIO`, a new `ConnectNIO` module is being introduced alongside the existing `Connect` module. This means that existing Connect/gRPC-Web users do not need to include this new dependency. - This module contains a new `NIOHTTPClient` type which wraps `SwiftNIO` concepts and conforms to `Connect.HTTPClientInterface`. - The `ConnectNIO` module also contains logic to support gRPC, which is exposed as an extension on `NetworkProtocol` (demonstrated below). - Consumers who want to use the NIO-based HTTP implementation with other protocols can accomplish this by including `ConnectNIO` and replacing `URLSessionHTTPClient` usage with `NIOHTTPClient`. ## Example The Eliza Swift Package Manager example has been updated to include support for gRPC using the `NIOHTTPClient`. Using gRPC with generated Connect clients is as easy as adding an import and making a 2-line change: ``` import Connect import ConnectNIO // Include NIO and gRPC support ... let protocolClient = ProtocolClient( httpClient: NIOHTTPClient(host: "https://demo.buf.build"), // Use NIO config: ProtocolClientConfig( host: "https://demo.buf.build", networkProtocol: .grpc, // Use gRPC codec: ProtoCodec() ) ) ``` ## Binary size impact **There is no binary size impact on clients that only include the `Connect` library.** When including `ConnectNIO`, `SwiftNIO` dependencies get compiled in, resulting in a ~2.1MB increase on an unstripped `.ipa`. For example: - Eliza app with `Connect`: 699KB - Eliza app with `ConnectNIO`: 2.8MB ## Testing The suite of crosstests has been updated to run a matrix of tests which include: - Connect + (JSON & Proto binary) using (`URLSessionHTTPClient` & `NIOHTTPClient`) - gRPC-Web + (JSON & Proto binary) using (`URLSessionHTTPClient` & `NIOHTTPClient`) - gRPC + (JSON & Proto binary) using (`NIOHTTPClient`)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The podspecs for several NIO libraries are a few versions out of date:
It looks like this has happened before (#1017, #1390, #2052) - would it make sense to automate this and/or make it part of the release process?
Thanks!
The text was updated successfully, but these errors were encountered: