|  | 
| 3 | 3 | #else | 
| 4 | 4 | #import "RCTBridgeModule.h" | 
| 5 | 5 | #endif | 
| 6 |  | -#if __has_include(<Rollbar/Rollbar.h>) | 
| 7 |  | -#import <Rollbar/Rollbar.h> | 
| 8 |  | -#else | 
| 9 |  | -#import "Rollbar.h" | 
| 10 |  | -#endif | 
| 11 | 6 | 
 | 
| 12 | 7 | @interface RollbarReactNative : NSObject <RCTBridgeModule> | 
| 13 | 8 | 
 | 
| 14 |  | -+ (void)initWithAccessToken:(NSString *)accessToken; | 
| 15 |  | -+ (void)initWithAccessToken:(NSString *)accessToken configuration:(RollbarConfiguration *)config; | 
| 16 |  | -+ (void)initWithAccessToken:(NSString *)accessToken configuration:(RollbarConfiguration*)configuration enableCrashReporter:(BOOL)enable; | 
|  | 9 | ++ (void)initWithConfiguration:(nonnull NSDictionary *)configuration; | 
|  | 10 | + | 
|  | 11 | ++ (void)log:(nonnull NSString*)level message:(nonnull NSString*)message; | 
|  | 12 | ++ (void)log:(nonnull NSString*)level exception:(nonnull NSException*)exception; | 
|  | 13 | ++ (void)log:(nonnull NSString*)level error:(nonnull NSError*)error; | 
|  | 14 | + | 
|  | 15 | ++ (void)log:(nonnull NSString*)level | 
|  | 16 | +    message:(nonnull NSString*)message | 
|  | 17 | +       data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 18 | + | 
|  | 19 | ++ (void)log:(nonnull NSString*)level | 
|  | 20 | +    exception:(nonnull NSException*)exception | 
|  | 21 | +         data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 22 | + | 
|  | 23 | ++ (void)log:(nonnull NSString*)level | 
|  | 24 | +      error:(nonnull NSError*)error | 
|  | 25 | +       data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 26 | + | 
|  | 27 | ++ (void)log:(nonnull NSString*)level | 
|  | 28 | +    message:(nonnull NSString*)message | 
|  | 29 | +       data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 30 | +    context:(nullable NSString *)context; | 
|  | 31 | + | 
|  | 32 | ++ (void)log:(nonnull NSString*)level | 
|  | 33 | +    exception:(nonnull NSException*)exception | 
|  | 34 | +         data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 35 | +      context:(nullable NSString *)context; | 
|  | 36 | + | 
|  | 37 | ++ (void)log:(nonnull NSString*)level | 
|  | 38 | +      error:(nonnull NSError*)error | 
|  | 39 | +       data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 40 | +    context:(nullable NSString *)context; | 
|  | 41 | + | 
|  | 42 | ++ (void)debugMessage:(nonnull NSString*)message; | 
|  | 43 | ++ (void)debugException:(nonnull NSException*)exception; | 
|  | 44 | ++ (void)debugError:(nonnull NSError*)error; | 
|  | 45 | + | 
|  | 46 | ++ (void)debugMessage:(nonnull NSString*)message | 
|  | 47 | +                data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 48 | + | 
|  | 49 | ++ (void)debugException:(nonnull NSException*)exception | 
|  | 50 | +                  data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 51 | + | 
|  | 52 | ++ (void)debugError:(nonnull NSError*)error | 
|  | 53 | +              data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 54 | + | 
|  | 55 | ++ (void)debugMessage:(nonnull NSString*)message | 
|  | 56 | +                data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 57 | +             context:(nullable NSString *)context; | 
|  | 58 | + | 
|  | 59 | ++ (void)debugException:(nonnull NSException*)exception | 
|  | 60 | +                  data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 61 | +               context:(nullable NSString *)context; | 
|  | 62 | + | 
|  | 63 | ++ (void)debugError:(nonnull NSError*)error | 
|  | 64 | +              data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 65 | +           context:(nullable NSString *)context; | 
|  | 66 | + | 
|  | 67 | ++ (void)infoMessage:(nonnull NSString*)message; | 
|  | 68 | ++ (void)infoException:(nonnull NSException*)exception; | 
|  | 69 | ++ (void)infoError:(nonnull NSError*)error; | 
|  | 70 | + | 
|  | 71 | ++ (void)infoMessage:(nonnull NSString*)message | 
|  | 72 | +               data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 73 | + | 
|  | 74 | ++ (void)infoException:(nonnull NSException*)exception | 
|  | 75 | +                 data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 76 | + | 
|  | 77 | ++ (void)infoError:(nonnull NSError*)error | 
|  | 78 | +             data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 79 | + | 
|  | 80 | ++ (void)infoMessage:(nonnull NSString*)message | 
|  | 81 | +               data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 82 | +            context:(nullable NSString *)context; | 
|  | 83 | + | 
|  | 84 | ++ (void)infoException:(nonnull NSException*)exception | 
|  | 85 | +                 data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 86 | +              context:(nullable NSString *)context; | 
|  | 87 | + | 
|  | 88 | ++ (void)infoError:(nonnull NSError*)error | 
|  | 89 | +             data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 90 | +          context:(nullable NSString *)context; | 
|  | 91 | + | 
|  | 92 | ++ (void)warningMessage:(nonnull NSString*)message; | 
|  | 93 | ++ (void)warningException:(nonnull NSException*)exception; | 
|  | 94 | ++ (void)warningError:(nonnull NSError*)error; | 
|  | 95 | + | 
|  | 96 | ++ (void)warningMessage:(nonnull NSString*)message | 
|  | 97 | +                  data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 98 | + | 
|  | 99 | ++ (void)warningException:(nonnull NSException*)exception | 
|  | 100 | +                    data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 101 | + | 
|  | 102 | ++ (void)warningError:(nonnull NSError*)error | 
|  | 103 | +                data:(nullable NSDictionary<NSString *, id> *)data; | 
|  | 104 | + | 
|  | 105 | ++ (void)warningMessage:(nonnull NSString*)message | 
|  | 106 | +                  data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 107 | +               context:(nullable NSString *)context; | 
|  | 108 | + | 
|  | 109 | ++ (void)warningException:(nonnull NSException*)exception | 
|  | 110 | +                    data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 111 | +                 context:(nullable NSString *)context; | 
|  | 112 | + | 
|  | 113 | ++ (void)warningError:(nonnull NSError*)error | 
|  | 114 | +                data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 115 | +             context:(nullable NSString *)context; | 
| 17 | 116 | 
 | 
