AVCloud Class Reference

Inherits from NSObject
Declared in AVCloud.h

Overview

Call the cloud code from client

+ callFunction:withParameters:

Calls the given cloud function with the parameters passed in.

+ (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.

Discussion

Calls the given cloud function with the parameters passed in.

Declared In

AVCloud.h

+ callFunction:withParameters:error:

Calls the given cloud function with the parameters passed in and sets the error if there is one.

+ (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, NSInteger or NSString.

Discussion

Calls the given cloud function with the parameters passed in and sets the error if there is one.

Declared In

AVCloud.h

+ callFunctionInBackground:withParameters:block:

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

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

Parameters

function

The function name to call.

parameters

The parameters to send to the function.

block

The block to execute. The block should have the following argument signature:(id result, NSError *error).

Discussion

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

Declared In

AVCloud.h

+ callFunctionInBackground:withParameters:target:selector:

Calls the given cloud function with the parameters provided asynchronously and runs the callback when it is done.

+ (void)callFunctionInBackground:(NSString *)function withParameters:(nullable NSDictionary *)parameters target:(id)target selector:(SEL)selector

Parameters

function

The function name to call.

parameters

The parameters to send to the function.

target

The object to call the selector on.

selector

The selector to call. It should have the following signature: (void)callbackWithResult:(id) result error:(NSError *)error. result will be nil if error is set and vice versa.

Discussion

Calls the given cloud function with the parameters provided asynchronously and runs the callback when it is done.

Declared In

AVCloud.h

+ rpcFunction:withParameters:

Calls the given cloud function with the parameters passed in by RPC.

+ (id)rpcFunction:(NSString *)function withParameters:(nullable id)parameters

Parameters

function

The function name to call.

parameters

The parameters to send to the function.

Return Value

The response from the cloud function.

Discussion

Calls the given cloud function with the parameters passed in by RPC.

Declared In

AVCloud.h

+ rpcFunction:withParameters:error:

Calls the given cloud function with the parameters passed in by RPC and sets the error if there is one.

+ (id)rpcFunction:(NSString *)function withParameters:(nullable id)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, NSInteger or NSString.

Discussion

Calls the given cloud function with the parameters passed in by RPC and sets the error if there is one.

Declared In

AVCloud.h

+ rpcFunctionInBackground:withParameters:block:

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

+ (void)rpcFunctionInBackground:(NSString *)function withParameters:(nullable id)parameters block:(AVIdResultBlock)block

Parameters

function

The function name to call.

parameters

The parameters to send to the function.

block

The block to execute. The block should have the following argument signature:(id result, NSError *error).

Discussion

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

Declared In

AVCloud.h

+ rpcFunctionInBackground:withParameters:target:selector:

Calls the given cloud function with the parameters provided by RPC asynchronously and runs the callback when it is done.

+ (void)rpcFunctionInBackground:(NSString *)function withParameters:(nullable id)parameters target:(id)target selector:(SEL)selector

Parameters

function

The function name to call.

parameters

The parameters to send to the function.

target

The object to call the selector on.

selector

The selector to call. It should have the following signature: (void)callbackWithResult:(id) result error:(NSError *)error. result will be nil if error is set and vice versa.

Discussion

Calls the given cloud function with the parameters provided by RPC asynchronously and runs the callback when it is done.

Declared In

AVCloud.h

+ setProductionMode:

Set call what production mode’s cloud code

+ (void)setProductionMode:(BOOL)isProduction

Parameters

isProduction

the production mode or test mode

Discussion

Set call what production mode’s cloud code

Declared In

AVCloud.h