DaVinci

extension DaVinci
  • Method to create a DaVinci instance.

    Declaration

    Swift

    public static func createDaVinci(block: @Sendable (DaVinciConfig) -> Void = {_ in }) -> DaVinci

    Parameters

    block

    The configuration block.

    Return Value

    The DaVinci instance.

  • user() Asynchronous

    Retrieve the user. This method is now Deprecated. Please call daVinciUser() directly Calling user() instead might cause issues when both DaVinci and the Journey module is used If cookies are available, it prepares a new user and returns it. If no user is found and no cookies are available, it returns nil.

    Declaration

    Swift

    @available(*, deprecated)
    public func user() async -> User?

    Return Value

    The user if found, otherwise nil.

  • daVinciUser() Asynchronous

    Retrieve the user. If cookies are available, it prepares a new user and returns it. If no user is found and no cookies are available, it returns nil.

    Declaration

    Swift

    public func daVinciUser() async -> User?

    Return Value

    The user if found, otherwise nil.