GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

Methods and parameters - iOS

Global static methods for iOS

Viewer ID

setExternalUserId

Sets the viewer ID for the current viewer. Pass nil to clear it, which makes the viewer anonymous. See Viewer ID specifications.

func setExternalUserId(_ externalUserId: String?, completion: BlazeResultBlock? = nil)

Content localization

setPreferredLanguage

Set preferred language for content localization.

Parameters:

  • preferredLanguage: Preferred language code (e.g., "en", "es", "es-MX"). Pass nil to remove the preferred language setting.

Note:

Empty strings are considered as nil and will reset the preferred language. The provided parameter is trimmed before being set.

func setPreferredLanguage(_ preferredLanguage: String?)

User Activity

disableUserActivity

A public Boolean value on Blaze.shared that determines whether the SDK syncs user activity data.
When true, all user activity periodic sync tasks are stopped and sync operations are skipped.
When toggled back to false, the periodic tasks are restarted immediately.
false by default, meaning user activity is synced normally.

📘

Note

User activity sync is automatically skipped for anonymous users (when no externalUserId is set), regardless of this property.

var disableUserActivity: Bool

clearLocalUserActivity

Clears all locally stored user activity data.

Does not affect remote data and does not make any API calls.

Data cleared includes: viewed story pages, viewed moments, viewed videos, liked moments, liked videos, and interactions.

func clearLocalUserActivity()

Stories

playStory

Plays a story with the specified story ID using the playStory method.

Parameters:

  • storyId: The ID of the story to be played.
  • pageId: The ID of the page in the story to start from
  • style: An instance of BlazeStoryPlayerStyle which determines the style of a story component, default will take the global style.
  • triggerSource: The source from which the content is triggered. default is entryPoint.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: Optional completion closure called when the story will start playing. It provides a Result object with a Void success value on success or an Error on failure.
playStory(_ storyId: String, pageId: String? = nil, sourceId: String? = nil, style: BlazeStoryPlayerStyle? = nil, triggerSource: BlazeEntryPointTriggerSource = .entryPoint, completion: BlazeResultBlock? = nil)

playStories

Plays stories for a specific dataSource type.

This method plays the stories for the provided dataSourceType, which is built using BlazeDataSourceType.

Parameters:

  • dataSourceType: BlazeDataSourceType to filter the stories.
  • entryContentId: Optional content ID to be displayed first in the player. This can be an additional content item that may not be part of the content defined by the dataSourceType. Note: This parameter is also used as part of the cache key for prepared content. Preparing content with nil and then playing with a specific entryContentId will result in a new fetch instead of using prepared elements.
  • style: An instance of BlazeStoryPlayerStyle which determines the style of a stories component. default will take the global style.
  • shouldOrderContentByReadStatus: Whether to order the content by read status, displaying unread items first. Default is true.
  • triggerSource: The source from which the content is triggered. default is entryPoint.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: Optional completion closure called when the stories are played. It provides a Result object with a Void success value on success or an Error on failure.
func playStories(dataSourceType: BlazeDataSourceType,
								 entryContentId: String? = nil,
								 style: BlazeStoryPlayerStyle? = nil,
                 shouldOrderContentByReadStatus: Bool = true,
                 triggerSource: BlazeEntryPointTriggerSource = .entryPoint,
								 sourceId: String? = nil
                 completion: BlazeResultBlock? = nil)

prepareStories

Prepares and loads stories for a specific dataSource type.

his method prepares and loads stories for the provided dataSourceType, which is built using BlazeDataSourceType.

Parameters:

  • dataSourceType: BlazeDataSourceType to filter the stories.
  • entryContentId: Optional content ID to be displayed first in the player. This can be an additional content item that may not be part of the content defined by the dataSourceType. Note: This parameter is also used as part of the cache key for prepared content. Preparing content with nil and then playing with a specific entryContentId will result in a new fetch instead of using prepared elements.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: Optional completion closure called when the stories are prepared and loaded. It provides a Result object with a Void success value on success or an Error on failure.
func prepareStories(dataSourceType: BlazeDataSourceType,
									  entryContentId: String? = nil, sourceId: String? = nil,
										completion: BlazeResultBlock? = nil)

