Swiftpack.co -  Package - infinum/ios-collar
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
In-app analytics debugging tool
.package(url: "https://github.com/infinum/ios-collar.git", from: "1.0.1")


Version License Platform

Collar is a library which simplifies analytics debugging by showing events, screen views and user properties of your app as they happen.


  • Swift 5.1
  • Xcode 11.0
  • iOS 11.0


Collar is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Collar'



1. In your analytics manager add support for analytics collecting via Collar:
import Collar

// Events
AnalyticsCollectionManager.shared.log(event: "some_event", parameters: [
    "param1": "value1",
    "param2": "value2"

// User properties
AnalyticsCollectionManager.shared.setUserProperty("some_value", forName: "user_property_key")

// Screen views
AnalyticsCollectionManager.shared.track(screenName: "Home", screenClass: "HomeViewController")

IMPORTANT: Collar does NOT send out analytics data to remote services. This is left for the developer to solve in their own codebase, with Collar being simply a reflection of the current state of analytics data.

2. At the point where you want to display collected logs, you can just put the following line:
AnalyticsCollectionManager.shared.showLogs(from: viewController)
3. If you want to display popup every time event/user property/screen view is tracked, you can just use the following snippet:
// Also controllable from settings screen inside logs view
LogItemPopupQueue.shared.enabled = true
// Popup dismisses on tap or after defined number of seconds
LogItemPopupQueue.shared.showOnView = { UIApplication.shared.keyWindow }

If you would like to receive notifications when new logs are added to the list, your app can observe AnalyticsCollectionManager.Notification.didUpdateLogs notification.


Please make sure that AnalyticsCollectionManager and LogItemPopupQueue are not used in production builds. Best option would be not to include Collar in you production targets/configurations at all, for example:

pod 'Collar', :configurations => ['Development-release', 'Development-debug']


To run the example project, clone the repo, and run pod install from the Example directory first.


Filip Gulan, filip.gulan@infinum.com


Maintained and sponsored by Infinum.

Infinum logo


Collar is available under the MIT license. See the LICENSE file for more info.


Stars: 2
Last commit: 2 weeks ago

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