StorageConfigurable

public extension MoEngageStorage.Network.StorageConfigurable
  • Returns a copy of this storage with JWT authentication processing added to both the pre-processor and post-processor pipelines.

    Declaration

    Swift

    func addingJwtAuthenticationProcessing(sendToken: Bool) -> Self

    Parameters

    sendToken

    Whether to send the JWT token to the server.

    Return Value

    A new storage with JWT authentication added.

StorageConfigurable Extension

  • Returns a copy of this storage with custom base domain processing added to the pre-processor pipeline.

    Rewrites the host of every outgoing request to use the customBaseDomain configured on the SDK instance, when one is set.

    Declaration

    Swift

    func addingBaseDomainProcessing() -> Self

    Return Value

    A new storage with base domain processing added.

  • Returns a copy of this storage with network encryption/decryption handling added to both the pre-processor and post-processor pipelines.

    Declaration

    Swift

    func addingNetworkEncryptionHandling() -> Self

    Return Value

    A new storage with encryption handling added.

  • Returns a copy of this storage with GZip compression pre-processing added.

    Should be added as the last pre-processor that modifies request data, as after compression further modification of request data might be invalid.

    Declaration

    Swift

    func addingGZipCompressionProcessing() -> Self

    Return Value

    A new storage with GZip compression added.

  • Returns a copy of this storage with reports request info saving added to the pre-processor pipeline.

    For impression tracking using MoEngageRichNotification.

    Declaration

    Swift

    func addingReportsRequestInfo() -> Self

    Return Value

    A new storage with reports request info saving added.

  • Returns a copy of this storage with strict timeout enforcement added as a delegate.

    Declaration

    Swift

    func addingStrictTimeout(
        withInterval interval: TimeInterval, tolerance: TimeInterval = 1
    ) -> Self

    Parameters

    interval

    The timeout interval for the request.

    tolerance

    Additional time added to interval before cancellation. Defaults to 1.

    Return Value

    A new storage with timeout enforcement added.

  • Returns a copy of this storage with strict timeout enforcement using a standard interval chosen by task type: 10 s for data tasks, 60 s for download tasks.

    Declaration

    Swift

    func addingStrictTimeout(
        assumingTaskType type: MoEngageStorage.Network.Timeout.TaskType, tolerance: TimeInterval = 1
    ) -> Self

    Parameters

    type

    The task type used to select the default interval.

    tolerance

    Additional time added before cancellation. Defaults to 1.

    Return Value

    A new storage with timeout enforcement added.