setDefaultStoryPlayerStyle

Global method to set the story's player default style.

Parameters:

  • storyStyle: An instance of BlazeStoryPlayerStyle which determines the overall style of a story component.
func setDefaultStoryPlayerStyle(_ storyStyle: BlazeStoryPlayerStyle)

getDefaultStoryPlayerStyle

Global method to get the story player default style.

func getDefaultStoryPlayerStyle() -> BlazeStoryPlayerStyle

Moments

playMoment

Plays a moment with the specified moment ID.

Parameters:

  • momentId: The ID of the moment to be played.
  • style: An instance of BlazeMomentsPlayerStyle which determines the style of a moments component. default will take the global style.
  • triggerSource: The source from which the content is triggered. default is entryPoint.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: Optional completion closure called when the moment starts playing. It provides a Result object with a Void success value on success or an Error on failure.
func playMoment(for momemtId: String,
								style: BlazeMomentsPlayerStyle? = nil,
								sourceId: String? = nil,
                triggerSource: BlazeEntryPointTriggerSource = .entryPoint,
                completion: BlazeResultBlock?)

playMoments

Plays moments for a specific dataSource type.

This method plays the moments for the provided dataSourceType, which is built using BlazeDataSourceType.

Parameters:

  • dataSourceType: BlazeDataSourceType to filter the moments.
  • entryContentId: Optional content ID to be displayed first in the player. This can be an additional content item that may not be part of the content defined by the dataSourceType. Note: This parameter is also used as part of the cache key for prepared content. Preparing content with nil and then playing with a specific entryContentId will result in a new fetch instead of using prepared elements.
  • style: An instance of BlazeMomentsPlayerStyle which determines the style of a moments component. default will take the global style.
  • playbackConfiguration: An instance of BlazeMomentsPlaybackConfiguration which determines the playback behavior of moments components. Controls loop behavior and playback settings. default will take the global playback configuration.
  • shouldOrderContentByReadStatus: Whether to order the content by read status, displaying unread items first. Default is true.
  • triggerSource: The source from which the content is triggered. default is entryPoint.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: Optional completion closure called when the moments are played. It provides a Result object with a Void success value on success or an Error on failure.
func playMoments(dataSourceType: BlazeDataSourceType,
								 entryContentId: String? = nil,
								 style: BlazeMomentsPlayerStyle? = nil,
								 playbackConfiguration: BlazeMomentsPlaybackConfiguration? = nil,
								 sourceId: String? = nil,
                 shouldOrderContentByReadStatus: Bool = true,
                 triggerSource: BlazeEntryPointTriggerSource = .entryPoint,
                 completion: BlazeResultBlock? = nil)

prepareMoments

Prepares and loads moments for a specific dataSource type.

This method prepares and loads moments for the provided dataSourceType, which is built using BlazeWidgetLabel.

Parameters:

  • dataSourceType: BlazeDataSourceType to filter the moments.
  • entryContentId: Optional content ID to be displayed first in the player. This can be an additional content item that may not be part of the content defined by the dataSourceType. Note: This parameter is also used as part of the cache key for prepared content. Preparing content with nil and then playing with a specific entryContentId will result in a new fetch instead of using prepared elements.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: Optional completion closure called when the moments are prepared and loaded. It provides a Result object with a Void success value on success or an Error on failure.
func prepareMoments(dataSourceType: BlazeDataSourceType,
										entryContentId: String? = nil,	
									  sourceId: String? = nil,
										completion: BlazeResultBlock? = nil)

setDefaultMomentsPlayerStyle

Global method to set the moments appearance.

Parameters:

  • momentsStyle: An instance of BlazeMomentsPlayerStyle which determines the overall style of a moment component.
func setDefaultMomentsPlayerStyle(_ momentsStyle: BlazeMomentsPlayerStyle)

getDefaultMomentsPlayerStyle

Global method to get the moments player default style.

func getDefaultMomentsPlayerStyle() -> BlazeMomentsPlayerStyle

setDefaultMomentsPlaybackConfiguration

Global method to set the moments player's default playback configuration.

Parameters:

  • playbackConfiguration: An instance of BlazeMomentsPlaybackConfiguration which determines the playback behavior of moments components.