| 18 |  | -// Old methods for backwards compatability | 
|  | 117 | ++ (void)errorMessage:(nonnull NSString*)message; | 
|  | 118 | ++ (void)errorException:(nonnull NSException*)exception; | 
|  | 119 | ++ (void)errorError:(nonnull NSError*)error; | 
| 19 | 120 | 
 | 
| 20 |  | -+ (void)logWithLevel:(NSString*)level message:(NSString*)message; | 
| 21 |  | -+ (void)logWithLevel:(NSString*)level message:(NSString*)message data:(NSDictionary*)data; | 
| 22 |  | -+ (void)logWithLevel:(NSString*)level data:(NSDictionary*)data; | 
|  | 121 | ++ (void)errorMessage:(nonnull NSString*)message | 
|  | 122 | +                data:(nullable NSDictionary<NSString *, id> *)data; | 
| 23 | 123 | 
 | 
| 24 |  | -+ (void)debugWithMessage:(NSString*)message; | 
| 25 |  | -+ (void)debugWithMessage:(NSString*)message data:(NSDictionary*)data; | 
| 26 |  | -+ (void)debugWithData:(NSDictionary*)data; | 
|  | 124 | ++ (void)errorException:(nonnull NSException*)exception | 
|  | 125 | +                  data:(nullable NSDictionary<NSString *, id> *)data; | 
| 27 | 126 | 
 | 
| 28 |  | -+ (void)infoWithMessage:(NSString*)message; | 
| 29 |  | -+ (void)infoWithMessage:(NSString*)message data:(NSDictionary*)data; | 
| 30 |  | -+ (void)infoWithData:(NSDictionary*)data; | 
|  | 127 | ++ (void)errorError:(nonnull NSError*)error | 
|  | 128 | +              data:(nullable NSDictionary<NSString *, id> *)data; | 
| 31 | 129 | 
 | 
| 32 |  | -+ (void)warningWithMessage:(NSString*)message; | 
| 33 |  | -+ (void)warningWithMessage:(NSString*)message data:(NSDictionary*)data; | 
| 34 |  | -+ (void)warningWithData:(NSDictionary*)data; | 
|  | 130 | ++ (void)errorMessage:(nonnull NSString*)message | 
|  | 131 | +                data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 132 | +             context:(nullable NSString *)context; | 
| 35 | 133 | 
 | 
| 36 |  | -+ (void)errorWithMessage:(NSString*)message; | 
| 37 |  | -+ (void)errorWithMessage:(NSString*)message data:(NSDictionary*)data; | 
| 38 |  | -+ (void)errorWithData:(NSDictionary*)data; | 
|  | 134 | ++ (void)errorException:(nonnull NSException*)exception | 
|  | 135 | +                  data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 136 | +               context:(nullable NSString *)context; | 
| 39 | 137 | 
 | 
