2017-03-10 14:17:37 +00:00
|
|
|
#import "RNFirebaseCrash.h"
|
|
|
|
|
2017-05-25 14:21:10 +00:00
|
|
|
#if __has_include(<FirebaseCrash/FIRCrashLog.h>)
|
|
|
|
#import "FirebaseCrash/FIRCrashLog.h"
|
2017-03-10 14:17:37 +00:00
|
|
|
|
2017-05-25 14:21:10 +00:00
|
|
|
@implementation RNFirebaseCrash
|
|
|
|
RCT_EXPORT_MODULE();
|
2017-03-10 14:17:37 +00:00
|
|
|
|
2017-05-25 14:21:10 +00:00
|
|
|
RCT_EXPORT_METHOD(log:(NSString *)message) {
|
2017-03-10 14:17:37 +00:00
|
|
|
FIRCrashLog(message);
|
|
|
|
}
|
|
|
|
|
2017-05-25 14:21:10 +00:00
|
|
|
RCT_EXPORT_METHOD(logcat:(nonnull NSNumber *) level tag:(NSString *) tag message:(NSString *) message) {
|
2017-03-10 14:17:37 +00:00
|
|
|
FIRCrashLog(message);
|
|
|
|
}
|
|
|
|
|
2017-05-25 14:21:10 +00:00
|
|
|
RCT_EXPORT_METHOD(report:(NSString *) message) {
|
2017-03-10 14:17:37 +00:00
|
|
|
FIRCrashLog(message);
|
|
|
|
assert(NO);
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|
2017-05-25 14:21:10 +00:00
|
|
|
|
|
|
|
#else
|
|
|
|
@implementation RNFirebaseCrash
|
|
|
|
RCT_EXPORT_MODULE();
|
|
|
|
RCT_EXPORT_METHOD(nativeSDKMissing) {}
|
|
|
|
@end
|
|
|
|
#endif
|