func setDefaultMomentsPlaybackConfiguration(_ playbackConfiguration: BlazeMomentsPlaybackConfiguration)

Example:

// Create and customize playback configuration
var playbackConfig = BlazeMomentsPlaybackConfiguration.base()
playbackConfig.loopBehavior = .loopAndAdvance(numberOfPlays: 3)

// Set as global default
Blaze.shared.setDefaultMomentsPlaybackConfiguration(playbackConfig)

getDefaultMomentsPlaybackConfiguration

Global method to get the moments player's default playback configuration.

func getDefaultMomentsPlaybackConfiguration() -> BlazeMomentsPlaybackConfiguration

Example:

// Get the current default configuration
let currentConfig = Blaze.shared.getDefaultMomentsPlaybackConfiguration()
print("Loop behavior: \(currentConfig.loopBehavior)")
📘

Global configuration is overriden when passed to specific domains like Widgets, playMoments, and BlazeMomentsPlayerContainerTabs.

Videos

playVideo

Plays a video with the specified video ID.

Parameters:

  • videoId: The ID of the video to be played.
  • style: An instance of BlazeVideosPlayerStyle which determines the style of a video component. default will take the global style.
  • playbackConfiguration: An instance of BlazeVideosPlaybackConfiguration which determines the playback configuration options for a video component. default will take the global configuration.
  • triggerSource: The source from which the content is triggered. default is entryPoint.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: Optional completion closure called when the video will start playing. It provides a Result object with a Void success value on success or an Error on failure.
func playVideo(for videoId: String,
               sourceId: String? = nil,
               style: BlazeVideosPlayerStyle? = nil,
               playbackConfiguration: BlazeVideosPlaybackConfiguration? = nil,
               triggerSource: BlazeEntryPointTriggerSource = .entryPoint,
               completion: BlazeResultBlock?)

Example:

// Play a video with custom playback configuration
var playbackConfig = BlazeVideosPlaybackConfiguration.base()
playbackConfig.multiAspectRatio = true
playbackConfig.shouldOpenInLandscape = true

Blaze.shared.playVideo(
    for: "video123",
    playbackConfiguration: playbackConfig,
    completion: { result in
        switch result {
        case .success:
            print("Video started playing")
        case .failure(let error):
            print("Failed to play video: \(error)")
        }
    }
)

playVideos

Plays videos for a specific dataSource type.

This method plays the videos for the provided dataSourceType, which is built using BlazeDataSourceType.

Parameters:

  • dataSourceType: BlazeDataSourceType to filter the videos.
  • entryContentId: Optional content ID to be displayed first in the player. This can be an additional content item that may not be part of the content defined by the dataSourceType. Note: This parameter is also used as part of the cache key for prepared content. Preparing content with nil and then playing with a specific entryContentId will result in a new fetch instead of using prepared elements.
  • style: An instance of BlazeVideosPlayerStyle which determines the style of a videos component. default will take the global style.
  • playbackConfiguration: An instance of BlazeVideosPlaybackConfiguration which determines the playback configuration options for a video component. default will take the global configuration.
  • shouldOrderContentByReadStatus: Whether to order the content by read status, displaying unread items first. Default is true.
  • triggerSource: The source from which the content is triggered. default is entryPoint.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: Optional completion closure called when the videos are played. It provides a Result object with a Void success value on success or an Error on failure.
func playVideos(dataSourceType: BlazeDataSourceType, 
                entryContentId: String? = nil,
                sourceId: String? = nil,
                style: BlazeVideosPlayerStyle? = nil,
                playbackConfiguration: BlazeVideosPlaybackConfiguration? = nil,
                shouldOrderContentByReadStatus: Bool = true,
                triggerSource: BlazeEntryPointTriggerSource = .entryPoint,
                completion: BlazeResultBlock? = nil)

Example:

// Play videos with custom playback configuration
var playbackConfig = BlazeVideosPlaybackConfiguration.base()
playbackConfig.multiAspectRatio = true
playbackConfig.shouldOpenInLandscape = false

