ParseConfig

public protocol ParseConfig : ParseType, CustomDebugStringConvertible, Decodable

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 - Combine

  • fetchPublisher(options:) Extension method

    Fetch the Config asynchronously. Publishes when complete.

    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.

Savable - Combine

  • 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.

    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.

    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. - parameter options: A set of header options sent to the server. Defaults to an empty set. - returns: Returns true if updated, false otherwise.

    Declaration

    Swift

    public func save(options: API.Options = []) throws -> Bool
  • Update the Config asynchronously.

    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

    public 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 }