PFCloud Class Reference

Inherits from NSObject
Declared in PFCloud.h

Overview

The PFCloud class provides methods for interacting with Parse Cloud Functions.

+ callFunction:withParameters:

Calls the given cloud function synchronously with the parameters provided.

+ (nullable id)callFunction:(NSString *)function withParameters:(nullable NSDictionary *)parameters

Parameters

function

The function name to call.

parameters

The parameters to send to the function.

Return Value

The response from the cloud function.

Declared In

PFCloud.h

+ callFunction:withParameters:error:

Calls the given cloud function synchronously with the parameters provided and sets the error if there is one.

+ (nullable id)callFunction:(NSString *)function withParameters:(nullable NSDictionary *)parameters error:(NSError **)error

Parameters

function

The function name to call.

parameters

The parameters to send to the function.

error

Pointer to an NSError that will be set if necessary.

Return Value

The response from the cloud function. This result could be a NSDictionary, an NSArray, NSNumber or NSString.

Declared In

PFCloud.h

+ callFunctionInBackground:withParameters:

Calls the given cloud function asynchronously with the parameters provided.

+ (BFTask PF_GENERIC ( id ) *)callFunctionInBackground:(NSString *)function withParameters:(nullable NSDictionary *)parameters

Parameters

function

The function name to call.

parameters

The parameters to send to the function.

Return Value

The task, that encapsulates the work being done.

Declared In

PFCloud.h

+ callFunctionInBackground:withParameters:block:

Calls the given cloud function asynchronously with the parameters provided and executes the given block when it is done.

+ (void)callFunctionInBackground:(NSString *)function withParameters:(nullable NSDictionary *)parameters block:(nullable PFIdResultBlock)block

Parameters

function

The function name to call.

parameters

The parameters to send to the function.

block

The block to execute when the function call finished. It should have the following argument signature: ^(id result, NSError *error).

Declared In

PFCloud.h