Blaze.shared.playVideos(
    dataSourceType: .labels(.singleLabel("highlights")),
    playbackConfiguration: playbackConfig,
    shouldOrderContentByReadStatus: true,
    completion: { result in
        switch result {
        case .success:
            print("Videos started playing")
        case .failure(let error):
            print("Failed to play videos: \(error)")
        }
    }
)

prepareVideos

Prepares and loads videos for a specific dataSource type.

This method prepares and loads videos for the provided dataSourceType, which is built using BlazeDataSourceType.

Parameters:

  • dataSourceType: BlazeDataSourceType to filter the videos.
  • entryContentId: Optional content ID to be displayed first in the player. This can be an additional content item that may not be part of the content defined by the dataSourceType. Note: This parameter is also used as part of the cache key for prepared content. Preparing content with nil and then playing with a specific entryContentId will result in a new fetch instead of using prepared elements.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: Optional completion closure called when the videos are prepared and loaded. It provides a Result object with a Void success value on success or an Error on failure.
func prepareVideos(dataSourceType: BlazeDataSourceType,
                   entryContentId: String? = nil,
                   sourceId: String? = nil,
									 completion: BlazeResultBlock? = nil)

setDefaultVideosPlayerStyle

Global method to set the videos player default style.

Parameters:

  • videosStyle: An instance of BlazeVideosPlayerStyle which determines the overall style of a video component.
func setDefaultVideosPlayerStyle(_ videosStyle: BlazeVideosPlayerStyle)

getDefaultVideosPlayerStyle

Global method to get the videos player default style.

func getDefaultVideosPlayerStyle() -> BlazeVideosPlayerStyle

Players

dismissPlayer

Dismisses the current playing player if exists.

func dismissCurrentPlayer()

pauseCurrentPlayer

Pauses the currently playing player if it is active.
This method does not dismiss the player; it simply pauses playback, allowing for later resumption.

func pauseCurrentPlayer()

resumeCurrentPlayer

Resumes playback of the currently paused player, if any.
If the player is not currently paused, this method has no effect.

func resumeCurrentPlayer()

setPlayerSoundState

Sets the sound state for playback of Stories, Moments, and Videos.

Parameters:

  • state: Pass .mute to mute playback, or .unmute to unmute.

Note: This value is not persisted by the SDK. The hosting app is responsible for re-applying it on each launch.

func setPlayerSoundState(_ state: BlazePlayerSoundState)

Example:

Blaze.shared.setPlayerSoundState(.mute)
Blaze.shared.setPlayerSoundState(.unmute)

appendMomentsToPlayer

Appends additional moments content to an existing moments player.

This method allows you to dynamically add more moments to a currently playing moments player
by specifying the sourceId that the player was initialized with. The appended content will appear
at the end of the current moments playlist.

Parameters:

  • sourceId: The unique identifier of the player to append content to. This must match the sourceId used when the player was created. Available sourceId options:

    • Entry Point Players: Custom sourceId passed to playMoments(sourceId:...) or similar methods
    • Widget Players: The widget's widgetIdentifier property value
    • Container Players: The container's containerIdentifier value
    • Container Tab Players: Pattern "containerSourceId_tabId" (e.g., "main-container_trending-tab")
  • dataSourceType: The type of data source to fetch and append (e.g., trending, recommendations, specific IDs).

  • shouldOrderContentByReadStatus: Whether to order the appended content by read status, displaying unread items first. Default is true.

  • completion: Optional completion closure called when the append operation completes. Provides success or failure result.

Note:

This method only works with active moments players that have been initialized with a sourceId.
The player must be currently active for the append operation to take effect.

func appendMomentsToPlayer(sourceId: String,
                                     dataSourceType: BlazeDataSourceType,
                                     shouldOrderContentByReadStatus: Bool = false,
                                     completion: BlazeResultBlock? = nil)

Example usage:

// Entry Point Player: Append to custom sourceId
Blaze.shared.appendMomentsToPlayer(
    sourceId: "main-moments-feed",
    dataSourceType: .recommendations(.trending),
    shouldOrderContentByReadStatus: true,
    completion: { result in
        print("Appended to entry point player: \(result)")
    }
)

