SKYLambdaOperation

@interface SKYLambdaOperation : SKYOperation

is a subclass of that implements calling lambda functions registered in Skygear.

  • Instantiates an instance of with arguments specified as an array.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAction:(nonnull NSString *)action
                            arrayArguments:(NSArray *_Nullable)arguments;

    Swift

    init(action: String, arrayArguments arguments: [Any]?)
  • Instantiates an instance of with arguments specified as a dictionary.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAction:(nonnull NSString *)action
                       dictionaryArguments:(NSDictionary *_Nullable)arguments;

    Swift

    init(action: String, dictionaryArguments arguments: [AnyHashable : Any]?)
  • Creates and returns an instance of with arguments specified as an array.

    Declaration

    Objective-C

    + (nonnull instancetype)operationWithAction:(nonnull NSString *)action
                                 arrayArguments:(NSArray *_Nullable)arguments;
  • Creates and returns an instance of with arguments specified as a dictionary.

    Declaration

    Objective-C

    + (nonnull instancetype)operationWithAction:(nonnull NSString *)action
                            dictionaryArguments:(NSDictionary *_Nullable)arguments;
  • Sets or returns the action name of the labmda function.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *_Nonnull action;

    Swift

    var action: String { get set }
  • Sets or returns the array arguments.

    If both arrayArguments and dictionaryArguments are set, only the object set to arrayArguments will be used.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSArray *_Nullable arrayArguments;

    Swift

    var arrayArguments: [Any]? { get set }
  • Sets or returns the dictionary arguments.

    If both arrayArguments and dictionaryArguments are set, only the object set to arrayArguments will be used.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic)
        NSDictionary *_Nullable dictionaryArguments;

    Swift

    var dictionaryArguments: [AnyHashable : Any]? { get set }
  • Sets or returns the block that is called when the operation completes.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) void (^_Nullable)
        (NSDictionary *_Nullable, NSError *_Nullable) lambdaCompletionBlock;

    Swift

    var lambdaCompletionBlock: (([AnyHashable : Any]?, Error?) -> Void)? { get set }