All Collections
Adori SDK (Android & iOS)
Adori iOS SDK: Usage Instructions
Adori iOS SDK: Usage Instructions

Learn how to use Adori's iOS SDK with simple usage instructions. Maximize user engagement and revenue with customizable features.

Written by Adori Support
Updated over a week ago

All the steps in this page are mandatory for successful integration of the Adori iOS SDK.



1.1 Import the dependencies

1 2
import AdoriPlayerUI import AdoriAPIService

1.2 Conform to AdoriPlayerDelegate

1 2 3
class ViewController: UIViewController, AdoriPlayerDelegate { }

1.3 Setup Adori Player SDK configuration

  • Call setupSDK with the brand color and a secondary color

1 2 3 4 5 6
AdoriPlayer.shared.setupSDK( brandColor: "#808080", secondaryColor: "#FFFFFF", requiresPlayerView: *true*, parent: *self* )
  • Setup the conformance to the player delegate

AdoriPlayer.shared.playerDelegate = self
  • If you have a login setup, call the setUserId

If this is not set and the user clicks on an interaction, for eg. a like button etc, the user will be shown a snack bar with a message to login, handle in the showLogin() function when that happens

AdoriPlayer.shared.setUserId(userId: "user_XYZ")
  • When an episode is clicked, call the playEpisode with the below details

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
AdoriPlayer.shared.playEpisode( uid: "IRATvhWXzWyt3kT4", name: "The Candid Frame podcast: An interactive snippet", audioUrl: "", imageUrl: "", showName: "Adori Demos: Interactive Podcast Snippets", showImageThumbnailUrl: "", durationMillis: 119985, isLiked: *false*, isPlaylisted: *false*, startTime: 0, stopTime: -1, isBookmarkClip: *false*, parentVC: *self* )
Did this answer your question?