// Widget Player: Append to widget using its identifier  
Blaze.shared.appendMomentsToPlayer(
    sourceId: myWidget.widgetIdentifier,
    dataSourceType: .ids(["moment1", "moment2"]),
    completion: { result in
        print("Appended to widget player: \(result)")
    }
)

// Container Tab Player: Append to specific tab
Blaze.shared.appendMomentsToPlayer(
    sourceId: "trending-container_highlights-tab",
    dataSourceType: .labels(highlightsLabel),
    shouldOrderContentByReadStatus: false,
    completion: { result in
        print("Appended to tab player: \(result)")
    }
)

showSearchScreen

Launches the Blaze search screen, providing a full-screen search experience with suggestions and search results across all content types (Stories, Moments, and Videos).

Parameters:

  • searchParams: Optional configuration parameters for the search screen (BlazeSearchScreenParams). Pass nil to open the search screen without a suggestions grid. See BlazeSearchScreenParams for details.
  • completionBlock: Optional completion closure called when the search screen is launched. It provides a BlazeResult success value on success or an error on failure.
func showSearchScreen(
    searchParams: BlazeSearchScreenParams?,
    completionBlock: BlazeResultBlock? = nil
)

Example:

Blaze.shared.showSearchScreen(
    searchParams: BlazeSearchScreenParams(
        suggestionsDataSource: .labels(.singleLabel("your-label"))
    )
) { result in
    switch result {
    case .success:
        break
    case .failure(let error):
        print("Search screen error: \(error)")
    }
}

Universal Links

canHandleUniversalLink

This method takes a universal link string, processes it and indicates if it can be handled by the SDK.

Parameters:

  • link: A string representing the universal link URL to be handled.
  • Returns: true if the SDK can handle the link, otherwise returns false.

Note: This method can be used to determine whether the SDK can handle a given link, returning the result synchronously, before calling handleUniversalLink(_ link: completion:).

func canHandleUniversalLink(_ link: String) -> Bool

handleUniversalLink

Handles a universal link URL.

This method takes a universal link URL as a string, processes it and optionally returns a result via a completion handler.

Parameters:

  • link: A string representing the universal link URL to be handled.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: An optional completion handler that's called when the universal link is finished processing.

The completion handler takes a parameter that indicates whether the processing was successful, or contains an error if there was a failure.

The link parameter should be a string representing a valid universal link URL. If the string isn't a valid URL, the method will return an error via the completion handler.

The completion handler is a closure that takes a parameter of type BlazeResultBlock. This parameter represents the result of processing the universal link:

  • If the processing was successful, the result should be .success.
  • If there was an error, the result should be .failure with an associated error object.

The completion handler is optional. If you don't provide one, the method will process the universal link but won't provide a success or failure result.

func handleUniversalLink(_ link: String, sourceId: String? = nil, completion: BlazeResultBlock? = nil)

Notifications

canHandlePushNotification

This method takes a notification's payload, processes it and indicates if it can be handled by the SDK.

Parameters:

  • payload: A dictionary representing the payload to be handled. The keys and values are specific to the notification's data structure.
  • Returns: true if the SDK can handle the notification's payload, otherwise returns false.

Note: This method can be used to determine whether the SDK can handle a given payload, returning the result synchronously, before calling handlePushNotificationPayload(_ payload: completion:).

func canHandlePushNotification(_ payload: [String: Any]) -> Bool

handlePushNotificationPayload

Handles a notification's payload (user info).

This method takes a dictionary representing the payload of a notification, processes it, and optionally returns a result via a completion handler.

Parameters:

  • payload: A dictionary representing the payload to be handled. The keys and values are specific to the notification's data structure.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: An optional completion handler that's called when the user info is finished processing.

The completion handler takes a parameter that indicates whether the processing was successful, or contains an error if there was a failure.

The completion handler is a closure that takes a parameter of type BlazeResultBlock. This parameter represents the result of processing the payload:

  • If the processing was successful, the result should be .success.
    • If there was an error, the result should be .failure with an associated error object.

The completion handler is optional. If you don't provide one, the method will process the notification's payload but won't provide a success or failure result.

func handlePushNotificationPayload(_ payload: [String: Any], sourceId: String? = nil, completion: BlazeResultBlock? = nil)

handleNotificationValue

Handles a notification value.

