Swiftpack.co - fuziki/cronet-xcframework as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by fuziki.
fuziki/cronet-xcframework 105.0.5119-0
cronet-xcframework is xcframework wrapper for Cronet. Supports installation via Swift Package Manager.
⭐️ 0
🕓 1 week ago
.package(url: "https://github.com/fuziki/cronet-xcframework.git", from: "105.0.5119-0")

cronet-xcframework

Platform Language Swift Package Manager compatible Xcode

cronet-xcframework is xcframework wrapper for Cronet.
Supports installation via Swift Package Manager.

Cronet is the networking stack of Chromium put into a library for use on mobile.
This is the same networking stack that is used in the Chrome browser by over a billion people.
It offers an easy-to-use, high performance, standards-compliant, and secure way to perform HTTP requests.
https://chromium.googlesource.com/chromium/src/+/master/components/cronet

Warning
Cronet does not support bitcode.

Links

Installation

Add cronet-xcframework to a Package.swift manifest.

let package = Package(
    // ...
    dependencies: [
        .package(url: "https://github.com/fuziki/cronet-xcframework", exact: "104.0.5112-8"),
    ],
    targets: [
        .target(
            name: "MyLibrary",
            dependencies: [
                .product(name: "Cronet", package: "cronet-xcframework")
            ]),
    ]
)

Usage

Setup

Cronet.setQuicEnabled(true)

Cronet.start()

Cronet.registerHttpProtocolHandler() // setup for URLSession.shared
// ↑ or ↓
let configuration = URLSessionConfiguration.default
Cronet.install(into: configuration)

See Cronet.h↓ for more opsions.
https://chromium.googlesource.com/chromium/src/+/master/components/cronet/ios/Cronet.h

Request

let session = URLSession.shared
// ↑ or ↓
let session = URLSession(configuration: configuration)

let response: (Data, URLResponse) = try await session.data(from: url)

GitHub

link
Stars: 0
Last commit: 2 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

104.0.5112-22
2 days ago

current_version: 104.0.5112.22, channel: beta

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics