-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathLocalyticsServiceAdapter.swift
46 lines (39 loc) · 1.24 KB
/
LocalyticsServiceAdapter.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
45
46
import Foundation
/**
Adapter for the Localytics SDK.
# Useful links:
- https://posthog.com/docs/libraries/ios
# 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/localytics/Localytics-swiftpm.git", from: "6.0.0")
],
targets: [
.target(name: "Example", dependencies: [.product(name: "Localytics", package: "Localytics-swiftpm"), "Tracker"]),
]
)
```
# Integration example:
```
import Localytics
import Tracker
extension Localytics: LocalyticsServiceAdapter {}
```
*/
// sourcery: AutoMockable
public protocol LocalyticsServiceAdapter {
static func tagEvent(_ eventName: String, attributes: [String: String]?)
static func tagScreen(_ screenName: String)
static func setLoggingEnabled(_ loggingEnabled: Bool)
static func setCustomerId( _ customerId: String?)
static func setValue(_ value: String?, forIdentifier:String)
static func isOptedOut() -> Bool
static func setOptedOut(_ optedOut: Bool)
static func isPrivacyOptedOut() -> Bool
static func setPrivacyOptedOut(_ optedOut: Bool)
}