A Swift Package usable for HTTP logging and passing analytics to a third-party SDK, also included is an abstraction class for using Google's Firebase analytics platform.
To use this Logging package in a project using Swift Package Manager:
- Add the following line to the dependencies in your
Package.swiftfile:
.package(url: "https://github.com/govuk-one-login/mobile-ios-logging", from: "1.0.0"),- Add any of
Logging,GAnalytics,HTTPLoggingand/orGDSAnalyticsas a dependencies for your target:
.target(name: "MyTarget", dependencies: [
.product(name: "Logging", package: "di-mobile-ios-logging"),
.product(name: "GAnalytics", package: "di-mobile-ios-logging"),
.product(name: "HTTPLogging", package: "di-mobile-ios-logging"),
.prodcut(name: "GDSAnalytics", package: "di-mobile-ios-logging")
]),- Add
import Logging,import GAnalytics,import HTTPLoggingand/orimport GDSAnalyticsinto your source code where necessary.
For individual descriptions of the modules in this package, head to the README files for each: