Classes

The following classes are available globally.

  • A module that manages cookies.

    See more

    Declaration

    Swift

    public class CookieModule
  • Configuration for managing cookies in the application.

    CookieConfig provides control over how HTTP cookies are stored, persisted, and managed across requests in your Journey or DaVinci workflows. It supports both in-memory storage (for temporary cookies) and persistent storage (for cookies that should survive app restarts).

    By default, cookies are stored in memory only. To persist specific cookies to Keychain storage, add their names to the persist array:

    let cookieConfig = CookieConfig()
    cookieConfig.persist = ["iPlanetDirectoryPro", "session_token"]
    

    Only cookies whose names appear in the persist array will be saved to the Keychain. All other cookies remain in memory only and are cleared when the app terminates.

    Custom Storage Configuration

    For multi-user scenarios or apps requiring isolated cookie storage, use the custom account initializer:

    // User-specific cookie storage
    let userCookieConfig = CookieConfig(account: "user_12345_cookies")
    
    // Another user with separate storage
    let adminCookieConfig = CookieConfig(account: "admin_cookies")
    

    Integration with Modules

    CookieConfig is typically used with CookieModule in Journey workflows:

    let journey = Journey.createJourney { config in
        config.module(CookieModule.config) { cookieConfig in
            cookieConfig.persist = ["iPlanetDirectoryPro"]
            // Cookies will be persisted to default Keychain storage
        }
    }
    

    Note

    This class is marked as @unchecked Sendable because its properties are mutable but access is coordinated through the Journey module system.

    See also

    CookieModule for the module that uses this configuration

    See also

    CustomHTTPCookie for the cookie type used in persistent storage

    See more

    Declaration

    Swift

    public final class CookieConfig : @unchecked Sendable
  • Class representing a workflow.

    See more

    Declaration

    Swift

    public class Workflow : @unchecked Sendable
  • Configuration class for CustomHeader. Allows adding custom headers to be injected into requests.

    See more

    Declaration

    Swift

    public class CustomHeaderConfig : @unchecked Sendable
  • Module for injecting custom headers into requests.

    See more

    Declaration

    Swift

    public class CustomHeader
  • A Module represents a unit of functionality in the application.

    • property config: A function that returns the configuration for the module.
    • property setup: A function that sets up the module.
    See more

    Declaration

    Swift

    public class Module<ModuleConfig> : Equatable, @unchecked Sendable where ModuleConfig : Sendable
  • Class for a ModuleRegistry. A ModuleRegistry represents a registry of modules in the application.

    • property id: The UUID of the module
    • property priority: The priority of the module in the registry.
    • property config: The configuration for the module.
    • property setup: The function that sets up the module.
    See more

    Declaration

    Swift

    public final class ModuleRegistry<Config> : ModuleRegistryProtocol where Config : Sendable
    extension ModuleRegistry: Comparable
  • Abstract class for a ContinueNode node in the workflow.

    • property context: The context for the node.
    • property workflow: The workflow for the node.
    • property input: The input for the node.
    • property actions: The actions for the node.
    See more

    Declaration

    Swift

    open class ContinueNode : Node, Closeable, @unchecked Sendable
  • A class that manages a shared context using a dictionary.

    See more

    Declaration

    Swift

    public final class SharedContext : @unchecked Sendable
  • Class representing the context of a flow.

    • property flowContext: The shared context of the flow.
    See more

    Declaration

    Swift

    public class FlowContext : @unchecked Sendable
  • Workflow configuration

    See more

    Declaration

    Swift

    open class WorkflowConfig : @unchecked Sendable