Swiftpack.co - Q42/Q42Stats as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Q42.
Q42/Q42Stats v1.0.1
Project to gather some statistics around how platform features are used
⭐️ 1
🕓 23 hours ago
.package(url: "https://github.com/Q42/Q42Stats.git", from: "v1.0.1")


Collect stats for Q42 internal usage, shared accross multiple iOS projects.


  1. Use SPM or CocoaPods to add Q42Stats into your iOS project
  2. Implement your configuration and a SHA256 implementation (see reference implementations below)
  3. Include stats collection & submission in your AppDelegate/WindowSceneDelegate like so:
Q42Stats(options: .all)
  .collect(window: window, completion: Q42Stats.submit(configuration: .myApp))

Note: Make sure you have the correct consent from the user before you call .collect().


Add to your Podfile the following line:

pod 'Q42Stats', git: 'https://github.com/Q42/Q42Stats.git'

Also make sure you require iOS 11 or higher as the minimum target using: platform :ios, '11.0'

Swift Package Manager

Add this repo as a dependency through Xcode: https://github.com/Q42/Q42Stats.git

Reference implementations

Example configuration implementation

extension Q42Stats.Configuration {
  static let myApp = Q42Stats.Configuration(
    apiKey: "secret",
    firestoreCollection: "somecollection",
    minimumSubmitInterval: 60*60*24*7.5


Stars: 1
Last commit: 23 hours ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

23 hours ago

Accessibility pipeline

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