1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | #import <UIKit/UIKit.h>
|
9 |
|
10 | #import <React/RCTBridge.h>
|
11 | #import <React/RCTBridgeModule.h>
|
12 | #import <React/RCTErrorCustomizer.h>
|
13 |
|
14 | @class RCTJSStackFrame;
|
15 |
|
16 | typedef void (^RCTRedBoxButtonPressHandler)(void);
|
17 |
|
18 | @interface RCTRedBox : NSObject <RCTBridgeModule>
|
19 |
|
20 | - (void)registerErrorCustomizer:(id<RCTErrorCustomizer>)errorCustomizer;
|
21 | - (void)showError:(NSError *)error;
|
22 | - (void)showErrorMessage:(NSString *)message;
|
23 | - (void)showErrorMessage:(NSString *)message withDetails:(NSString *)details;
|
24 | - (void)showErrorMessage:(NSString *)message withRawStack:(NSString *)rawStack;
|
25 | - (void)showErrorMessage:(NSString *)message withRawStack:(NSString *)rawStack errorCookie:(int)errorCookie;
|
26 | - (void)showErrorMessage:(NSString *)message withStack:(NSArray<NSDictionary *> *)stack;
|
27 | - (void)updateErrorMessage:(NSString *)message withStack:(NSArray<NSDictionary *> *)stack;
|
28 | - (void)showErrorMessage:(NSString *)message withStack:(NSArray<NSDictionary *> *)stack errorCookie:(int)errorCookie;
|
29 | - (void)updateErrorMessage:(NSString *)message withStack:(NSArray<NSDictionary *> *)stack errorCookie:(int)errorCookie;
|
30 | - (void)showErrorMessage:(NSString *)message withParsedStack:(NSArray<RCTJSStackFrame *> *)stack;
|
31 | - (void)updateErrorMessage:(NSString *)message withParsedStack:(NSArray<RCTJSStackFrame *> *)stack;
|
32 | - (void)showErrorMessage:(NSString *)message withParsedStack:(NSArray<RCTJSStackFrame *> *)stack errorCookie:(int)errorCookie;
|
33 | - (void)updateErrorMessage:(NSString *)message withParsedStack:(NSArray<RCTJSStackFrame *> *)stack errorCookie:(int)errorCookie;
|
34 |
|
35 | - (void)dismiss;
|
36 |
|
37 | - (void)addCustomButton:(NSString *)title onPressHandler:(RCTRedBoxButtonPressHandler)handler;
|
38 |
|
39 |
|
40 | @property (nonatomic, strong) NSURL *overrideBundleURL;
|
41 |
|
42 |
|
43 | @property (nonatomic, strong) dispatch_block_t overrideReloadAction;
|
44 |
|
45 | @end
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | @interface RCTBridge (RCTRedBox)
|
52 |
|
53 | @property (nonatomic, readonly) RCTRedBox *redBox;
|
54 |
|
55 | @end
|