FIRStackFrame.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #import <Foundation/Foundation.h>
  15. NS_ASSUME_NONNULL_BEGIN
  16. /**
  17. * The Firebase Crashlytics `StackFrame` provides a way to construct the lines of
  18. * a stack trace for reporting along with a recorded `ExceptionModel`.
  19. */
  20. NS_SWIFT_NAME(StackFrame)
  21. @interface FIRStackFrame : NSObject
  22. /** :nodoc: */
  23. - (instancetype)init NS_UNAVAILABLE;
  24. /**
  25. * Initializes a symbolicated `StackFrame` with the given required fields. Symbolicated
  26. * `StackFrame`s will appear in the Crashlytics dashboard as reported in these fields.
  27. *
  28. * @param symbol - The function or method name
  29. * @param file - the file where the exception occurred
  30. * @param line - the line number
  31. */
  32. - (instancetype)initWithSymbol:(NSString *)symbol file:(NSString *)file line:(NSInteger)line;
  33. /**
  34. * Creates a symbolicated `StackFrame` from an address. The address will be
  35. * symbolicated in the Crashlytics backend for the customer and reported in the
  36. * Crashlytics dashboard with the appropriate file name and line number. If an
  37. * invalid address is provided it will appear in the dashboard as missing.
  38. *
  39. * @param address - the address where the exception occurred
  40. */
  41. + (instancetype)stackFrameWithAddress:(NSUInteger)address;
  42. /**
  43. * Creates a symbolicated `StackFrame` with the given required fields. Symbolicated
  44. * `StackFrame`s will appear in the Crashlytics dashboard as reported in these fields.
  45. *
  46. * @param symbol - The function or method name
  47. * @param file - the file where the exception occurred
  48. * @param line - the line number
  49. */
  50. + (instancetype)stackFrameWithSymbol:(NSString *)symbol
  51. file:(NSString *)file
  52. line:(NSInteger)line NS_SWIFT_UNAVAILABLE("");
  53. @end
  54. NS_ASSUME_NONNULL_END