|
35 | 35 |
|
36 | 36 | /// Turns debug mode on or off. If debug is enabled SDK will attempt to print out useful debugging |
37 | 37 | /// information if something goes wrong. |
38 | | - /// @note Default is NO. |
| 38 | + /// @note Default is @c false. |
39 | 39 | @objc public var debug: Bool = false |
40 | 40 |
|
41 | 41 | /// Minimum LogLevel to be used if debug is enabled. |
|
58 | 58 | /// @note Default value is "production". |
59 | 59 | @objc public var environment: String = Options.defaultEnvironment |
60 | 60 |
|
61 | | - /// Specifies whether this SDK should send events to Sentry. If set to NO events will be |
62 | | - /// dropped in the client and not sent to Sentry. Default is YES. |
| 61 | + /// Specifies whether this SDK should send events to Sentry. If set to @c false events will be |
| 62 | + /// dropped in the client and not sent to Sentry. Default is @c true. |
63 | 63 | @objc public var enabled = true |
64 | 64 |
|
65 | 65 | /// Controls the flush duration when calling SentrySDK/close. |
|
69 | 69 | /// @note Disabling this feature disables the SentryWatchdogTerminationTrackingIntegration, |
70 | 70 | /// because SentryWatchdogTerminationTrackingIntegration would falsely report every crash as watchdog |
71 | 71 | /// termination. |
72 | | - /// @note Default value is YES. |
| 72 | + /// @note Default value is @c true. |
73 | 73 | /// @note Crash reporting is automatically disabled if a debugger is attached. |
74 | 74 | @objc public var enableCrashHandler: Bool = true |
75 | 75 |
|
|
86 | 86 | /// feature or use the `SentryCrashExceptionApplication`. Having both enabled can lead to duplicated |
87 | 87 | /// reports. |
88 | 88 | /// |
89 | | - /// @note Default value is NO. |
| 89 | + /// @note Default value is @c false. |
90 | 90 | @objc public var enableUncaughtNSExceptionReporting: Bool = false |
91 | 91 | #endif |
92 | 92 |
|
|
99 | 99 | /// aware that their app can receive a SIGTERM in various scenarios, such as CPU or disk overuse, |
100 | 100 | /// watchdog terminations, or when the OS updates your app. |
101 | 101 | /// |
102 | | - /// @note The default value is NO. |
| 102 | + /// @note The default value is @c false. |
103 | 103 | @objc public var enableSigtermReporting: Bool = false |
104 | 104 | #endif |
105 | 105 |
|
|
111 | 111 | /// disabling enableSwizzling also disables this feature. |
112 | 112 | /// @discussion If you want to enable or disable network tracking for performance monitoring, please |
113 | 113 | /// use enableNetworkTracking instead. |
114 | | - /// @note Default value is YES. |
| 114 | + /// @note Default value is @c true. |
115 | 115 | @objc public var enableNetworkBreadcrumbs: Bool = true |
116 | 116 |
|
117 | 117 | /// The maximum number of envelopes to keep in cache. |
|
127 | 127 |
|
128 | 128 | /// When enabled, the SDK sends logs to Sentry. Logs can be captured using the SentrySDK.logger |
129 | 129 | /// API, which provides structured logging with attributes. |
130 | | - /// @note Default value is NO. |
| 130 | + /// @note Default value is @c false. |
131 | 131 | @objc public var enableLogs: Bool = false |
132 | 132 |
|
133 | 133 | /// Use this callback to drop or modify a log before the SDK sends it to Sentry. Return nil to |
|
137 | 137 | /// This block can be used to modify the breadcrumb before it will be serialized and sent. |
138 | 138 | @objc public var beforeBreadcrumb: SentryBeforeBreadcrumbCallback? |
139 | 139 |
|
140 | | - /// You can use this callback to decide if the SDK should capture a screenshot or not. Return true |
141 | | - /// if the SDK should capture a screenshot, return false if not. This callback doesn't work for |
| 140 | + /// You can use this callback to decide if the SDK should capture a screenshot or not. Return @c true |
| 141 | + /// if the SDK should capture a screenshot, return @c false if not. This callback doesn't work for |
142 | 142 | /// crashes. |
143 | 143 | @objc public var beforeCaptureScreenshot: SentryBeforeCaptureScreenshotCallback? |
144 | 144 |
|
145 | 145 | /// You can use this callback to decide if the SDK should capture a view hierarchy or not. Return |
146 | | - /// true if the SDK should capture a view hierarchy, return false if not. This callback doesn't |
| 146 | + /// @c true if the SDK should capture a view hierarchy, return @c false if not. This callback doesn't |
147 | 147 | /// work for crashes. |
148 | 148 | @objc public var beforeCaptureViewHierarchy: SentryBeforeCaptureScreenshotCallback? |
149 | 149 |
|
|
182 | 182 | var _sampleRate: NSNumber? = 1 |
183 | 183 |
|
184 | 184 | /// Whether to enable automatic session tracking or not. |
185 | | - /// @note Default is YES. |
| 185 | + /// @note Default is @c true. |
186 | 186 | @objc public var enableAutoSessionTracking: Bool = true |
187 | 187 |
|
188 | 188 | /// Whether to attach the top level `operationName` node of HTTP json requests to HTTP breadcrumbs |
189 | | - /// @note Default is NO. |
| 189 | + /// @note Default is @c false. |
190 | 190 | @objc public var enableGraphQLOperationTracking: Bool = false |
191 | 191 |
|
192 | 192 | /// Whether to enable Watchdog Termination tracking or not. |
193 | 193 | /// @note This feature requires the SentryCrashIntegration being enabled, otherwise it would |
194 | 194 | /// falsely report every crash as watchdog termination. |
195 | | - /// @note Default is YES. |
| 195 | + /// @note Default is @c true. |
196 | 196 | @objc public var enableWatchdogTerminationTracking: Bool = true |
197 | 197 |
|
198 | 198 | /// The interval to end a session after the App goes to the background. |
|
213 | 213 | @objc public var maxAttachmentSize: UInt = 200 * 1_024 * 1_024 |
214 | 214 |
|
215 | 215 | /// When enabled, the SDK sends personal identifiable along with events. |
216 | | - /// @note The default is NO. |
217 | | - /// @discussion When the user of an event doesn't contain an IP address, and this flag is YES, the |
| 216 | + /// @note The default is @c false. |
| 217 | + /// @discussion When the user of an event doesn't contain an IP address, and this flag is @c true, the |
218 | 218 | /// SDK sets sdk.settings.infer_ip to auto to instruct the server to use the connection IP address as |
219 | 219 | /// the user address. Due to backward compatibility concerns, Sentry sets sdk.settings.infer_ip to |
220 | 220 | /// auto out of the box for Cocoa. If you want to stop Sentry from using the connections IP address, |
|
223 | 223 |
|
224 | 224 | /// When enabled, the SDK tracks performance for UIViewController subclasses and HTTP requests |
225 | 225 | /// automatically. It also measures the app start and slow and frozen frames. |
226 | | - /// @note The default is YES. |
| 226 | + /// @note The default is @c true. |
227 | 227 | /// @note Performance Monitoring must be enabled for this flag to take effect. See: |
228 | 228 | /// https://docs.sentry.io/platforms/apple/performance/ |
229 | 229 | @objc public var enableAutoPerformanceTracing: Bool = true |
|
234 | 234 | /// crash event when your app crashes. The SDK skips adding profiles to increase the chance of |
235 | 235 | /// keeping the transaction. |
236 | 236 | /// |
237 | | - /// @note The default is NO. |
| 237 | + /// @note The default is @c false. |
238 | 238 | @objc public var enablePersistingTracesWhenCrashing: Bool = false |
239 | 239 |
|
240 | 240 | /// A block that configures the initial scope when starting the SDK. |
|
248 | 248 | /// When enabled, the SDK tracks performance for UIViewController subclasses. |
249 | 249 | /// @warning This feature is not available in @c DebugWithoutUIKit and @c ReleaseWithoutUIKit |
250 | 250 | /// configurations even when targeting iOS or tvOS platforms. |
251 | | - /// @note The default is @c YES . |
| 251 | + /// @note The default is @c true. |
252 | 252 | @objc public var enableUIViewControllerTracing: Bool = true |
253 | 253 |
|
254 | 254 | /// Automatically attaches a screenshot when capturing an error or exception. |
255 | 255 | /// @warning This feature is not available in @c DebugWithoutUIKit and @c ReleaseWithoutUIKit |
256 | 256 | /// configurations even when targeting iOS or tvOS platforms. |
257 | | - /// @note Default value is @c NO . |
| 257 | + /// @note Default value is @c false. |
258 | 258 | @objc public var attachScreenshot: Bool = false |
259 | 259 |
|
260 | 260 | /// Settings to configure screenshot attachments. |
|
265 | 265 | /// error event. |
266 | 266 | /// @warning This feature is not available in @c DebugWithoutUIKit and @c ReleaseWithoutUIKit |
267 | 267 | /// configurations even when targeting iOS or tvOS platforms. |
268 | | - /// @note Default value is @c NO . |
| 268 | + /// @note Default value is @c false. |
269 | 269 | @objc public var attachViewHierarchy: Bool = false |
270 | 270 |
|
271 | 271 | /// @brief If enabled, view hierarchy attachment will contain view `accessibilityIdentifier`. |
272 | | - /// Set it to @c NO if your project uses `accessibilityIdentifier` for PII. |
| 272 | + /// Set it to @c false if your project uses `accessibilityIdentifier` for PII. |
273 | 273 | /// @warning This feature is not available in @c DebugWithoutUIKit and @c ReleaseWithoutUIKit |
274 | 274 | /// configurations even when targeting iOS or tvOS platforms. |
275 | | - /// @note Default value is @c YES. |
| 275 | + /// @note Default value is @c true. |
276 | 276 | @objc public var reportAccessibilityIdentifier: Bool = true |
277 | 277 |
|
278 | 278 | /// When enabled, the SDK creates transactions for UI events like buttons clicks, switch toggles, |
279 | 279 | /// and other ui elements that uses UIControl @c sendAction:to:forEvent: |
280 | 280 | /// @warning This feature is not available in @c DebugWithoutUIKit and @c ReleaseWithoutUIKit |
281 | 281 | /// configurations even when targeting iOS or tvOS platforms. |
282 | | - /// @note Default value is @c YES . |
| 282 | + /// @note Default value is @c true. |
283 | 283 | @objc public var enableUserInteractionTracing: Bool = true |
284 | 284 |
|
285 | 285 | /// How long an idle transaction waits for new children after all its child spans finished. Only UI |
|
300 | 300 | /// @warning This feature is not available in @c DebugWithoutUIKit and @c ReleaseWithoutUIKit |
301 | 301 | /// configurations even when targeting iOS or tvOS platforms. |
302 | 302 | /// |
303 | | - /// @note Default value is @c YES . |
| 303 | + /// @note Default value is @c true. |
304 | 304 | @objc public var enablePreWarmedAppStartTracing: Bool = true |
305 | 305 |
|
306 | 306 | /// When enabled the SDK reports non-fully-blocking app hangs. A non-fully-blocking app hang is when |
307 | 307 | /// the app appears stuck to the user but can still render a few frames. |
308 | 308 | /// |
309 | | - /// @note The default is @c YES. |
| 309 | + /// @note The default is @c true. |
310 | 310 | @objc public var enableReportNonFullyBlockingAppHangs: Bool = true |
311 | 311 |
|
312 | 312 | @_spi(Private) @objc public func isAppHangTrackingDisabled() -> Bool { |
|
323 | 323 |
|
324 | 324 | /// When enabled, the SDK tracks performance for HTTP requests if auto performance tracking and |
325 | 325 | /// @c enableSwizzling are enabled. |
326 | | - /// @note The default is @c YES . |
| 326 | + /// @note The default is @c true. |
327 | 327 | /// @discussion If you want to enable or disable network breadcrumbs, please use |
328 | 328 | /// @c enableNetworkBreadcrumbs instead. |
329 | 329 | @objc public var enableNetworkTracking: Bool = true |
330 | 330 |
|
331 | 331 | /// When enabled, the SDK tracks performance for file IO reads and writes with NSData if auto |
332 | 332 | /// performance tracking and enableSwizzling are enabled. |
333 | | - /// @note The default is @c YES . |
| 333 | + /// @note The default is @c true. |
334 | 334 | @objc public var enableFileIOTracing: Bool = true |
335 | 335 |
|
336 | 336 | /// When enabled, the SDK tracks performance for file IO reads and writes with NSData if auto |
337 | 337 | /// performance tracking and enableSwizzling are enabled. |
338 | | - /// @note The default is @c YES . |
| 338 | + /// @note The default is @c true. |
339 | 339 | @objc public var enableDataSwizzling: Bool = true |
340 | 340 |
|
341 | 341 | /// When enabled, the SDK tracks performance for file IO operations with NSFileManager if auto |
342 | 342 | /// performance tracking and enableSwizzling are enabled. |
343 | | - /// @note The default is @c NO . |
| 343 | + /// @note The default is @c false. |
344 | 344 | @objc public var enableFileManagerSwizzling: Bool = false |
345 | 345 |
|
346 | 346 | /// Indicates the percentage of the tracing data that is collected. |
|
375 | 375 | @objc public var tracesSampler: SentryTracesSamplerCallback? |
376 | 376 |
|
377 | 377 | /// If tracing is enabled or not. |
378 | | - /// @discussion @c YES if @c tracesSampleRateis > @c 0 and \<= @c 1 |
379 | | - /// or a @c tracesSampler is set, otherwise @c NO. |
| 378 | + /// @discussion @c true if @c tracesSampleRate is > @c 0 and \<= @c 1 |
| 379 | + /// or a @c tracesSampler is set, otherwise @c false. |
380 | 380 | @objc public var isTracingEnabled: Bool { |
381 | 381 | (tracesSampleRate?.doubleValue ?? 0) > 0 && (tracesSampleRate?.doubleValue ?? 0) <= 1 || tracesSampler != nil |
382 | 382 | } |
|
410 | 410 | /// navigation with UIViewControllers, automatic instrumentation for UIViewControllers, |
411 | 411 | /// automatic instrumentation for HTTP requests, automatic instrumentation for file IO with |
412 | 412 | /// NSData, and automatically added sentry-trace header to HTTP requests for distributed tracing. |
413 | | - /// Default is true. |
| 413 | + /// Default is @c true. |
414 | 414 | @objc public var enableSwizzling: Bool = true |
415 | 415 |
|
416 | 416 | /// A set of class names to ignore for swizzling. |
|
421 | 421 | @objc public var swizzleClassNameExcludes: Set<String> = [] |
422 | 422 |
|
423 | 423 | /// When enabled, the SDK tracks the performance of Core Data operations. It requires enabling |
424 | | - /// performance monitoring. The default is true. |
| 424 | + /// performance monitoring. The default is @c true. |
425 | 425 | /// See: https://docs.sentry.io/platforms/apple/performance/ |
426 | 426 | @objc public var enableCoreDataTracing: Bool = true |
427 | 427 |
|
|
454 | 454 | #endif // SENTRY_TARGET_PROFILING_SUPPORTED |
455 | 455 |
|
456 | 456 | /// Whether to send client reports, which contain statistics about discarded events. |
457 | | - /// @note The default is @c YES. |
| 457 | + /// @note The default is @c true. |
458 | 458 | /// @see <https://develop.sentry.dev/sdk/client-reports/> |
459 | 459 | @objc public var sendClientReports: Bool = true |
460 | 460 |
|
|
472 | 472 | /// |
473 | 473 | /// You can use @c enableReportNonFullyBlockingAppHangs to ignore non-fully-blocking app hangs. |
474 | 474 | /// |
475 | | - /// @note The default is @c YES |
| 475 | + /// @note The default is @c true. |
476 | 476 | /// @note App Hang tracking is automatically disabled if a debugger is attached. |
477 | 477 | @objc public var enableAppHangTracking: Bool = true |
478 | 478 |
|
|
484 | 484 | @objc public var appHangTimeoutInterval: TimeInterval = 2.0 |
485 | 485 |
|
486 | 486 | /// When enabled, the SDK adds breadcrumbs for various system events. |
487 | | - /// @note Default value is @c YES. |
| 487 | + /// @note Default value is @c true. |
488 | 488 | @objc public var enableAutoBreadcrumbTracking: Bool = true |
489 | 489 |
|
490 | 490 | /// When enabled, the SDK propagates the W3C Trace Context HTTP header traceparent on outgoing HTTP |
491 | 491 | /// requests. |
492 | 492 | /// |
493 | 493 | /// @discussion This is useful when the receiving services only support OTel/W3C propagation. The |
494 | | - /// traceparent header is only sent when this option is @c YES and the request matches @c |
| 494 | + /// traceparent header is only sent when this option is @c true and the request matches @c |
495 | 495 | /// tracePropagationTargets. |
496 | 496 | /// |
497 | | - /// @note Default value is @c NO. |
| 497 | + /// @note Default value is @c false. |
498 | 498 | @objc public var enablePropagateTraceparent: Bool = false |
499 | 499 |
|
500 | 500 | static let everythingAllowedRegex = try? NSRegularExpression(pattern: ".*", options: .caseInsensitive) |
|
518 | 518 |
|
519 | 519 | /// When enabled, the SDK captures HTTP Client errors. |
520 | 520 | /// @note This feature requires @c enableSwizzling enabled as well. |
521 | | - /// @note Default value is @c YES. |
| 521 | + /// @note Default value is @c true. |
522 | 522 | @objc public var enableCaptureFailedRequests: Bool = true |
523 | 523 |
|
524 | 524 | /// The SDK will only capture HTTP Client errors if the HTTP Response status code is within the |
|
558 | 558 | /// When enabled, the SDK adds the raw MXDiagnosticPayloads as an attachment to the converted |
559 | 559 | /// SentryEvent. You need to enable @c enableMetricKit for this flag to work. |
560 | 560 | /// |
561 | | - /// @note Default value is @c NO. |
| 561 | + /// @note Default value is @c false. |
562 | 562 | @objc public var enableMetricKitRawPayload = false |
563 | 563 |
|
564 | 564 | #endif |
|
570 | 570 | /// If @c SentrySDK.reportFullyDisplayed() is not called, the transaction will finish |
571 | 571 | /// automatically after 30 seconds and the `Time to full display` Span will be |
572 | 572 | /// finished with @c DeadlineExceeded status. |
573 | | - /// @note Default value is `NO`. |
| 573 | + /// @note Default value is `false`. |
574 | 574 | @objc public var enableTimeToFullDisplayTracing: Bool = false |
575 | 575 |
|
576 | 576 | /// This feature is only available from Xcode 13 and from macOS 12.0, iOS 15.0, tvOS 15.0, |
577 | 577 | /// watchOS 8.0. |
578 | 578 | /// |
579 | 579 | /// @warning This is an experimental feature and may still have bugs. |
580 | 580 | /// @brief Stitches the call to Swift Async functions in one consecutive stack trace. |
581 | | - /// @note Default value is @c NO . |
| 581 | + /// @note Default value is @c false. |
582 | 582 | @objc public var swiftAsyncStacktraces: Bool = false |
583 | 583 |
|
584 | 584 | /// The path to store SDK data, like events, transactions, profiles, raw crash data, etc. We |
585 | 585 | /// recommend only changing this when the default, e.g., in security environments, can't be accessed. |
586 | 586 | /// |
587 | 587 | /// @note The default is `NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, |
588 | | - /// YES)`. |
| 588 | + /// true)`. |
589 | 589 | @objc public var cacheDirectoryPath: String = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true).first ?? "" |
590 | 590 |
|
591 | 591 | /// Whether to enable Spotlight for local development. For more information see |
592 | 592 | /// https://spotlightjs.com/. |
593 | 593 | /// |
594 | | - /// @note Only set this option to @c YES while developing, not in production! |
| 594 | + /// @note Only set this option to @c true while developing, not in production! |
595 | 595 | @objc public var enableSpotlight: Bool = false { |
596 | 596 | didSet { |
597 | 597 | #if !DEBUG |
|
0 commit comments