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()
AsynchronousRetrieve 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 user() async -> User?
Return Value
The user if found, otherwise nil.
-
daVinciUser()
AsynchronousAlias for the DaVinci.user() method.
Declaration
Swift
public func daVinciUser() async -> User?
Return Value
The user if found, otherwise nil.