PlaytimeStudio
@objcMembers
public final class PlaytimeStudio : NSObject
The entry point of Adjoe Playtime SDK in Studio version. This class provides methods to fetch campaigns and installed apps to show them in your custom UI.
Note
The SDK is functional starting from iOS 14.0.-
Get the list of offers that a user can install.
Declaration
Swift
public static func getCampaigns(options: PlaytimeOptions) async throws -> PlaytimeCampaignsResponse -
Get campaigns by the specified tokens.
Declaration
Swift
public static func getCampaigns(tokens: [String], options: PlaytimeOptions) async throws -> PlaytimeCampaignsResponse -
Get the list of apps the user has already installed and that will contain the progress the user has made already.
Declaration
Swift
public static func getInstalledCampaigns(options: PlaytimeOptions) async throws -> PlaytimeCampaignsResponse -
Use this method to forward the user to the store for an uninstalled app.
Declaration
Swift
public static func openInStore(campaign: PlaytimeCampaign) async throws -
Use this method to open installed application.
Declaration
Swift
public static func openInstalledCampaign(campaign: PlaytimeCampaign) async throws -
Get user’s permissions.
Declaration
Swift
public static func getPermissions() async throws -> PlaytimePermissionsResponse -
Show the prompt requesting user’s permissions.
Declaration
Swift
public static func showPermissionsPrompt() async throws -> PlaytimePermissionsResponse -
Register the user with Playtime. The RewardsConnect sheet will be displayed to the user and, on pressing Connect, the following scenarios are possible:
- If the user is not registered with Playtime, the user will be prompted to register a new passkey. This passkey will be stored on the user’s device (and may be synced to iCloud) and associated with the user’s Adjoe account.
- If the user is already registered with Playtime, but the SDK is not aware of it (e.g. when the app was deleted and reinstalled), the user will be prompted to log in with the passkey stored on the device. If the passkey is not present, the will be prompted to register a new passkey.
- The user has either registered the passkey or logged in successfully. Any subsequent call will return without error.
Important
The feature is currently available only for iOS 16.0 and later. If the feature is not available, the method will throwPlaytimeError.featureNotSupported.Declaration
Swift
public static func registerRewardsConnect() async throws -
Use this method when the user deleted their passkey to allow them to register a new one the next time
registerRewardsConnectis called.Declaration
Swift
public static func resetRewardsConnect() async throws
PlaytimeStudio Class Reference