-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTaplyticsServiceAdapter.swift
44 lines (36 loc) · 1.07 KB
/
TaplyticsServiceAdapter.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import Foundation
/**
Adapter for the Taplytics iOS SDK.
# Useful links:
- https://docs.taplytics.com/docs/ios-sdk
- https://github.com/taplytics/taplytics-ios-sdk/blob/master/START.md
# Package example:
```
// swift-tools-version: 5.10
import PackageDescription
let package = Package(
name: "Example",
dependencies: [
.package(name: "Tracker", path: "./swift-event-tracker"),
.package(url: "https://github.com/taplytics/taplytics-ios-sdk", from: "4.0.0"),
],
targets: [
.target(name: "Example", dependencies: [.product(name: "Taplytics", package: "taplytics-ios-sdk"), "Tracker"]),
]
)
```
# Integration example:
```
import Taplytics
import Tracker
extension Taplytics: TaplyticsServiceAdapter {}
```
*/
// sourcery: AutoMockable
public protocol TaplyticsServiceAdapter {
static func hasUserOptedOutTracking() -> Bool
static func logEvent(_ eventName: String)
static func optOutUserTracking()
static func optInUserTracking()
static func setUserAttributes(_ attributes: [AnyHashable: Any]?)
}