ParseConfig

public protocol ParseConfig: ParseType,
                             Decodable,
                             CustomDebugStringConvertible,
                             CustomStringConvertible

Objects that conform to the ParseConfig protocol are able to access the Config on the Parse Server. When conforming to ParseConfig, any properties added can be retrieved by the client or updated on the server.

Fetchable - Async/Await

  • fetch(options:) Extension method, asynchronous

    Fetch the Config asynchronously.

    Throws

    An error of type ParseError.

    Note

    The default cache policy for this method is .reloadIgnoringLocalCacheData. If a developer desires a different policy, it should be inserted in options.

    Declaration

    Swift

    func fetch(options: API.Options = []) async throws -> Self

    Parameters

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    The return type of self.

Savable - Async/Await

  • save(options:) Extension method, asynchronous

    Update the Config asynchronously.

    Throws

    An error of type ParseError.

    Declaration

    Swift

    func save(options: API.Options = []) async throws -> Bool

    Parameters

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    true if saved, false if save is unsuccessful.

Combine

  • fetchPublisher(options:) Extension method

    Fetch the Config asynchronously. Publishes when complete.

    Note

    The default cache policy for this method is .reloadIgnoringLocalCacheData. If a developer desires a different policy, it should be inserted in options.

    Declaration

    Swift

    func fetchPublisher(options: API.Options = []) -> Future<Self, ParseError>

    Parameters

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    A publisher that eventually produces a single value and then finishes or fails.

  • savePublisher(options:) Extension method

    Update the Config asynchronously.

    Declaration

    Swift

    func savePublisher(options: API.Options = []) -> Future<Bool, ParseError>

    Parameters

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    A publisher that eventually produces a single value and then finishes or fails.

Update

  • fetch(options:) Extension method

    Fetch the Config synchronously.

    Throws

    An error of type ParseError.

    Note

    The default cache policy for this method is .reloadIgnoringLocalCacheData. If a developer desires a different policy, it should be inserted in options.

    Declaration

    Swift

    public func fetch(options: API.Options = []) throws -> Self

    Parameters

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    Returns Self.

  • Fetch the Config asynchronously.

    Note

    The default cache policy for this method is .reloadIgnoringLocalCacheData. If a developer desires a different policy, it should be inserted in options.

    Declaration

    Swift

    public func fetch(options: API.Options = [],
                      callbackQueue: DispatchQueue = .main,
                      completion: @escaping (Result<Self, ParseError>) -> Void)

    Parameters

    options

    A set of header options sent to the server. Defaults to an empty set.

    callbackQueue

    The queue to return to after completion. Default value of .main.

    completion

    A block that will be called when retrieving the config completes or fails. It should have the following argument signature: (Result<Self, ParseError>).

  • save(options:) Extension method

    Update the Config synchronously.

    Note

    The default cache policy for this method is .reloadIgnoringLocalCacheData. If a developer desires a different policy, it should be inserted in options.

    Declaration

    Swift

    public func save(options: API.Options = []) throws -> Bool

    Parameters

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    Returns true if updated, false otherwise.

  • Update the Config asynchronously.

    Note

    The default cache policy for this method is .reloadIgnoringLocalCacheData. If a developer desires a different policy, it should be inserted in options.

    Declaration

    Swift

    public func save(options: API.Options = [],
                     callbackQueue: DispatchQueue = .main,
                     completion: @escaping (Result<Bool, ParseError>) -> Void)

    Parameters

    options

    A set of header options sent to the server. Defaults to an empty set.

    callbackQueue

    The queue to return to after completion. Default value of .main.

    completion

    A block that will be called when retrieving the config completes or fails. It should have the following argument signature: (Result<Bool, ParseError>).

Current

  • current Extension method

    Gets/Sets properties of the current config in the Keychain.

    Declaration

    Swift

    internal(set) static var current: Self? { get set }

    Return Value

    Returns the latest ParseConfig on this device. If there is none, returns nil.

CustomDebugStringConvertible

  • debugDescription Extension method

    Declaration

    Swift

    public var debugDescription: String { get }

CustomStringConvertible

  • description Extension method

    Declaration

    Swift

    public var description: String { get }