Playtime

@objcMembers
public final class Playtime : NSObject

The entry point of adjoe Playtime SDK.

Note

The SDK is functional starting from iOS 14.0.
  • Initialize Playtime SDK.

    Warning

    If you don’t use auto-init, 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

    public static func showCatalog(
        options: PlaytimeOptions
    ) async throws

    Parameters

    options

    Options for the Playtime catalog.