This method takes a json as a string, processes it and optionally returns a result via a completion handler.

Parameters:

  • blazeNotificationBody: A string representing the value of the notification to be handled.
  • sourceId: An optional entry point identifier for tracking delegate context. This value will be available in the sourceId field of delegate methods.
  • completion: An optional completion handler that's called when the value of the notification finished processing.

The completion handler takes a parameter that indicates whether the processing was successful, or contains an error if there was a failure.

The completion handler is a closure that takes a parameter of type BlazeResultBlock. This parameter represents the result of processing the payload:

  • If the processing was successful, the result should be .success.
    • If there was an error, the result should be .failure with an associated error object.

The completion handler is optional. If you don't provide one, the method will process the notification's payload but won't provide a success or failure result.

func handleNotificationValue(_ blazeNotificationBody: String, sourceId: String? = nil, completion: BlazeResultBlock? = nil)

Geo location restrictions

updateGeo

Updates the geographic location which affects content Geo-blocking. This value overrides the default IP-based country detection and becomes the effective country used for evaluation.

This method updates or removes the geo restriction based on the provided geo location code.

Parameters:

  • countryCode: A string representing the country code to set as the geographic location. Pass nil to remove any existing geographic location.

Throws:

  • An error if updating the geographic location fails.
func updateGeo(_ countryCode: String?) throws
📘

Use this function to update the geographic location associated with the content. The provided countryCode should be a valid ISO 3166-1 alpha-2 country code (e.g., "US" for the United States). If you pass nil, it will remove the existing geographic location setting.

setDefaultVideosPlaybackConfiguration

Global method to set the video player's default playback configuration.

Parameters:

  • playbackConfiguration: An instance of BlazeVideosPlaybackConfiguration which determines the playback behavior of video components.
func setDefaultVideosPlaybackConfiguration(_ playbackConfiguration: BlazeVideosPlaybackConfiguration)

Example:

// Create and customize playback configuration
var playbackConfig = BlazeVideosPlaybackConfiguration.base()
playbackConfig.multiAspectRatio = true
playbackConfig.shouldOpenInLandscape = true

// Set as global default
Blaze.shared.setDefaultVideosPlaybackConfiguration(playbackConfig)

getDefaultVideosPlaybackConfiguration

Global method to get the video player's default playback configuration.

func getDefaultVideosPlaybackConfiguration() -> BlazeVideosPlaybackConfiguration

Example:

// Get the current default configuration
let currentConfig = Blaze.shared.getDefaultVideosPlaybackConfiguration()
print("Multi-aspect ratio enabled: \(currentConfig.multiAspectRatio)")
print("Should open in landscape: \(currentConfig.shouldOpenInLandscape)")
📘

Global configuration is overriden when passed to specific domains like Widgets & playVideos.

Parameters

playerEntryPointDelegate

The BlazePlayerEntryPointDelegate for a player displayed from an entry point.

doNotTrackUser

Apps can request that analytics be reported without identifiers. This setting applies to all analytics.

Set this from your own app's consent state, not from Apple's App Tracking Transparency status. ATT covers cross-app advertising identifiers, which the Experiences SDK doesn't use.

disableAnalytics

A Boolean value that determines whether the SDK collects and sends analytics data to WSC.

When set to true:

  • No analytics events are collected or sent to WSC BI endpoints
  • Content delivery continues to function normally
  • Event callbacks still fire locally for customer's own use

isInitialized

A Boolean value that indicates whether the SDK has been initialized successfully or not.

isMuted

Current SDK-wide mute state for playback of Stories, Moments, and Videos.
Returns true by default if setPlayerSoundState has not been called.

public var isMuted: Bool

cachePolicyLevel

The BlazeCachePolicyLevel enum represents different levels of caching policy for data retrieval.

cases:

  • Low - Pre-fetches the consequent page only, while a page is playing.
  • Default - Pre-fetches the first visible page after loading, and the consequent page while a page is playing.
  • High - Pre-fetches the first page of the first 3 items after loading, and up to 2 consequent pages while a page is playing.
  • Extreme - Pre-fetches the first page of the first 5 items after loading, and up to 4 consequent pages while a page is playing.

hostingAppContext

