ForgeTask Class Reference
| Inherits from | NSObject |
| Declared in | ForgeTask.h ForgeTask.m |
Overview
A ForgeTask contains details about a native API call from Javascript, and has several helper methods to perform common tasks from a native API call.
Tasks
-
– success:Return success with a result to Javascript for the task
-
– error:type:subtype:Return an error to Javascript.
-
– runInBackgroundInform the device that this task should be allowed to continue in the background.
Instance Methods
error:type:subtype:
Return an error to Javascript.
- (void)error:(NSString *)message type:(NSString *)type subtype:(NSString *)subtypeParameters
- message
Human readable error message
- type
One of UNEXPECTED_FAILURE, EXPECTED_FAILURE, UNAVAILABLE or BAD_INPUT
- subtype
An easily matchable error code for errors that need to be programmatically filtered
Declared In
ForgeTask.m