-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathHeapServiceAdapter.swift
43 lines (36 loc) · 1.04 KB
/
HeapServiceAdapter.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
import Foundation
/**
Adapter for the Heap iOS SDK.
# Useful links:
- https://github.com/heap/heap-ios-sdk
# 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/heap/heap-ios-sdk", from: "9.0.0"),
],
targets: [
.target(name: "Example", dependencies: [.product(name: "Heap", package: "heap-ios-sdk"), "Tracker"]),
]
)
```
# Integration example:
```
import Heap
import Tracker
extension Heap: HeapServiceAdapter {}
```
*/
// sourcery: AutoMockable
public protocol HeapServiceAdapter {
static func setTrackingEnabled(_ trackingEnabled: Bool)
static func isTrackingEnabled() -> Bool
static func identify(_ identity: String)
static func addUserProperties(_ properties: [String: Any])
static func track( _ event: String, withProperties properties: [AnyHashable: Any]?)
static func resetIdentity()
}