The BlazeHostingAppContextManagerProtocol Manages the hosting app's context, allowing retrieval and modification of key-value pairs.

Ads

googleCustomNativeAdsHandler

To integrate the Google Custom Native Ads into your app, we recommend using our GAM module.
If our module isn't sufficient for your requirements, you can consult with us on how to solve the problem.
If there is no other solution, you may follow this steps for implementing it on your own.

public var googleCustomNativeAdsHandler: BlazeGoogleCustomNativeAdsHandler?

imaHandler

To integrate the IMA ads into your app, we recommend using our IMA module.
If our module isn't sufficient for your requirements, you can consult with us on how to solve the problem.
If there is no other solution, you may follow this steps for implementing it on your own.

public var imaHandler: BlazeIMAHandlerProtocol?

gamBannerAdsHandler

To integrate the GAM Banner Ads into your app, we recommend using our GAM module.
If our module isn't sufficient for your requirements, you can consult with us on how to solve the problem.
If there is no other solution, you may follow this steps for implementing it on your own.

public var gamBannerAdsHandler: BlazeGAMBannerAdsHandler?

Structs

BlazeWidgetLabel

BlazeWidgetLabel provides a structure for creating label expressions for your Blaze widgets.

The label expressions can be single labels or combinations of labels with logical AND or OR conditions. You can simply use the static methods provided by BlazeWidgetLabel to create your expressions.

Usage:

  1. Creating a single label expression:

    let singleLabel = BlazeWidgetLabel.singleLabel("Blue")

    This creates a label expression representing a single label "Blue".

  2. Creating an AND expression:

    let andExpression = BlazeWidgetLabel.mustInclude("Blue", "Green")

    This creates a label expression representing the logical AND of the labels "Blue" and "Green". In other words, the expression is true if and only if both "Blue" and "Green" are present.

  3. Creating an OR expression:

    let orExpression = BlazeWidgetLabel.atLeastOneOf("Blue", "Green")

    This creates a label expression representing the logical OR of the labels "Blue" and "Green". In other words, the expression is true if either "Blue" or "Green" (or both) are present.

  4. Combining expressions:
    You can also combine the expressions using AND and OR operations. For example, you can create an expression that is true if "Red" and either "Blue" or "Green" are present:

    let blueOrGreen = BlazeWidgetLabel.atLeastOneOf("Blue", "Green")
    let combinedExpression = BlazeWidgetLabel.mustInclude(blueOrGreen, BlazeWidgetLabel.singleLabel("Red"))

    The BlazeWidgetLabel.singleLabel(_:), BlazeWidgetLabel.mustInclude(_:), and BlazeWidgetLabel.atLeastOneOf(_:) methods return instances of BlazeWidgetLabel, which represents the label expressions.

Typealias

BlazeErrorBlock

Type alias for a closure that processes an error resulting from an operation.

Parameter:

  • BlazeError: The error that was encountered during the operation.
typealias BlazeErrorBlock = (BlazeError) -> Void

BlazeResultBlock

Type alias for a closure that processes the result of an asynchronous operation.

Parameter:

  • Result<Void, BlazeError>: The result of the operation.
    • If the operation was successful, the result will be .success().
    • If the operation encountered an error, the result will be .failure(BlazeError),
      where BlazeError is the error that has been thrown.
typealias BlazeErrorBlock = (BlazeError) -> Void

BlazeResult

Type alias for a closure that processes the result of an asynchronous operation.

Parameter:

  • Result<Void, BlazeError>: The result of the operation.
    • If the operation was successful, the result will be .success().
    • If the operation encountered an error, the result will be .failure(BlazeError),
      where BlazeError is the error that has been thrown.
typealias BlazeResult = Result<Void, BlazeError>
    • If the operation encountered an error, the result will be .failure(BlazeError),
      where BlazeError is the error that has been thrown.
typealias BlazeResult = Result<Void, BlazeError>

BlazeEntryPointTriggerSource

Represents the source from which the content is triggered.

Associated Values and Behavior:

ValuesBehavior
notificationThe content is triggered from a push notification
deepLinkThe content is triggered from a deep link.
entryPointThe content is triggered from an in-app entry point.

Did this page help you?