Playtime
@objc
public final class Playtime : NSObject
The entry point of Adjoe Playtime SDK. This class provides methods to initialize the SDK and interact with it.
Note
The SDK is functional starting from iOS 14.0.-
initialize(userID:
sdkHash: uaNetwork: uaChannel: uaSubPublisherCleartext: uaSubPublisherEncrypted: placement: ) Initialize Playtime SDK.
Important
You must call this method before any other SDK APIs or they will throw.PlaytimeError.performingOperationBeforeSDKInitialized
.Declaration
Swift
@objc public static func initialize( userID: String?, sdkHash: String, uaNetwork: String?, uaChannel: String?, uaSubPublisherCleartext: String?, uaSubPublisherEncrypted: String?, placement: String? ) async throws
Parameters
userID
Publisher’s user ID.
sdkHash
SDK hash that you received from the Adjoe Monetize dashboard.
uaNetwork
User acquisition network where the user came from.
uaChannel
User acquisition channel where the user came from; e.g. video, offerwall.
uaSubPublisherCleartext
User acquisition sub ID in clear text where the user came from.
uaSubPublisherEncrypted
User acquisition sub ID in encrypted form where the user came from.
placement
The placement of the Playtime experience; e.g. “home screen”, “more options menu”.
-
Present a screen view with the Playtime catalog.
Declaration
Swift
@objc public static func showCatalog( options: PlaytimeOptions? ) async throws
Parameters
options
Options for the Playtime catalog.