This module is only intended for internal use at TIDAL, but feel free to look at the code.
Event Producer is an events transportation layer of the TIDAL Event Platform (TEP). Its responsibility is to make sure that events get transported to the backend as fast, secure, and reliable as possible.
- Sending events in batches.
- Filtering events based on the provided blocked consent categories list.
- Collecting and sending monitoring data about dropped events.
- Notifying about the Outage.
- Read the documentation for a detailed overview of the player functionality.
- Check the API documentation for the module classes and methods.
- Visit our TIDAL Developer Platform for more information and getting started.
Add the dependency to your existing Package.swift
file.
dependencies: [
.package(url: "https://tidal-music.github.io/tidal-sdk-ios", from: "<VERSION>"))
]
- Select
"File » Add Packages Dependencies..."
and enter the repository URLhttps://github.com/tidal-music/tidal-sdk-ios
into the search bar (top right). - Set the Dependency Rule to
"Up to next major"
, and the version number to that you want. - When
"Choose Package Products for tidal-sdk-ios"
appears, make sure to add the EventProducer libary to your target.
The EventSender role exposes functionality for sending events and monitoring the status of the transportation layer. It is exposed through it's shared
singleton instance and is setup by providing appropriate configuration and CredentialsProvider.
let config: EventConfig = .init(
credentialsProvider: credentialsProvider,
maxDiskUsageBytes: 1000000,
blockedConsentCategories: [ConsentCategory.performance]
)
let eventSender = TidalEventSender.shared
eventSender.config(config)
eventSender.sendEvent(
name: "click_button",
consentCategory: ConsentCategory.performance,
headers: ["client-id": "45678"]
payload: "{'buttonId':'123'}",
)
eventSender.setBlockedConsentCategories([ConsentCategory.targeting])
Not yet implemented