Skip to content

SRGSSR/srgnetwork-apple

Repository files navigation

SRG Network logo

GitHub releases platform SPM compatible GitHub license

About

Built on top of NSURLSession, this library provides a concise, consistent formalism to create and manage network requests.

Unlike most network libraries, SRG Network focuses on common issues surrounding the use of network connections:

  • Convenient and simple management of multiple requests, whether they are performed in parallel or in cascade.
  • Simple formalism to be notified when a request or group of requests is active or inactive.
  • Proper cancellation of requests.

Compatibility

The library is suitable for applications running on iOS 12, tvOS 12, watchOS 5 and above. The project is meant to be compiled with the latest Xcode version.

Contributing

If you want to contribute to the project, have a look at our contributing guide.

Integration

The library must be integrated using Swift Package Manager directly within Xcode. You can also declare the library as a dependency of another one directly in the associated Package.swift manifest.

Usage

When you want to use classes or functions provided by the library in your code, you must import it from your source files first. In Objective-C:

@import SRGNetwork;

or in Swift:

swift SRGNetwork

Working with the library

To learn about how the library can be used, have a look at the getting started guide.

License

See the LICENSE file for more information.