| 40 |  | -+ (void)criticalWithMessage:(NSString*)message; | 
| 41 |  | -+ (void)criticalWithMessage:(NSString*)message data:(NSDictionary*)data; | 
| 42 |  | -+ (void)criticalWithData:(NSDictionary*)data; | 
|  | 138 | ++ (void)errorError:(nonnull NSError*)error | 
|  | 139 | +              data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 140 | +           context:(nullable NSString *)context; | 
| 43 | 141 | 
 | 
| 44 |  | -// New interface | 
|  | 142 | ++ (void)criticalMessage:(nonnull NSString*)message; | 
|  | 143 | ++ (void)criticalException:(nonnull NSException*)exception; | 
|  | 144 | ++ (void)criticalError:(nonnull NSError*)error; | 
| 45 | 145 | 
 | 
| 46 |  | -+ (void)log:(RollbarLevel)level message:(NSString*)message; | 
| 47 |  | -+ (void)log:(RollbarLevel)level message:(NSString*)message exception:(NSException*)exception; | 
| 48 |  | -+ (void)log:(RollbarLevel)level message:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data; | 
| 49 |  | -+ (void)log:(RollbarLevel)level message:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data context:(NSString*)context; | 
|  | 146 | ++ (void)criticalMessage:(nonnull NSString*)message | 
|  | 147 | +                   data:(nullable NSDictionary<NSString *, id> *)data; | 
| 50 | 148 | 
 | 
| 51 |  | -+ (void)debug:(NSString*)message; | 
| 52 |  | -+ (void)debug:(NSString*)message exception:(NSException*)exception; | 
| 53 |  | -+ (void)debug:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data; | 
| 54 |  | -+ (void)debug:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data context:(NSString*)context; | 
|  | 149 | ++ (void)criticalException:(nonnull NSException*)exception | 
|  | 150 | +                     data:(nullable NSDictionary<NSString *, id> *)data; | 
| 55 | 151 | 
 | 
| 56 |  | -+ (void)info:(NSString*)message; | 
| 57 |  | -+ (void)info:(NSString*)message exception:(NSException*)exception; | 
| 58 |  | -+ (void)info:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data; | 
| 59 |  | -+ (void)info:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data context:(NSString*)context; | 
|  | 152 | ++ (void)criticalError:(nonnull NSError*)error | 
|  | 153 | +                 data:(nullable NSDictionary<NSString *, id> *)data; | 
| 60 | 154 | 
 | 
| 61 |  | -+ (void)warning:(NSString*)message; | 
| 62 |  | -+ (void)warning:(NSString*)message exception:(NSException*)exception; | 
| 63 |  | -+ (void)warning:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data; | 
| 64 |  | -+ (void)warning:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data context:(NSString*)context; | 
|  | 155 | ++ (void)criticalMessage:(nonnull NSString*)message | 
|  | 156 | +                   data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 157 | +                context:(nullable NSString *)context; | 
| 65 | 158 | 
 | 
| 66 |  | -+ (void)error:(NSString*)message; | 
| 67 |  | -+ (void)error:(NSString*)message exception:(NSException*)exception; | 
| 68 |  | -+ (void)error:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data; | 
| 69 |  | -+ (void)error:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data context:(NSString*)context; | 
|  | 159 | ++ (void)criticalException:(nonnull NSException*)exception | 
|  | 160 | +                     data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 161 | +                  context:(nullable NSString *)context; | 
| 70 | 162 | 
 | 
| 71 |  | -+ (void)critical:(NSString*)message; | 
| 72 |  | -+ (void)critical:(NSString*)message exception:(NSException*)exception; | 
| 73 |  | -+ (void)critical:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data; | 
| 74 |  | -+ (void)critical:(NSString*)message exception:(NSException*)exception data:(NSDictionary*)data context:(NSString*)context; | 
|  | 163 | ++ (void)criticalError:(nonnull NSError*)error | 
|  | 164 | +                 data:(nullable NSDictionary<NSString *, id> *)data | 
|  | 165 | +              context:(nullable NSString *)context; | 
| 75 | 166 | 
 | 
| 76 |  | -- (void)init:(NSDictionary *)options; | 
| 77 |  | -- (void)setPerson:(NSDictionary *)personInfo; | 
|  | 167 | +- (void)init:(nonnull NSDictionary *)options; | 
|  | 168 | +- (void)setPerson:(nonnull NSDictionary *)personInfo; | 
| 78 | 169 | - (void)clearPerson; | 
| 79 | 170 | 
 | 
| 80 | 171 | @end | 
0 commit comments