CloudObservable

public protocol CloudObservable : ObservableObject

This protocol describes the interface for creating a view model for ParseCloud functions and jobs. You can use this protocol on any custom class of yours, instead of CloudViewModel, if it fits your use case better.

  • The ParseObject associated with this view model.

    Declaration

    Swift

    associatedtype CloudCodeType : ParseCloud
  • Creates a new view model that can be used to handle updates.

    Declaration

    Swift

    init(cloudCode: CloudCodeType)
  • Calls a Cloud Code function asynchronously and updates the view model when the result of it’s execution.

    Declaration

    Swift

    func runFunction(options: API.Options)

    Parameters

    options

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

  • Starts a Cloud Code Job asynchronously and updates the view model with the result and jobStatusId of the job.

    Declaration

    Swift

    func startJob(options: API.Options)

    Parameters

    options

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