Skip to content

Commit

Permalink
feat(crashlytics, ios): add native helper log / setCustomValue methods
Browse files Browse the repository at this point in the history
user request, useful for "brownfield" apps that have custom native code and want
to use crashlytics native methods from their own native code
  • Loading branch information
mikehardy committed Oct 31, 2024
1 parent 3780d67 commit da1ac6b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@

+ (void)recordNativeError:(NSError *)error;

+ (void)log:(nonnull NSString *)msg;

+ (void)setCustomValue:(nullable id)value forKey:(nonnull NSString *)key;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,12 @@ + (void)recordNativeError:(NSError *)error {
[[FIRCrashlytics crashlytics] recordError:error];
}

+ (void)log:(nonnull NSString *)msg {
[[FIRCrashlytics crashlytics] log:msg];
}

+ (void)setCustomValue:(nullable id)value forKey:(nonnull NSString *)key {
[[FIRCrashlytics crashlytics] setCustomValue:value forKey:key];
}

@end

0 comments on commit da1ac6b

Please sign in to comment.