SASManager

@objc
public class SASManager : NSObject

The SASManager class.

The singleton object that is used for global SAS platform operations.

Since

since 8.22
  • The shared singleton instance of the SASManager. This is initalized on ‘initialize(delegate:)’ or initSASManager.

    Since

    since 8.22

    Declaration

    Swift

    @objc
    public static var shared: SASManager { get }
  • The manager delegate object. This is initalized when SASManager.initialize is called.

    Since

    since 8.22

    Declaration

    Swift

    @objc
    public private(set) var managerDelegate: SASManagerDelegate! { get }
  • Delegate used for keychain access.

    This will be populated at SASManager.initialize with SASManagerDelegate.keyChainDelegate or a default implementation if not overridden.

    Since

    since 2022.12.0

    Declaration

    Swift

    @objc
    public var keychainDelegate: SASKeychainDelegate
  • Delegate used for network access.

    This will be populated at SASManager.initialize with SASManagerDelegate.networkDelegate or a default implementation if not overridden.

    Since

    since 2022.12.0

    Declaration

    Swift

    @objc
    public var networkDelegate: SASNetworkDelegate
  • Delegate used for file system access.

    This will be populated at SASManager.initialize with SASManagerDelegate.fileSystemDelegate or a default implementation if not overridden.

    Since

    since 2022.12.0

    Declaration

    Swift

    @objc
    public var fileSystemDelegate: SASFileSystemDelegate
  • Delegate used for authentication to the SASServer.

    This will be populated at SASManager.initialize with SASManagerDelegate.authenticationDelegate or a default implementation if not overridden.

    Since

    since 2022.12.0

    Declaration

    Swift

    @objc
    public var authenticationDelegate: SASServerAuthenticationDelegate
  • Verify and gather metadata for a SASServer from a URL.

    Since

    since 8.33

    Declaration

    Swift

    public func verifySASServer(_ serverDescriptor: SASServerDescriptor, completion: @escaping (SASServer?, NSError?) -> Void)

    Parameters

    serverDescriptor

    The SASServerDescriptor for the SASServer.

    completion

    Makes a callback when the operation is complete. Either the server parameter, or the error could be nil (but not both).

  • Gets all known SASServers. The SASManager retains server information across sessions. This API returns all loaded SASServers.

    Since

    since 8.22

    Declaration

    Swift

    public var servers: [SASServer] { get }
  • Removes this server from the list of tracked servers.

    Since

    since 8.22

    Declaration

    Swift

    public func removeServer(server: SASServer)

    Parameters

    server

    The server to remove

  • look up a server by descriptor.

    Since

    since 26.0.0

    Declaration

    Swift

    public func sasServer(_ descriptor: SASServerDescriptor) -> SASServer?
  • Find all server connections for a URL.

    Since

    since 26.0.0

    Declaration

    Swift

    public func sasServers(_ url: URL) -> [SASServer]

    Parameters

    url

    URL To look for servers.

  • Main entry point for the SASManager. This method must be called by applications before calling any API from the SASKit framework.

    Since

    since 8.22

    Declaration

    Swift

    public static func initialize(delegate: SASManagerDelegate, completion: @escaping (NSError?) -> Void)

    Parameters

    delegate

    The SASManagerDelegate for this application.

    completion

    Called when the SASManager is finished initalizing. All SASKit functionality is invalid (and SAS API behavior is undefined) until this completion block is called.